18 #ifndef __ESCRIPT_DATATAGGED_H__ 19 #define __ESCRIPT_DATATAGGED_H__ 53 typedef std::vector<DataTypes::CplxVectorType::ElementType>
CplxBatchType;
97 const TagListType& tags,
102 const TagListType& tags,
222 dump(
const std::string fileName)
const;
248 getTagNumber(
int dpno);
264 getPointOffset(
int sampleNo,
265 int dataPointNo)
const;
285 addTaggedValues(
const TagListType& tagKeys,
286 const FloatBatchType& values,
307 addTaggedValues(
const TagListType& tagKeys,
327 addTaggedValue(
int tagKey,
333 addTaggedValue(
int tagKey,
365 setTaggedValue(
int tagKey,
371 setTaggedValue(
int tagKey,
410 getOffsetForTag(
int tag)
const;
429 getVectorROC()
const;
457 getTagLookup()
const;
471 isCurrentTag(
int tag)
const;
653 getDefaultOffset()
const;
674 static const int m_defaultValueOffset = 0;
687 DataMapType::const_iterator pos(m_offsetLookup.find(tag));
688 return (pos!=m_offsetLookup.end());
695 return m_defaultValueOffset;
702 return getVectorRW()[i];
709 return getVectorRO()[i];
716 return getVectorRWC()[i];
723 return getVectorROC()[i];
733 return m_offsetLookup;
740 return std::max(m_data_c.size(), m_data_r.size());
745 #endif // __ESCRIPT_DATATAGGED_H__ Definition: FunctionSpace.h:34
bool isTagged() const
Definition: DataTagged.h:152
void eigenvalues(const DataTypes::RealVectorType &in, const DataTypes::ShapeType &inShape, typename DataTypes::RealVectorType::size_type inOffset, DataTypes::RealVectorType &ev, const DataTypes::ShapeType &evShape, typename DataTypes::RealVectorType::size_type evOffset)
solves a local eigenvalue problem
Definition: DataVectorOps.h:638
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:66
ElementType & reference
Definition: DataVectorAlt.h:50
DataTypes::CplxVectorType m_data_c
Definition: DataTagged.h:678
Definition: DataReady.h:35
DataTypes::vec_size_type size_type
Definition: DataVectorAlt.h:49
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:43
Definition: AbstractContinuousDomain.cpp:22
void transpose(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataVectorOps.h:342
DataConstant stores a single data point which represents the entire function space.
Definition: DataConstant.h:37
bool isCurrentTag(int tag) const
isCurrentTag
Definition: DataTagged.h:685
std::vector< DataTypes::RealVectorType::ElementType > FloatBatchType
Definition: DataTagged.h:52
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:42
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:44
void symmetric(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset)
computes a symmetric matrix from your square matrix A: (A + transpose(A)) / 2
Definition: DataVectorOps.h:102
std::map< int, int > DataMapType
Definition: DataTagged.h:57
DataTypes::RealVectorType m_data_r
Definition: DataTagged.h:677
virtual DataTypes::RealVectorType::size_type getLength() const
getLength
Definition: DataTagged.h:738
void hermitian(const DataTypes::CplxVectorType &in, const DataTypes::ShapeType &inShape, DataTypes::CplxVectorType::size_type inOffset, DataTypes::CplxVectorType &ev, const DataTypes::ShapeType &evShape, DataTypes::CplxVectorType::size_type evOffset)
computes an hermitian matrix from your square matrix A: (A + adjoint(A)) / 2
Definition: DataVectorOps.cpp:915
DataMapType m_offsetLookup
Definition: DataTagged.h:670
DataTypes::RealVectorType::reference getDefaultValueRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0)
getDefaultValue
Definition: DataTagged.h:700
void swapaxes(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis0, int axis1)
swaps the components axis0 and axis1.
Definition: DataVectorOps.h:487
DataTypes::RealVectorType::size_type getDefaultOffset() const
Returns the offset in the structure which stores the default value.
Definition: DataTagged.h:693
DataTypes::RealVectorType::const_reference getDefaultValueRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0) const
Definition: DataTagged.h:707
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:120
std::vector< int > TagListType
Definition: DataTagged.h:51
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:53
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:29
void trace(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis_offset)
computes the trace of a matrix
Definition: DataVectorOps.h:241
DataReady parent
Definition: DataTagged.h:46
void antisymmetric(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset)
computes a antisymmetric matrix from your square matrix A: (A - transpose(A)) / 2 ...
Definition: DataVectorOps.h:151
Definition: DataAbstract.h:61
const ElementType & const_reference
Definition: DataVectorAlt.h:51
void eigenvalues_and_eigenvectors(const DataTypes::RealVectorType &in, const DataTypes::ShapeType &inShape, DataTypes::RealVectorType::size_type inOffset, DataTypes::RealVectorType &ev, const DataTypes::ShapeType &evShape, DataTypes::RealVectorType::size_type evOffset, DataTypes::RealVectorType &V, const DataTypes::ShapeType &VShape, DataTypes::RealVectorType::size_type VOffset, const double tol=1.e-13)
solves a local eigenvalue problem
Definition: DataVectorOps.h:746
const DataMapType & getTagLookup() const
getTagLookup
Definition: DataTagged.h:731
std::vector< DataTypes::CplxVectorType::ElementType > CplxBatchType
Definition: DataTagged.h:53
virtual ~DataTagged()
Destructor.
Definition: DataTagged.h:149
void antihermitian(const DataTypes::CplxVectorType &in, const DataTypes::ShapeType &inShape, typename DataTypes::CplxVectorType::size_type inOffset, DataTypes::CplxVectorType &ev, const DataTypes::ShapeType &evShape, typename DataTypes::CplxVectorType::size_type evOffset)
computes a antihermitian matrix from your square matrix A: (A - adjoint(A)) / 2
Definition: DataVectorOps.cpp:962
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:50