Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
Sundance::EvalVector Class Reference
Inheritance diagram for Sundance::EvalVector:
Sundance::Noncopyable Sundance::ObjectWithClassVerbosity< EvalVector > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 ~EvalVector ()

Static Public Member Functions

static double & totalFlops ()

Private Member Functions

 EvalVector (TempStack *s)
 EvalVector (TempStack *s, const RCP< Array< double > > &data, const std::string &str)

Static Private Member Functions

static void addFlops (const double &flops)

Private Attributes

TempStacks_
RCP< Array< double > > data_
std::string str_

Friends

class EvalManager
class TempStack

Mathematical operations

void add_SV (const double &alpha, const EvalVector *B)
void add_SVV (const double &alpha, const EvalVector *B, const EvalVector *C)
void add_V (const EvalVector *A)
void add_S (const double &alpha)
void add_VV (const EvalVector *A, const EvalVector *B)
void multiply_S_add_SV (const double &alpha, const double &beta, const EvalVector *C)
void multiply_S_add_S (const double &alpha, const double &beta)
void multiply_V_add_VVV (const EvalVector *A, const EvalVector *B, const EvalVector *C, const EvalVector *D)
void multiply_V_add_SVV (const EvalVector *A, const double &beta, const EvalVector *C, const EvalVector *D)
void multiply_V_add_SV (const EvalVector *A, const double &beta, const EvalVector *C)
void multiply_VV (const EvalVector *A, const EvalVector *B)
void multiply_SV (const double &alpha, const EvalVector *B)
void multiply_V (const EvalVector *A)
void multiply_S (const double &alpha)
void setTo_S_add_SVV (const double &alpha, const double &beta, const EvalVector *C, const EvalVector *D)
void setTo_S_add_VV (const double &alpha, const EvalVector *B, const EvalVector *C)
void setTo_S_add_SV (const double &alpha, const double &beta, const EvalVector *C)
void setTo_S_add_V (const double &alpha, const EvalVector *B)
void setTo_V (const EvalVector *A)
void setTo_VV (const EvalVector *A, const EvalVector *B)
void setTo_SV (const double &alpha, const EvalVector *B)
void setTo_SVV (const double &alpha, const EvalVector *B, const EvalVector *C)
void setToConstant (const double &alpha)
void applyUnaryOperator (const UnaryFunctor *func, Array< RCP< EvalVector > > &opDerivs)
RCP< EvalVectorclone () const
void resize (int n)
int length () const
void print (std::ostream &os) const
const double * start () const
double * start ()
const std::string & str () const
void setString (const std::string &str)
bool isValid () const
static bool & shadowOps ()

Detailed Description

Definition at line 60 of file SundanceEvalVector.hpp.


Constructor & Destructor Documentation

EvalVector::EvalVector ( TempStack s) [private]

Definition at line 57 of file SundanceEvalVector.cpp.

References data_, and Sundance::TempStack::vecSize().

Referenced by clone().

EvalVector::EvalVector ( TempStack s,
const RCP< Array< double > > &  data,
const std::string &  str 
) [private]

Definition at line 66 of file SundanceEvalVector.cpp.

References data_.

EvalVector has a nontrivial destructor. Upon destruction, the vector's underlying data object is not destroyed, but rather is put back on the stack of temporary vectors.

Definition at line 87 of file SundanceEvalVector.cpp.

References data_, Sundance::TempStack::pushVectorData(), and s_.


Member Function Documentation

void EvalVector::add_S ( const double &  alpha)

Definition at line 147 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().

void EvalVector::add_SV ( const double &  alpha,
const EvalVector B 
)
void EvalVector::add_SVV ( const double &  alpha,
const EvalVector B,
const EvalVector C 
)

Perform the operation

\[ this = this + alpha*B*C \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 196 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().

Referenced by Sundance::ProductEvaluator::internalEval().

void EvalVector::add_V ( const EvalVector A)

Definition at line 172 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), and str_.

Referenced by Sundance::ChainRuleSum::evalVar().

void EvalVector::add_VV ( const EvalVector A,
const EvalVector B 
)

Perform the operation

\[ this = this + A*B \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 224 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), and str_.

Referenced by Sundance::ChainRuleSum::evalVar().

static void Sundance::EvalVector::addFlops ( const double &  flops) [inline, static, private]
void EvalVector::applyUnaryOperator ( const UnaryFunctor func,
Array< RCP< EvalVector > > &  opDerivs 
)
RCP< EvalVector > EvalVector::clone ( ) const

Definition at line 99 of file SundanceEvalVector.cpp.

References data_, EvalVector(), s_, and str_.

Referenced by Sundance::ChainRuleSum::evalVar().

bool Sundance::EvalVector::isValid ( ) const [inline]

Definition at line 316 of file SundanceEvalVector.hpp.

References data_, and s_.

int Sundance::EvalVector::length ( ) const [inline]

