18 #ifndef __ESCRIPT_DATATAGGED_H__ 19 #define __ESCRIPT_DATATAGGED_H__ 86 const ValueType& data);
102 const TagListType& tags,
103 const ValueType& data);
160 replaceNaN(
double value);
184 getSampleDataByTag(
int tag);
202 dump(
const std::string fileName)
const;
228 getTagNumber(
int dpno);
244 getPointOffset(
int sampleNo,
245 int dataPointNo)
const;
249 getPointOffset(
int sampleNo,
270 addTaggedValues(
const TagListType& tagKeys,
271 const ValueBatchType& values,
292 addTaggedValues(
const TagListType& tagKeys,
293 const ValueType& values,
312 addTaggedValue(
int tagKey,
314 const ValueType& value,
343 setTaggedValue(
int tagKey,
345 const ValueType& value,
376 getOffsetForTag(
int tag)
const;
401 getTagLookup()
const;
415 isCurrentTag(
int tag)
const;
572 getDefaultOffset()
const;
590 static const int m_defaultValueOffset = 0;
602 DataMapType::const_iterator pos(m_offsetLookup.find(tag));
603 return (pos!=m_offsetLookup.end());
610 return m_defaultValueOffset;
617 return getVectorRW()[i];
624 return getVectorRO()[i];
631 return m_offsetLookup;
638 return m_data.size();
643 #endif // __ESCRIPT_DATATAGGED_H__ Definition: FunctionSpace.h:34
DataVector implements an arbitrarily long vector of data values. DataVector is the underlying data co...
Definition: DataVector.h:44
bool isCurrentTag(int tag) const
isCurrentTag
Definition: DataTagged.h:600
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:67
DataTypes::ValueType::size_type getDefaultOffset() const
Returns the offset in the structure which stores the default value.
Definition: DataTagged.h:608
ValueType m_data
Definition: DataTagged.h:594
Definition: DataReady.h:35
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:39
Definition: AbstractContinuousDomain.cpp:24
int getLength(const escript::Data *data)
Definition: DataC.cpp:92
void transpose(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataMaths.h:394
DataConstant stores a single data point which represents the entire function space.
Definition: DataConstant.h:37
const DataMapType & getTagLookup() const
getTagLookup
Definition: DataTagged.h:629
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:38
void swapaxes(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis0, int axis1)
swaps the components axis0 and axis1.
Definition: DataMaths.h:538
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:44
void eigenvalues(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
solves a local eigenvalue problem
Definition: DataMaths.h:689
void symmetric(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
computes a symmetric matrix from your square matrix A: (A + transpose(A)) / 2
Definition: DataMaths.h:197
std::vector< ValueType::ElementType > ValueBatchType
Definition: DataTagged.h:53
bool isTagged() const
Definition: DataTagged.h:145
std::map< int, int > DataMapType
Definition: DataTagged.h:57
const ElementType & const_reference
Definition: DataVector.h:62
DataMapType m_offsetLookup
Definition: DataTagged.h:586
virtual ValueType::size_type getLength() const
getLength
Definition: DataTagged.h:636
void eigenvalues_and_eigenvectors(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, DataTypes::ValueType &V, const DataTypes::ShapeType &VShape, DataTypes::ValueType::size_type VOffset, const double tol=1.e-13)
solves a local eigenvalue problem
Definition: DataMaths.h:750
DataTypes::ValueType::reference getDefaultValueRW(DataTypes::ValueType::size_type i)
getDefaultValue
Definition: DataTagged.h:615
DataTypes::ValueType::const_reference getDefaultValueRO(DataTypes::ValueType::size_type i) const
Definition: DataTagged.h:622
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:120
std::vector< int > TagListType
Definition: DataTagged.h:51
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54
ElementType & reference
Definition: DataVector.h:61
DataReady parent
Definition: DataTagged.h:46
Definition: DataAbstract.h:61
void nonsymmetric(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
computes a nonsymmetric matrix from your square matrix A: (A - transpose(A)) / 2
Definition: DataMaths.h:246
DataTypes::ValueType ValueType
Definition: DataTagged.h:52
long size_type
Definition: DataVector.h:60
virtual ~DataTagged()
Destructor.
Definition: DataTagged.h:142
void trace(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset)
computes the trace of a matrix
Definition: DataMaths.h:295