|
Minsky: 3.17.0
|
Interpolates its argument to its hypercube rank must equal arg->rank(), and xvectors type must match. More...
#include <interpolateHypercube.h>


Classes | |
| struct | WeightedIndex |
| structure for referring to an argument index and its weight More... | |
| struct | WeightedIndexVector |
Public Member Functions | |
| void | setArgument (const TensorPtr &a, const ITensor::Args &args={"", 0}) override |
| double | operator[] (std::size_t) const override |
| return or compute data at a location More... | |
| Timestamp | timestamp () const override |
| timestamp indicating how old the dependendent data might be. Used in CachedTensorOp to determine when to invalidate the cache More... | |
Public Member Functions inherited from civita::ITensor | |
| 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 () |
| virtual const Hypercube & | hypercube () const |
| information describing the axes, types and labels of this tensor More... | |
| virtual const Hypercube & | hypercube (const Hypercube &hc) |
| virtual const Hypercube & | hypercube (Hypercube &&hc) |
| std::size_t | rank () const |
| std::vector< unsigned > | shape () const |
| void | imposeDimensions (const Dimensions &dimensions) |
| impose dimensions according to dimension map dimensions More... | |
| virtual const Index & | index () const |
| the index vector - assumed to be ordered and unique More... | |
| virtual std::size_t | size () const |
| return number of elements in tensor - maybe less than hypercube.numElements if sparse 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 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}) |
Private Member Functions | |
| void | sortAndAdd (const XVector &) |
| vector< std::size_t > | splitAndRotate (std::size_t) const |
| WeightedIndexVector | bodyCentredNeighbourhood (std::size_t idx) const |
| computes the neighbourhood around a target argument index when the target index is not on the hypercube More... | |
Private Attributes | |
| TensorPtr | arg |
| Hypercube | interimHC |
| hypercube that's been rotated to match the arguments hypercube More... | |
| std::vector< std::size_t > | strides |
| strides along each dimension of this->hypercube() More... | |
| std::vector< std::size_t > | rotation |
| permutation of axes of interimHC and this->hypercube() More... | |
| std::vector< std::pair< XVector, std::vector< std::size_t > > > | sortedArgHC |
| vector< WeightedIndexVector > | weightedIndices |
| map from this tensor's index into the argument tensor More... | |
Additional Inherited Members | |
Public Types inherited from civita::ITensor | |
| using | Timestamp = std::chrono::time_point< std::chrono::high_resolution_clock > |
Protected Member Functions inherited from civita::ITensor | |
| void | notImpl () const |
Protected Attributes inherited from civita::ITensor | |
| Hypercube | m_hypercube |
| Index | m_index |
Interpolates its argument to its hypercube rank must equal arg->rank(), and xvectors type must match.
Definition at line 29 of file interpolateHypercube.h.
|
private |
computes the neighbourhood around a target argument index when the target index is not on the hypercube
Definition at line 140 of file interpolateHypercube.cc.
References arg, civita::ITensor::index(), interimHC, civita::ITensor::rank(), anonymous_namespace{interpolateHypercube.cc}::sorted(), sortedArgHC, and splitAndRotate().
Referenced by setArgument().


|
overridevirtual |
return or compute data at a location
Implements civita::ITensor.
Definition at line 124 of file interpolateHypercube.cc.
References arg, and weightedIndices.
|
overridevirtual |
Reimplemented from civita::ITensor.
Definition at line 49 of file interpolateHypercube.cc.
References arg, bodyCentredNeighbourhood(), civita::ITensor::hypercube(), civita::ITensor::index(), interimHC, civita::ITensor::rank(), rotation, civita::ITensor::size(), sortAndAdd(), strides, and weightedIndices.

|
private |
Definition at line 109 of file interpolateHypercube.cc.
References anonymous_namespace{interpolateHypercube.cc}::sorted(), and sortedArgHC.
Referenced by setArgument().


|
private |
Definition at line 39 of file interpolateHypercube.cc.
References civita::ITensor::hcIndex(), civita::ITensor::hypercube(), civita::ITensor::rank(), rotation, and strides.
Referenced by bodyCentredNeighbourhood().


|
inlineoverridevirtual |
timestamp indicating how old the dependendent data might be. Used in CachedTensorOp to determine when to invalidate the cache
Implements civita::ITensor.
Definition at line 66 of file interpolateHypercube.h.
|
private |
Definition at line 31 of file interpolateHypercube.h.
Referenced by bodyCentredNeighbourhood(), operator[](), and setArgument().
|
private |
hypercube that's been rotated to match the arguments hypercube
Definition at line 33 of file interpolateHypercube.h.
Referenced by bodyCentredNeighbourhood(), and setArgument().
|
private |
permutation of axes of interimHC and this->hypercube()
Definition at line 35 of file interpolateHypercube.h.
Referenced by setArgument(), and splitAndRotate().
|
private |
Definition at line 37 of file interpolateHypercube.h.
Referenced by bodyCentredNeighbourhood(), and sortAndAdd().
|
private |
strides along each dimension of this->hypercube()
Definition at line 34 of file interpolateHypercube.h.
Referenced by setArgument(), and splitAndRotate().
|
private |
map from this tensor's index into the argument tensor
Definition at line 57 of file interpolateHypercube.h.
Referenced by operator[](), and setArgument().