Minsky
|
#include <tensorOp.h>
Public Member Functions | |
const Index & | index () const override |
the index vector - assumed to be ordered and unique More... | |
std::size_t | size () const override |
return number of elements in tensor - maybe less than hypercube.numElements if sparse More... | |
double | operator[] (std::size_t i) const override |
return or compute data at a location More... | |
const Hypercube & | hypercube () const override |
information describing the axes, types and labels of this tensor More... | |
const Hypercube & | hypercube (const Hypercube &hc) override |
const Hypercube & | hypercube (Hypercube &&hc) override |
![]() | |
CLASSDESC_ACCESS (ITensor) | |
ITensor () | |
ITensor (const Hypercube &hc) | |
ITensor (Hypercube &&hc) | |
ITensor (const std::vector< unsigned > &dims) | |
ITensor (const ITensor &)=default | |
ITensor (ITensor &&)=default | |
ITensor & | operator= (const ITensor &)=default |
ITensor & | operator= (ITensor &&)=default |
virtual | ~ITensor () |
std::size_t | rank () const |
std::vector< unsigned > | shape () const |
void | imposeDimensions (const Dimensions &dimensions) |
impose dimensions according to dimension map dimensions More... | |
double | atHCIndex (std::size_t hcIdx) const |
returns the data value at hypercube index hcIdx, or NaN if More... | |
template<class T > | |
std::size_t | hcIndex (const std::initializer_list< T > &indices) const |
template<class T > | |
double | operator() (const std::initializer_list< T > &indices) const |
virtual Timestamp | timestamp () const =0 |
timestamp indicating how old the dependendent data might be. Used in CachedTensorOp to determine when to invalidate the cache More... | |
virtual void | setArgument (const TensorPtr &, const ITensor::Args &args={"", 0}) |
virtual void | setArguments (const TensorPtr &, const TensorPtr &, const ITensor::Args &args={}) |
virtual void | setArguments (const std::vector< TensorPtr > &a, const ITensor::Args &args={"", 0}) |
virtual void | setArguments (const std::vector< TensorPtr > &a1, const std::vector< TensorPtr > &a2, const ITensor::Args &args={"", 0}) |
Protected Member Functions | |
virtual void | computeTensor () const =0 |
computeTensor updates the above two mutable fields, but is logically const More... | |
![]() | |
void | notImpl () const |
Protected Attributes | |
TensorVal | cachedResult |
Timestamp | m_timestamp |
![]() | |
Hypercube | m_hypercube |
Index | m_index |
Additional Inherited Members | |
![]() | |
using | Timestamp = std::chrono::time_point< std::chrono::high_resolution_clock > |
Definition at line 129 of file tensorOp.h.
|
protectedpure virtual |
computeTensor updates the above two mutable fields, but is logically const
Implemented in minsky::GeneralTensorOp< OperationType::histogram >, minsky::GeneralTensorOp< OperationType::gather >, minsky::GeneralTensorOp< OperationType::index >, minsky::GeneralTensorOp< OperationType::outerProduct >, minsky::GeneralTensorOp< OperationType::innerProduct >, minsky::GeneralTensorOp< OperationType::difference >, civita::SortByValue, and civita::Scan.
|
inlineoverridevirtual |
information describing the axes, types and labels of this tensor
Reimplemented from civita::ITensor.
Reimplemented in civita::SortByValue.
Definition at line 141 of file tensorOp.h.
References cachedResult.
|
inlineoverridevirtual |
Reimplemented from civita::ITensor.
Definition at line 142 of file tensorOp.h.
References cachedResult.
|
inlineoverridevirtual |
Reimplemented from civita::ITensor.
Definition at line 143 of file tensorOp.h.
References cachedResult.
|
inlineoverridevirtual |
the index vector - assumed to be ordered and unique
Reimplemented from civita::ITensor.
Definition at line 138 of file tensorOp.h.
References cachedResult.
|
overridevirtual |
return or compute data at a location
Implements civita::ITensor.
Definition at line 174 of file tensorOp.cc.
|
inlineoverridevirtual |
return number of elements in tensor - maybe less than hypercube.numElements if sparse
Reimplemented from civita::ITensor.
Reimplemented in civita::SortByValue.
Definition at line 139 of file tensorOp.h.
References cachedResult.
|
mutableprotected |
Definition at line 132 of file tensorOp.h.
Referenced by hypercube(), civita::SortByValue::hypercube(), index(), civita::Scan::setArgument(), size(), and civita::SortByValue::size().
|
mutableprotected |
Definition at line 133 of file tensorOp.h.
Referenced by civita::SortByValue::hypercube(), and civita::SortByValue::size().