// -*- C++ -*- // $Id: Variable.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $ #include "CLHEP/GenericFunctions/Variable.hh" #include "CLHEP/GenericFunctions/FixedConstant.hh" #include namespace Genfun { FUNCTION_OBJECT_IMP(Variable) Variable::Variable(unsigned int selectionIndex, unsigned int dimensionality): _selectionIndex(selectionIndex), _dimensionality(dimensionality) {} Variable::Variable(const Variable & right): _selectionIndex(right._selectionIndex), _dimensionality(right._dimensionality) { } Variable::~Variable() { } double Variable::operator() (double x) const { assert (_selectionIndex==0); return x; } double Variable::operator () (const Argument & a) const { assert (_selectionIndex