Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::diff_var< ValType, 1, 0 > Struct Template Reference

Detailed description

template<typename ValType>
struct cugar::diff_var< ValType, 1, 0 >

Specialization of diff_var to scalar (i.e. 1-component) zero-order differentials. This class allows to represent variables that carry an associated first-order differential (or gradient) with respect to a predefined set of variables.

Template Parameters
ValTypethe value type of the expression
DiffTypethe type of differential / gradient of the expression

#include <diff.h>

Public Types

typedef ValType value_type
 
typedef ValType diff_component_type
 
typedef ValType diff_type
 

Public Methods

CUGAR_HOST_DEVICE diff_var ()
 
CUGAR_HOST_DEVICE diff_var (const diff_var< ValType, 1, 0 > &_other)
 
CUGAR_HOST_DEVICE diff_var (value_type _u)
 
CUGAR_HOST_DEVICE operator value_type () const
 
CUGAR_HOST_DEVICE diff_varoperator= (const value_type &_u)
 
CUGAR_HOST_DEVICE diff_type diff () const
 
CUGAR_HOST_DEVICE const diff_var< ValType, 1, 0 > & operator[] (const uint32 i) const
 
CUGAR_HOST_DEVICE diff_var< ValType, 1, 0 > & operator[] (const uint32 i)
 

Public Members

value_type u
 

Constructor & Destructor Documentation

◆ diff_var() [1/3]

template<typename ValType >
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, 0 >::diff_var ( )
inline

default constructor

◆ diff_var() [2/3]

template<typename ValType >
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, 0 >::diff_var ( const diff_var< ValType, 1, 0 > &  _other)
inline

copy constructor

◆ diff_var() [3/3]

template<typename ValType >
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, 0 >::diff_var ( value_type  _u)
inlineexplicit

constructor from scalar

Parameters
_uscalar value

Member Function Documentation

◆ diff()

template<typename ValType >
CUGAR_HOST_DEVICE diff_type cugar::diff_var< ValType, 1, 0 >::diff ( ) const
inline

return the first-order differential

◆ operator value_type()

template<typename ValType >
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, 0 >::operator value_type ( ) const
inline

conversion to scalar

◆ operator=()

template<typename ValType >
CUGAR_HOST_DEVICE diff_var& cugar::diff_var< ValType, 1, 0 >::operator= ( const value_type &  _u)
inline

assignment to scalar


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