20 #ifndef SELDON_FILE_VECTOR_HXX
22 #include "../share/Common.hxx"
23 #include "../share/Properties.hxx"
24 #include "../share/Storage.hxx"
25 #include "../share/Errors.hxx"
26 #include "../share/Allocator.hxx"
27 #include "VectorExpression.hxx"
38 template <
class T,
class Allocator
39 =
typename SeldonDefaultAllocator<VectFull, T>::allocator>
41 public VectorExpression<T, Vector<T, VectFull, Allocator> >
45 typedef typename Allocator::value_type value_type;
46 typedef typename Allocator::pointer pointer;
47 typedef typename Allocator::const_pointer const_pointer;
48 typedef typename Allocator::reference reference;
49 typedef typename Allocator::const_reference const_reference;
50 typedef Allocator allocator;
87 template <
class T,
class Allocator>
92 typedef typename Allocator::value_type value_type;
93 typedef typename Allocator::pointer pointer;
94 typedef typename Allocator::const_pointer const_pointer;
95 typedef typename Allocator::reference reference;
96 typedef typename Allocator::const_reference const_reference;
107 explicit Vector(
size_t i);
108 Vector(
size_t i, pointer data);
116 void Reallocate(
size_t i);
117 void ReallocateVector(
size_t i);
118 void Resize(
size_t i);
119 void ResizeVector(
size_t i);
120 void SetData(
size_t i, pointer data);
121 template <
class Allocator0>
126 reference operator() (
long i);
127 reference Get(
long i);
129 const_reference operator() (
long i)
const;
130 const_reference Get(
long i)
const;
136 void Append(
const T& x);
139 void PushBack(
const T0& x);
141 template<
class Allocator0>
145 size_t GetDataSize();
151 void Fill(
const T0& x);
172 typename ClassComplexType<T>::Treal GetNormInf()
const;
173 long GetNormInfIndex()
const;
176 void Write(
string FileName,
bool with_size =
true)
const;
177 void Write(ostream& FileStream,
bool with_size =
true)
const;
178 void WriteText(
string FileName)
const;
179 void WriteText(ostream& FileStream)
const;
180 #ifdef SELDON_WITH_HDF5
181 void WriteHDF5(
string FileName,
string group_name,
182 string dataset_name)
const;
184 void Read(
string FileName,
bool with_size =
true);
185 void Read(istream& FileStream,
bool with_size =
true);
186 void ReadText(
string FileName);
187 void ReadText(istream& FileStream);
191 template <
class T,
class Storage,
class Allocator>
199 #define SELDON_FILE_VECTOR_HXX