Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | List of all members
Sacado::LFad::LogicalSparse< ValT, LogT > Class Template Reference

User inteface class for computing the logical sparsity pattern of a derivative via forward-mode AD. More...

#include <Sacado_LFad_LogicalSparse.hpp>

Inheritance diagram for Sacado::LFad::LogicalSparse< ValT, LogT >:
Inheritance graph
[legend]

Classes

struct  apply
 Turn LogicalSparse into a meta-function class usable with mpl::apply. More...
 

Public Types

typedef LogicalSparseImp< ValT,
LogT > 
ImplType
 Base classes. More...
 
typedef Expr< ImplTypeExprType
 
typedef ExprType::value_type value_type
 Typename of values. More...
 
typedef ExprType::scalar_type scalar_type
 Typename of scalar's (which may be different from value_type) More...
 
- Public Types inherited from Sacado::LFad::Expr< LogicalSparseImp< ValT, LogT > >
typedef LogicalSparseImp< ValT,
LogT >::value_type 
value_type
 Typename of values. More...
 
typedef LogicalSparseImp< ValT,
LogT >::scalar_type 
scalar_type
 Typename of scalar's (which may be different from value_type) More...
 
typedef LogicalSparse< ValT, LogT > base_expr_type
 Typename of base-expressions. More...
 
- Public Types inherited from Sacado::LFad::LogicalSparseImp< ValT, LogT >
typedef ValT value_type
 Typename of values (e.g., double) More...
 
typedef ScalarType< value_type >
::type 
scalar_type
 Typename of scalar's (which may be different from ValT) More...
 
