21 #ifndef SELDON_FILE_SPARSE_VECTOR_HXX
28 template <
class T,
class Allocator>
30 public Vector<T, VectFull, Allocator>
34 typedef typename Allocator::value_type value_type;
35 typedef typename Allocator::pointer pointer;
36 typedef typename Allocator::const_pointer const_pointer;
37 typedef typename Allocator::reference reference;
38 typedef typename Allocator::const_reference const_reference;
39 typedef typename SeldonDefaultAllocator<VectFull, int>::allocator AllocatorInt;
60 void Reallocate(
size_t i);
61 void ReallocateVector(
size_t i);
62 void Resize(
size_t i);
63 void ResizeVector(
size_t i);
64 void SetData(
size_t nz, T* data,
int* index);
65 template<
class Allocator2>
68 template<
class Allocator2>
73 reference Value(
int i);
75 const_reference Value(
int i)
const;
79 int Index(
int i)
const;
82 value_type operator() (
int i);
86 value_type operator() (
int i)
const;
87 const_reference Get(
int i)
const;
88 const_reference Val(
int i)
const;
92 template<
class T2,
class Alloc2>
96 int* GetIndex()
const;
97 size_t GetMemorySize()
const;
107 void RemoveSmallEntry(
const T0& epsilon);
108 void AddInteraction(
int i,
const T& val);
109 void AddInteractionRow(
size_t,
int*, T*,
bool already_sorted =
false);
110 template<
class Allocator0>
111 void AddInteractionRow(
size_t nb,
const Vector<int>& col,
113 bool already_sorted =
false);
115 typename ClassComplexType<T>::Treal GetNormInf()
const;
116 int GetNormInfIndex()
const;
119 void Write(
string FileName)
const;
120 void Write(ostream& FileStream)
const;
121 void WriteText(
string FileName)
const;
122 void WriteText(ostream& FileStream)
const;
123 void Read(
string FileName);
124 void Read(istream& FileStream);
125 void ReadText(
string FileName);
126 void ReadText(istream& FileStream);
131 template <
class T,
class Allocator>
139 #define SELDON_FILE_SPARSE_VECTOR_HXX