OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | List of all members
WTensorTrace Class Reference

Computes the trace (sum of diagonal elements) of the tensor. More...

#include <WTensorTrace.h>

+ Inheritance diagram for WTensorTrace:
+ Collaboration diagram for WTensorTrace:

Public Member Functions

 WTensorTrace ()
 Constructs new TensorTrace object. More...
 
- Public Member Functions inherited from WObjectNDIP< WDataSetDTIToScalar_I >
virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 
- Public Member Functions inherited from WDataSetDTIToScalar_I
virtual WDataSetScalar::SPtr operator() (WProgress::SPtr progress, WBoolFlag const &shutdown, WDataSetDTI::SPtr tensors, WDataSetVector::SPtr evals)
 This runs the given strategy on the given dataset. More...
 
virtual ~WDataSetDTIToScalar_I ()
 Destructor. More...
 

Protected Member Functions

virtual double tensorToScalar (const WVector3d &evals, const WTensorSym< 2, 3, float > &tensor)
 Actual computation is done inhere. More...
 
- Protected Member Functions inherited from WObjectNDIP< WDataSetDTIToScalar_I >
 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 

Additional Inherited Members

- Public Types inherited from WObjectNDIP< WDataSetDTIToScalar_I >
typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 
- Protected Attributes inherited from WObjectNDIP< WDataSetDTIToScalar_I >
WProperties::SPtr m_properties
 the properties of the object. More...
 

Detailed Description

Computes the trace (sum of diagonal elements) of the tensor.

\[ trace(T) = \sum_{i=1}^n T(i,i) \]

Definition at line 40 of file WTensorTrace.h.

Constructor & Destructor Documentation

◆ WTensorTrace()

WTensorTrace::WTensorTrace ( )

Constructs new TensorTrace object.

Definition at line 27 of file WTensorTrace.cpp.

Member Function Documentation

◆ tensorToScalar()

double WTensorTrace::tensorToScalar ( const WVector3d evals,
const WTensorSym< 2, 3, float > &  tensor 
)
protectedvirtual

Actual computation is done inhere.

Parameters
evalsAlthough not needed here, for reasons of simplicity the API is covering eigenvalues as well.
tensorThe tensor for which the trace should be computed.
Returns
Trace of the tensor

Implements WDataSetDTIToScalar_I.

Definition at line 32 of file WTensorTrace.cpp.


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