12template<
typename T,
int Dim = 1>
17 static_assert(Dim > 0,
"only positive Dim allowed");
18 static_assert(Dim <= MaxDim,
"Dim too large");
35 double value(
Index idx,
int c = 0)
const override;
46 return Dim > 1 ? *
d()->
x[1] :
x();
51 return Dim > 2 ? *
d()->
x[2] :
x();
56 return Dim > 3 ? *
d()->
x[3] :
x();
59 const T *
x(
int c = 0)
const {
return m_x[c]; }
63 return Dim > 1 ? m_x[1] :
x();
68 return Dim > 2 ? m_x[2] :
x();
73 return Dim > 3 ? m_x[3] :
x();
77 std::pair<Vector, Vector>
getMinMax()
const;
80 mutable const T *m_x[MaxDim];
103 template<
class Archive>
107 void invalidateBounds();
108 bool boundsValid()
const;
113#define V_VEC_TEMPLATE(ValueType) \
114 extern template class V_COREEXPORT Vec<ValueType, 1>; \
115 V_OBJECT_DECL(Vec<ValueType V_VEC_COMMA 1>) \
116 extern template class V_COREEXPORT Vec<ValueType, 2>; \
117 V_OBJECT_DECL(Vec<ValueType V_VEC_COMMA 2>) \
118 extern template class V_COREEXPORT Vec<ValueType, 3>; \
119 V_OBJECT_DECL(Vec<ValueType V_VEC_COMMA 3>) \
#define ARCHIVE_ACCESS
Definition: archives_config.h:465
Definition: database.h:14
std::shared_ptr< const Object > const_ptr
Definition: object.h:68
Data * d() const
Definition: object.h:211
const Meta & meta() const
Definition: object.cpp:390
Type
Definition: object.h:84
@ UNKNOWN
Definition: object.h:89
void setValue(Index idx, int component, const double &value) override
Definition: vec_template.h:70
Index getSize() override
Definition: vec.h:28
bool copyEntry(Index to, DataBase::const_ptr src, Index from) override
Definition: vec_template.h:56
const T * w() const
Definition: vec.h:70
void applyDimensionHint(Object::const_ptr grid) override
Definition: vec_template.h:86
int dimension() const override
Definition: vec.h:31
array & w()
Definition: vec.h:53
double value(Index idx, int c=0) const override
Definition: vec_template.h:78
void updateInternals() override
Definition: vec_template.h:154
shm< T >::array array
Definition: vec.h:22
array & y()
Definition: vec.h:43
Vec(const Index size, const Meta &meta=Meta())
Definition: vec_template.h:15
VistleVector< Scalar, Dim > Vector
Definition: vec.h:24
const T * z() const
Definition: vec.h:65
void resetArrays() override
Definition: vec_template.h:33
array & z()
Definition: vec.h:48
T Scalar
Definition: vec.h:23
array & x(int c=0)
Definition: vec.h:42
void setSize(const Index size) override
Definition: vec_template.h:43
DataBase Base
Definition: vec.h:17
void setExact(bool exact) override
Definition: vec_template.h:106
std::pair< Vector, Vector > getMinMax() const
Definition: vec_template.h:161
const T * y() const
Definition: vec.h:60
Index getSize() const override
Definition: vec.h:29
const T * x(int c=0) const
Definition: vec.h:59
Definition: shm_reference.h:15
Definition: shm_array.h:19
void serialize(Archive &ar, vistle::Vector1 &v, const unsigned int version)
Definition: vector.h:105
Definition: allobjects.cpp:30
Eigen::Matrix< T, d, 1 > VistleVector
Definition: vector.h:18
const int MaxDimension
Definition: dimensions.h:11
uint32_t Index
Definition: index.h:13
Meta meta
Definition: object.h:238
const shm_name_t name
Definition: shmdata.h:41
static Data * createNamed(Object::Type id, const std::string &name, const Meta &meta=Meta())
Definition: vec_template.h:291
Vector min
Definition: vec.h:85
static Data * create(Index size=0, const Meta &meta=Meta())
Definition: vec_template.h:272
Data(const Index size=0, const std::string &name="", const Meta &meta=Meta())
Definition: vec_template.h:234
ShmVector< T > x[Dim]
Definition: vec.h:87
void setExact(bool exact)
Definition: vec_template.h:226
Vector max
Definition: vec.h:86
#define V_VEC_TEMPLATE(ValueType)
Definition: vec.h:113