Go to the documentation of this file.
7 #ifndef __IPTRIPLETTOCSRCONVERTER_HPP__
8 #define __IPTRIPLETTOCSRCONVERTER_HPP__
168 Index nonzeros_triplet,
170 Index nonzeros_compressed,
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.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
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.
@ Full_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 assignment.
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.
TripletToCSRConverter(const TripletToCSRConverter &)
Copy Constructor.
@ Triangular_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 ...
TripletToCSRConverter(Index offset, ETriFull hf=Triangular_Format)
void operator=(const TripletToCSRConverter &)
Default Assignment Operator.
ETriFull
Enum to specify 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.
Storing the reference count of all the smart pointers that currently reference it.
void ConvertValues(Index nonzeros_triplet, const Number *a_triplet, Index nonzeros_compressed, Number *a_compressed)
Convert the values of the nonzero elements.