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 49 of file SundanceEvalVector.hpp.


Constructor & Destructor Documentation

EvalVector::EvalVector ( TempStack s  )  [private]

Definition at line 46 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 55 of file SundanceEvalVector.cpp.

References data_.

EvalVector::~EvalVector (  ) 

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 76 of file SundanceEvalVector.cpp.

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


Member Function Documentation

void EvalVector::add_S ( const double &  alpha  ) 

Definition at line 136 of file SundanceEvalVector.cpp.

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

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

Definition at line 109 of file SundanceEvalVector.cpp.

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

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 185 of file SundanceEvalVector.cpp.

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

void EvalVector::add_V ( const EvalVector A  ) 

Definition at line 161 of file SundanceEvalVector.cpp.

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

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 213 of file SundanceEvalVector.cpp.

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

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 88 of file SundanceEvalVector.cpp.

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

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

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

Definition at line 305 of file SundanceEvalVector.hpp.

References data_, and s_.

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

Definition at line 288 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 475 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 270 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 241 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 450 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 296 of file SundanceEvalVector.cpp.

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

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 396 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 351 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 319 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 424 of file SundanceEvalVector.cpp.

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

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

Definition at line 783 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 301 of file SundanceEvalVector.hpp.

References 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 613 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 667 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 93 of file SundanceEvalVector.cpp.

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

static bool& Sundance::EvalVector::shadowOps (  )  [inline, static]

double* Sundance::EvalVector::start (  )  [inline]

Definition at line 297 of file SundanceEvalVector.hpp.

const double* Sundance::EvalVector::start (  )  const [inline]

const std::string& Sundance::EvalVector::str (  )  const [inline]

static double& Sundance::EvalVector::totalFlops (  )  [inline, static]

Definition at line 310 of file SundanceEvalVector.hpp.

Referenced by addFlops().


Friends And Related Function Documentation

friend class EvalManager [friend]

Definition at line 52 of file SundanceEvalVector.hpp.

friend class TempStack [friend]

Definition at line 53 of file SundanceEvalVector.hpp.


Member Data Documentation

RCP<Array<double> > Sundance::EvalVector::data_ [private]

TempStack* Sundance::EvalVector::s_ [mutable, private]

Definition at line 316 of file SundanceEvalVector.hpp.

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

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

Site Contact