Tenncor
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
eteq::Constant< T > Struct Template Referencefinal

Constant implementation of Eigen leaf tensor. More...

#include <constant.hpp>

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

Public Member Functions

 Constant (const Constant< T > &other)=delete
 
 Constant (Constant< T > &&other)=delete
 
Constant< T > & operator= (const Constant< T > &other)=delete
 
Constant< T > & operator= (Constant< T > &&other)=delete
 
std::string to_string (void) const override
 Implementation of iTensor. More...
 
bool is_const (void) const override
 Implementation of iLeaf. More...
 
bool is_scalar (void) const
 Return true if constant data values are all the same, otherwise false. More...
 
- Public Member Functions inherited from eteq::iLeaf< T >
virtual ~iLeaf (void)=default
 
const teq::Shapeshape (void) const override
 Implementation of iTensor. More...
 
void * data (void) override
 Implementation of iData. More...
 
const void * data (void) const override
 Implementation of iData. More...
 
size_t type_code (void) const override
 Implementation of iData. More...
 
std::string type_label (void) const override
 Implementation of iData. More...
 
size_t nbytes (void) const override
 Implementation of iData. More...
 
- Public Member Functions inherited from teq::iLeaf
void accept (iTraveler &visiter) override
 Implementation of iTensor. More...
 
- Public Member Functions inherited from teq::iTensor
virtual ~iTensor (void)=default
 
- Public Member Functions inherited from teq::iData
virtual ~iData (void)=default
 

Static Public Member Functions

static Constant< T > * get (T *data, teq::Shape shape)
 
static Constant< T > * get_scalar (T scalar, teq::Shape shape)
 Return Constant tensor containing scalar expanded to fill shape. More...
 

Private Member Functions

 Constant (T *data, teq::Shape shape)
 

Additional Inherited Members

- Protected Member Functions inherited from eteq::iLeaf< T >
 iLeaf (T *data, teq::Shape shape)
 
- Protected Attributes inherited from eteq::iLeaf< T >
TensorT< T > data_
 Data Source. More...
 
teq::Shape shape_
 Shape utility to avoid excessive conversion between data_.dimensions() More...
 

Detailed Description

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

Constant implementation of Eigen leaf tensor.

Constructor & Destructor Documentation

◆ Constant() [1/3]

template<typename T>
eteq::Constant< T >::Constant ( const Constant< T > &  other)
delete

◆ Constant() [2/3]

template<typename T>
eteq::Constant< T >::Constant ( Constant< T > &&  other)
delete

◆ Constant() [3/3]

template<typename T>
eteq::Constant< T >::Constant ( T *  data,
teq::Shape  shape 
)
inlineprivate

Member Function Documentation

◆ get()

template<typename T >
Constant< T > * eteq::Constant< T >::get ( T *  data,
teq::Shape  shape 
)
static

Return Constant tensor containing first shape.n_elems() values of data pointer

◆ get_scalar()

template<typename T>
static Constant<T>* eteq::Constant< T >::get_scalar ( scalar,
teq::Shape  shape 
)
inlinestatic

Return Constant tensor containing scalar expanded to fill shape.

◆ is_const()

template<typename T>
bool eteq::Constant< T >::is_const ( void  ) const
inlineoverridevirtual

Implementation of iLeaf.

Implements teq::iLeaf.

◆ is_scalar()

template<typename T>
bool eteq::Constant< T >::is_scalar ( void  ) const
inline

Return true if constant data values are all the same, otherwise false.

◆ operator=() [1/2]

template<typename T>
Constant<T>& eteq::Constant< T >::operator= ( const Constant< T > &  other)
delete

◆ operator=() [2/2]

template<typename T>
Constant<T>& eteq::Constant< T >::operator= ( Constant< T > &&  other)
delete

◆ to_string()

template<typename T>
std::string eteq::Constant< T >::to_string ( void  ) const
inlineoverridevirtual

Implementation of iTensor.

Implements teq::iTensor.


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