Go to the documentation of this file.
9 #ifndef __IPTRIPLETTOCSRCONVERTER_HPP__
10 #define __IPTRIPLETTOCSRCONVERTER_HPP__
bool initialized_
Flag indicating if initialize method had been called.
Class for one triplet position entry.
Index PosTriplet() const
Index in original triplet matrix.
Index JCol() const
Column position.
virtual ~TripletToCSRConverter()
Destructor.
bool operator<(const TripletEntry &Tentry) const
Comparison operator.
double Number
Type of all numbers.
Index * ja_
Array storing the values for JA in the condensed format.
Index nonzeros_triplet_
Number of nonzeros in the triplet format.
const Index * IA() const
Return the IA array for the condensed format.
Store both lower and upper parts.
Index InitializeConverter(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Initialize the converter, given the fixed structure of the matrix.
Index * ipos_first_
First elements assignement.
int Index
Type of all indices of vectors, matrices etc.
Index * ipos_double_compressed_
Position of multiple elements in compressed matrix.
Index * ia_
Array storing the values for IA in the condensed format.
Lower (or Upper) triangular stored only.
Index IRow() const
Row position.
Class for converting symmetric matrices given in triplet format to matrices in compressed sparse row ...
void operator=(const TripletToCSRConverter &)
Overloaded Equals Operator.
ETriFull
Enum to specifiy half or full matrix storage.
TripletToCSRConverter()
Default Constructor.
Index offset_
Offset for CSR numbering.
const Index * JA() const
Return the JA array for the condensed format.
const Index * iPosFirst() const
void Set(Index i_row, Index j_col, Index i_pos_triplet)
Set the values of an entry.
Index num_doubles_
Number of repeated entries.
ETriFull hf_
Indicator of half (ie lower only) or full (both upr and lwr) matrix.
Index * ipos_double_triplet_
Position of multiple elements in triplet matrix.
Index dim_
Dimension of the matrix.
Index nonzeros_compressed_
Number of nonzeros in the compressed format.
void ConvertValues(Index nonzeros_triplet, const Number *a_triplet, Index nonzeros_compressed, Number *a_compressed)
Convert the values of the nonzero elements.