Tenncor
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
eteq::VariableNode< T > Struct Template Referencefinal

Variable's node wrapper. More...

#include <variable.hpp>

Inheritance diagram for eteq::VariableNode< T >:
Inheritance graph
[legend]
Collaboration diagram for eteq::VariableNode< T >:
Collaboration graph
[legend]

Public Member Functions

 VariableNode (std::shared_ptr< Variable< T >> var)
 
VariableNode< T > * clone (void) const
 Return deep copy of this instance (with a copied variable) More...
 
T * data (void) override
 Implementation of iNode<T> More...
 
void update (void) override
 Implementation of iNode<T> More...
 
teq::TensptrT get_tensor (void) const override
 Implementation of iNode<T> More...
 
void assign (const T *input, teq::Shape shape)
 Wrapper around variable assign of the same signature. More...
 
void assign (const TensMapT< T > *tensmap)
 Assign Eigen tensor map to variable's internal data. More...
 
void assign (const ShapedArr< T > &arr)
 Assign ShapedArr representation to variable's internal data. More...
 
std::string get_label (void) const
 Return string representation of internal variable. More...
 
- Public Member Functions inherited from eteq::iNode< T >
virtual ~iNode (void)=default
 
iNode< T > * clone (void) const
 Return deep copy of node where internal typed tensor is copied. More...
 
teq::Shape shape (void)
 Return shape of internal tensor. More...
 
std::string to_string (void) const
 Return string representation of internal tensor. More...
 

Protected Member Functions

iNode< T > * clone_impl (void) const override
 

Private Attributes

std::shared_ptr< Variable< T > > var_
 

Detailed Description

template<typename T>
struct eteq::VariableNode< T >

Variable's node wrapper.

Constructor & Destructor Documentation

◆ VariableNode()

template<typename T >
eteq::VariableNode< T >::VariableNode ( std::shared_ptr< Variable< T >>  var)
inline

Member Function Documentation

◆ assign() [1/3]

template<typename T >
void eteq::VariableNode< T >::assign ( const T *  input,
teq::Shape  shape 
)
inline

Wrapper around variable assign of the same signature.

◆ assign() [2/3]

template<typename T >
void eteq::VariableNode< T >::assign ( const TensMapT< T > *  tensmap)
inline

Assign Eigen tensor map to variable's internal data.

◆ assign() [3/3]

template<typename T >
void eteq::VariableNode< T >::assign ( const ShapedArr< T > &  arr)
inline

Assign ShapedArr representation to variable's internal data.

◆ clone()

template<typename T >
VariableNode<T>* eteq::VariableNode< T >::clone ( void  ) const
inline

Return deep copy of this instance (with a copied variable)

◆ clone_impl()

template<typename T >
iNode<T>* eteq::VariableNode< T >::clone_impl ( void  ) const
inlineoverrideprotectedvirtual

Implements eteq::iNode< T >.

◆ data()

template<typename T >
T* eteq::VariableNode< T >::data ( void  )
inlineoverridevirtual

Implementation of iNode<T>

Implements eteq::iNode< T >.

◆ get_label()

template<typename T >
std::string eteq::VariableNode< T >::get_label ( void  ) const
inline

Return string representation of internal variable.

◆ get_tensor()

template<typename T >
teq::TensptrT eteq::VariableNode< T >::get_tensor ( void  ) const
inlineoverridevirtual

Implementation of iNode<T>

Implements eteq::iNode< T >.

◆ update()

template<typename T >
void eteq::VariableNode< T >::update ( void  )
inlineoverridevirtual

Implementation of iNode<T>

Implements eteq::iNode< T >.

Member Data Documentation

◆ var_

template<typename T >
std::shared_ptr<Variable<T> > eteq::VariableNode< T >::var_
private

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