Definition at line 299 of file SundanceEvalVector.hpp.

References data_.

void EvalVector::multiply_S ( const double &  alpha)

Perform the operation

\[ this = this*alpha \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 486 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().

void EvalVector::multiply_S_add_S ( const double &  alpha,
const double &  beta 
)

Scale and add a constant to this vector. The operation is done in-place, overwriting the old values of the vector. Each element x[i] is updated as:

\[ this = alpha * this + beta \]

Definition at line 281 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().

void EvalVector::multiply_S_add_SV ( const double &  alpha,
const double &  beta,
const EvalVector C 
)

Perform a scaled addition with another vector,

\[ this = \alpha this + \beta C \]

The operation is done in-place, overwriting the old values of the vector.

Definition at line 252 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().

void EvalVector::multiply_SV ( const double &  alpha,
const EvalVector B 
)

Perform the operation

\[ this = this*alpha*B \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 461 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().

void EvalVector::multiply_V ( const EvalVector A)

Perform the operation

\[ this = this*A \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 307 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), and str_.

Referenced by Sundance::ChainRuleSum::evalVar().

void EvalVector::multiply_V_add_SV ( const EvalVector A,
const double &  beta,
const EvalVector C 
)

Perform the operation

\[ this = this*A + beta*C \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 407 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().

void EvalVector::multiply_V_add_SVV ( const EvalVector A,
const double &  beta,
const EvalVector C,
const EvalVector D 
)

Perform the operation

\[ this = this*A + beta*C*D \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 362 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().

void EvalVector::multiply_V_add_VVV ( const EvalVector A,
const EvalVector B,
const EvalVector C,
const EvalVector D 
)

Perform the operation

\[ this = this*A + B*C*D \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 330 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), and str_.

void EvalVector::multiply_VV ( const EvalVector A,
const EvalVector B 
)

Perform the operation

\[ this = this*A*B \]

which shows up in the chain rule expansion of a second derivative.

Definition at line 435 of file SundanceEvalVector.cpp.

References addFlops(), data_, shadowOps(), start(), str(), and str_.

void EvalVector::print ( std::ostream &  os) const

Definition at line 794 of file SundanceEvalVector.cpp.

References data_, shadowOps(), and str_.

Referenced by std::operator<<().

void EvalVector::resize ( int  n)
void Sundance::EvalVector::setString ( const std::string &  str) [inline]

Definition at line 312 of file SundanceEvalVector.hpp.

References str(), and str_.

void EvalVector::setTo_S_add_SV ( const double &  alpha,
const double &  beta,
const EvalVector C 
)
void EvalVector::setTo_S_add_SVV ( const double &  alpha,
const double &  beta,
const EvalVector C,
const EvalVector D 
)
void EvalVector::setTo_S_add_V ( const double &  alpha,
const EvalVector B 
)
void EvalVector::setTo_S_add_VV ( const double &  alpha,
const EvalVector B,
const EvalVector C 
)
void EvalVector::setTo_SV ( const double &  alpha,
const EvalVector B 
)
void EvalVector::setTo_SVV ( const double &  alpha,
const EvalVector B,
const EvalVector C 
)
void EvalVector::setTo_V ( const EvalVector A)

Definition at line 624 of file SundanceEvalVector.cpp.

References data_, resize(), shadowOps(), start(), str(), and str_.

void EvalVector::setTo_VV ( const EvalVector A,
const EvalVector B 
)

Definition at line 678 of file SundanceEvalVector.cpp.

References addFlops(), data_, resize(), shadowOps(), start(), str(), and str_.

void EvalVector::setToConstant ( const double &  alpha)

Set every element to a constant value

Definition at line 104 of file SundanceEvalVector.cpp.

References data_, shadowOps(), str_, and Teuchos::toString().

static bool& Sundance::EvalVector::shadowOps ( ) [inline, static]
const double* Sundance::EvalVector::start ( ) const [inline]
double* Sundance::EvalVector::start ( ) [inline]

Definition at line 308 of file SundanceEvalVector.hpp.

const std::string& Sundance::EvalVector::str ( ) const [inline]
static double& Sundance::EvalVector::totalFlops ( ) [inline, static]

Definition at line 321 of file SundanceEvalVector.hpp.

Referenced by addFlops().


Friends And Related Function Documentation

friend class EvalManager [friend]

Definition at line 63 of file SundanceEvalVector.hpp.

friend class TempStack [friend]

Definition at line 64 of file SundanceEvalVector.hpp.


Member Data Documentation

RCP<Array<double> > Sundance::EvalVector::data_ [private]
TempStack* Sundance::EvalVector::s_ [mutable, private]

Definition at line 327 of file SundanceEvalVector.hpp.

Referenced by applyUnaryOperator(), clone(), isValid(), and ~EvalVector().

std::string Sundance::EvalVector::str_ [private]

Site Contact