7#ifndef __IPTRIPLETTOCSRCONVERTER_HPP__
8#define __IPTRIPLETTOCSRCONVERTER_HPP__
168 Index nonzeros_triplet,
170 Index nonzeros_compressed,
Storing the reference count of all the smart pointers that currently reference it.
Class for one triplet position entry.
void Set(Index i_row, Index j_col, Index i_pos_triplet)
Set the values of an entry.
Index IRow() const
Row position.
Index PosTriplet() const
Index in original triplet matrix.
bool operator<(const TripletEntry &Tentry) const
Comparison operator.
Index JCol() const
Column position.
Class for converting symmetric matrices given in triplet format to matrices in compressed sparse row ...
TripletToCSRConverter(const TripletToCSRConverter &)
Copy Constructor.
Index offset_
Offset for CSR numbering.
const Index * JA() const
Return the JA array for the condensed format.
void ConvertValues(Index nonzeros_triplet, const Number *a_triplet, Index nonzeros_compressed, Number *a_compressed)
Convert the values of the nonzero elements.
const Index * IA() const
Return the IA array for the condensed format.
const Index * iPosFirst() const
Index * ipos_double_compressed_
Position of multiple elements in compressed matrix.
Index * ipos_double_triplet_
Position of multiple elements in triplet matrix.
Index nonzeros_triplet_
Number of nonzeros in the triplet format.
Index nonzeros_compressed_
Number of nonzeros in the compressed format.
Index * ja_
Array storing the values for JA in the condensed format.
virtual ~TripletToCSRConverter()
Destructor.
bool initialized_
Flag indicating if initialize method had been called.
Index num_doubles_
Number of repeated entries.
Index * ia_
Array storing the values for IA in the condensed format.
Index dim_
Dimension of the matrix.
TripletToCSRConverter(Index offset, ETriFull hf=Triangular_Format)
TripletToCSRConverter()
Default Constructor.
void operator=(const TripletToCSRConverter &)
Default Assignment Operator.
ETriFull hf_
Indicator of half (ie lower only) or full (both upr and lwr) matrix.
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.
ETriFull
Enum to specify half or full matrix storage.
@ Full_Format
Store both lower and upper parts.
@ Triangular_Format
Lower (or Upper) triangular stored only.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
ipnumber Number
Type of all numbers.