OpenStudio:model
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "Curve.hpp"

Inheritance diagram for openstudio::model::Curve:

Public Member Functions

virtual ~Curve ()
int numVariables () const
double evaluate (const std::vector< double > &x) const
double evaluate (double x) const
double evaluate (double x, double y) const
double evaluate (double x, double y, double z) const

Related Functions

typedef std::vector< CurveCurveVector
typedef boost::optional< CurveOptionalCurve

Detailed Description

Curve is a ModelObject that serves as a base class for a number of specific types of curves, each of which is a function of one, two, or three variables.

Curve requires its derived classes to implement numVariables and evaluate. For examples of objects that use Curves , see CoilCoolingDXSingleSpeed and PumpVariableSpeed.

Constructor & Destructor Documentation

virtual openstudio::model::Curve::~Curve ( )
inlinevirtual

Member Function Documentation

double openstudio::model::Curve::evaluate ( const std::vector< double > &  x) const

Returns the value of this Curve at x.

Throws if x.size() != numVariables(), or if the curve cannot be evaluated for some type-specific reason.

double openstudio::model::Curve::evaluate ( double  x) const

Convenience overload that throws if numVariables() != 1.

double openstudio::model::Curve::evaluate ( double  x,
double  y 
) const

Convenience overload that throws if numVariables() != 2.

double openstudio::model::Curve::evaluate ( double  x,
double  y,
double  z 
) const

Convenience overload that throws if numVariables() != 3.

int openstudio::model::Curve::numVariables ( ) const

Returns the number of independent variable values required to evaluate this Curve.

Typically 1 <= numVariables() <= 3.

Friends And Related Function Documentation

typedef std::vector<Curve> CurveVector
related
typedef boost::optional<Curve> OptionalCurve
related