double ossimNumericProperty::getMaxValue()const
{
   if(hasConstraints())
   {
      return theRangeConstraint[1];
   }

   return 0.0;
}
示例#2
0
ColumnVector NLF1::evalLagrangianGradient(const ColumnVector& xc, 
                                          const ColumnVector& multiplier,
					  const ColumnVector& type) 
{
   ColumnVector grad  = evalG(xc);
   if(hasConstraints()){
      ColumnVector tmult = -multiplier;
      grad += constraint_->evalGradient(xc)*tmult;
   }
   return grad;
}
示例#3
0
real NLF1::evalLagrangian(const ColumnVector& xc , 
                          ColumnVector& multiplier,
                          const ColumnVector& type) 
{
   real result = evalF(xc);
   if( hasConstraints()){
      ColumnVector resid = constraint_->evalResidual(xc);
      result  -=  Dot(resid, multiplier);
   }
   return result;
}
bool ossimNumericProperty::setValue(const ossimString& value)
{
   bool result = true;
   if(hasConstraints())
   {
      ossim_float64 tempV = (ossim_float64)value.toDouble();
      if((tempV >= theRangeConstraint[0])&&
         (tempV <= theRangeConstraint[1]))
      {
         theValue = value;
      }
   }
   else
   {
     theValue = value;
   }

   return result;
}
示例#5
0
bool ossimStringListProperty::canAddValue(const ossimString& value)const
{
   bool result = true;

   if(hasConstraints())
   {
      if(findValueInConstraintList(value))
      {
         if(theUniqueFlag)
         {
            if(findValueInValueList(value))
            {
               result = false;
            }
         }
      }
      else
      {
         result = false;
      }
   }

   return result;
}