typedef LogT logical_type
 Logical type (i.e., type for derivative array components (e.g., bool) More...
 
- Public Types inherited from Sacado::Fad::DynamicStorage< ValT, LogT >
typedef ValT value_type
 

Public Member Functions

 ~LogicalSparse ()
 Destructor. More...
 
- Public Member Functions inherited from Sacado::LFad::Expr< LogicalSparseImp< ValT, LogT > >
 Expr ()
 Default constructor. More...
 
template<typename S >
 Expr (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Constructor with supplied value x. More...
 
 Expr (const int sz, const ValT &x)
 Constructor with size sz and value x. More...
 
 Expr (const int sz, const int i, const ValT &x)
 Constructor with size sz, index i, and value x. More...
 
 Expr (const Expr &x)
 Copy constructor. More...
 
template<typename S >
 Expr (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
 Copy constructor from any Expression object. More...
 
 ~Expr ()
 Destructor. More...
 
- Public Member Functions inherited from Sacado::LFad::LogicalSparseImp< ValT, LogT >
 LogicalSparseImp ()
 Default constructor. More...
 
template<typename S >
 LogicalSparseImp (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Constructor with supplied value x. More...
 
 LogicalSparseImp (const int sz, const value_type &x)
 Constructor with size sz and value x. More...
 
 LogicalSparseImp (const int sz, const int i, const value_type &x)
 Constructor with size sz, index i, and value x. More...
 
 LogicalSparseImp (const LogicalSparseImp &x)
 Copy constructor. More...
 
template<typename S >
 LogicalSparseImp (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
 Copy constructor from any Expression object. More...
 
 ~LogicalSparseImp ()
 Destructor. More...
 
void diff (const int ith, const int n)
 Set LogicalSparseImp object as the ith independent variable. More...
 
template<typename S >
 SACADO_ENABLE_EXPR_FUNC (bool) isEqualTo(const Expr< S > &x) const
 Returns whether two Fad objects have the same values. More...
 
bool hasFastAccess () const
 Returns true if derivative array is not empty. More...
 
bool isPassive () const
 Returns true if derivative array is empty. More...
 
void setIsConstant (bool is_const)
 Set whether variable is constant. More...
 
- Public Member Functions inherited from Sacado::Fad::DynamicStorage< ValT, LogT >
SACADO_INLINE_FUNCTION DynamicStorage (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Default constructor. More...
 
SACADO_INLINE_FUNCTION DynamicStorage (const int sz, const ValT &x, const DerivInit zero_out=InitDerivArray)
 Constructor with size sz. More...
 
SACADO_INLINE_FUNCTION DynamicStorage (const DynamicStorage &x)
 Copy constructor. More...
 
SACADO_INLINE_FUNCTION ~DynamicStorage ()
 Destructor. More...
 
SACADO_INLINE_FUNCTION
DynamicStorage
operator= (const DynamicStorage &x)
 Assignment. More...
 
SACADO_INLINE_FUNCTION int size () const
 Returns number of derivative components. More...
 
SACADO_INLINE_FUNCTION int length () const
 Returns array length. More...
 
SACADO_INLINE_FUNCTION void resize (int sz)
 Resize the derivative array to sz. More...
 
SACADO_INLINE_FUNCTION void resizeAndZero (int sz)
 Resize the derivative array to sz. More...
 
SACADO_INLINE_FUNCTION void expand (int sz)
 Expand derivative array to size sz. More...
 
SACADO_INLINE_FUNCTION void zero ()
 Zero out derivative array. More...
 
SACADO_INLINE_FUNCTION const ValT & val () const
 Returns value. More...
 
SACADO_INLINE_FUNCTION ValT & val ()
 Returns value. More...
 
SACADO_INLINE_FUNCTION const LogT * dx () const
 Returns derivative array. More...
 
SACADO_INLINE_FUNCTION LogT dx (int i) const
 Returns derivative component i with bounds checking. More...
 
SACADO_INLINE_FUNCTION LogT & fastAccessDx (int i)
 Returns derivative component i without bounds checking. More...
 
SACADO_INLINE_FUNCTION const LogT & fastAccessDx (int i) const
 Returns derivative component i without bounds checking. More...
 

Initialization methods

 LogicalSparse ()
 Default constructor. More...
 
template<typename S >
 LogicalSparse (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL)
 Constructor with supplied value x of type ValueT. More...
 
 LogicalSparse (const int sz, const ValT &x)
 Constructor with size sz and value x. More...
 
 LogicalSparse (const int sz, const int i, const ValT &x)
 Constructor with size sz, index i, and value x. More...
 
 LogicalSparse (const LogicalSparse &x)
 Copy constructor. More...
 
template<typename S >
 LogicalSparse (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL)
 Copy constructor from any Expression object. More...
 

Additional Inherited Members

- Protected Attributes inherited from Sacado::Fad::DynamicStorage< ValT, LogT >
ValT val_
 Value. More...
 
int sz_
 Derivative array size. More...
 
int len_
 Derivative array length. More...
 
LogT * dx_
 Derivative array. More...
 

Detailed Description

template<typename ValT, typename LogT>
class Sacado::LFad::LogicalSparse< ValT, LogT >

User inteface class for computing the logical sparsity pattern of a derivative via forward-mode AD.

Definition at line 78 of file Sacado_LFad_LogicalSparse.hpp.

Member Typedef Documentation

template<typename ValT, typename LogT>
typedef LogicalSparseImp< ValT,LogT > Sacado::LFad::LogicalSparse< ValT, LogT >::ImplType

Base classes.

Definition at line 609 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
typedef Expr<ImplType> Sacado::LFad::LogicalSparse< ValT, LogT >::ExprType

Definition at line 610 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
typedef ExprType::value_type Sacado::LFad::LogicalSparse< ValT, LogT >::value_type

Typename of values.

Definition at line 613 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
typedef ExprType::scalar_type Sacado::LFad::LogicalSparse< ValT, LogT >::scalar_type

Typename of scalar's (which may be different from value_type)

Definition at line 616 of file Sacado_LFad_LogicalSparse.hpp.

Constructor & Destructor Documentation

template<typename ValT, typename LogT>
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( )
inline

Default constructor.

Initializes value to 0 and derivative array is empty

Definition at line 633 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
template<typename S >
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( const S &  x,
SACADO_ENABLE_VALUE_CTOR_DECL   
)
inline

Constructor with supplied value x of type ValueT.

Initializes value to x and derivative array is empty

Definition at line 641 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( const int  sz,
const ValT &  x 
)
inline

Constructor with size sz and value x.

Initializes value to x and derivative array 0 of length sz

Definition at line 648 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( const int  sz,
const int  i,
const ValT &  x 
)
inline

Constructor with size sz, index i, and value x.

Initializes value to x and derivative array of length sz as row i of the identity matrix, i.e., sets derivative component i to 1 and all other's to zero.

Definition at line 657 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( const LogicalSparse< ValT, LogT > &  x)
inline

Copy constructor.

Definition at line 661 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
template<typename S >
Sacado::LFad::LogicalSparse< ValT, LogT >::LogicalSparse ( const Expr< S > &  x,
SACADO_ENABLE_EXPR_CTOR_DECL   
)
inline

Copy constructor from any Expression object.

Definition at line 666 of file Sacado_LFad_LogicalSparse.hpp.

template<typename ValT, typename LogT>
Sacado::LFad::LogicalSparse< ValT, LogT >::~LogicalSparse ( )
inline

Destructor.

Definition at line 672 of file Sacado_LFad_LogicalSparse.hpp.


The documentation for this class was generated from the following file: