Bonmin::TMat Struct Reference

#include <BonTMatrix.hpp>

Collaboration diagram for Bonmin::TMat:

Collaboration graph
[legend]
List of all members.

Public Types

typedef vector< std::pair<
int, int > > 
RowS
 Storage for non empty rows.

Public Member Functions

 TMat ()
 Default constructor.
void freeSpace ()
 TMat (const TMat &other)
 Copy constructor.
 TMat (const CoinPackedMatrix &M, MatrixStorageType T)
 Construct from a CoinPackedMatrix.
TMatoperator= (const TMat &rhs)
 Assignment operator.
TMatoperator= (const CoinPackedMatrix &M)
 Assignment from a CoinPackedMatrix.
void resize (int nnz)
 ~TMat ()
int numNonEmptyRows ()
 Put the non-empty rows of quadratic form currently stored into indices.
const RowSnonEmptyRows () const
 Get the list of non empty row.
int numNonEmptyCols ()
 Put the non-empty rows of quadratic form currently stored into indices.
const RowSnonEmptyCols () const
 Get the list of non empty row.
const vector< int > & orderByColumns ()
 Orders current matrix by columns.
const vector< int > & orderByRows ()
 Orders current matrix by rows.
void removeDuplicates ()
 Remove the duplicated entries.
void makeQuadUpperDiag ()
 Assuming that this is representing a quadratic form.
void resizeOrdering (vector< int > &ordering, unsigned int newSize)
void create (const CoinPackedMatrix &M)
 Create the TMat from M.
void make_upper_triangular (const MatrixStorageType &T)
void make_lower_to_be_upper ()
 Assuing that this is representing the lower triangle of a symetric matrix makes it the upper triangle.
void make_full_upper_triangular ()
 Assuming that this is representing a quadratic form.

Public Attributes

int * iRow_
int * jCol_
double * value_
int nnz_
int capacity_
vector< int > columnOrdering_
vector< int > rowOrdering_
RowS nonEmptyRows_
RowS nonEmptyCols_

Classes

struct  ColumnOrder
 Structure for ordering matrix by columns. More...
struct  RowOrder
 Structure for ordering matrix by columns. More...
struct  TMatOrdering
 Structure for ordering matrix. More...

Detailed Description

Definition at line 22 of file BonTMatrix.hpp.


Member Typedef Documentation

typedef vector< std::pair< int, int> > Bonmin::TMat::RowS

Storage for non empty rows.

first is row number and second is first element in row.

Definition at line 32 of file BonTMatrix.hpp.


Constructor & Destructor Documentation

Bonmin::TMat::TMat (  )  [inline]

Default constructor.

Definition at line 35 of file BonTMatrix.hpp.

Bonmin::TMat::TMat ( const TMat other  ) 

Copy constructor.

Definition at line 15 of file BonTMatrix.cpp.

References iRow_, jCol_, nnz_, and value_.

Bonmin::TMat::TMat ( const CoinPackedMatrix &  M,
MatrixStorageType  T 
)

Construct from a CoinPackedMatrix.

Definition at line 25 of file BonTMatrix.cpp.

References create(), and make_upper_triangular().

Bonmin::TMat::~TMat (  ) 

Definition at line 95 of file BonTMatrix.cpp.

References iRow_, jCol_, and value_.


Member Function Documentation

void Bonmin::TMat::freeSpace (  )  [inline]

Definition at line 40 of file BonTMatrix.hpp.

References iRow_, jCol_, and value_.

Referenced by operator=().

TMat & Bonmin::TMat::operator= ( const TMat rhs  ) 

Assignment operator.

Definition at line 34 of file BonTMatrix.cpp.

References capacity_, columnOrdering_, freeSpace(), iRow_, jCol_, nnz_, nonEmptyCols_, nonEmptyRows_, rowOrdering_, and value_.

TMat & Bonmin::TMat::operator= ( const CoinPackedMatrix &  M  ) 

Assignment from a CoinPackedMatrix.

Definition at line 52 of file BonTMatrix.cpp.

References capacity_, columnOrdering_, create(), freeSpace(), nnz_, and rowOrdering_.

void Bonmin::TMat::resize ( int  nnz  )  [inline]

Definition at line 58 of file BonTMatrix.hpp.

References iRow_, jCol_, nnz_, Bonmin::resizeAndCopyArray(), and value_.

int Bonmin::TMat::numNonEmptyRows (  ) 

Put the non-empty rows of quadratic form currently stored into indices.

Allocate the array and returns its size.

Definition at line 104 of file BonTMatrix.cpp.

References iRow_, nnz_, nonEmptyRows_, orderByRows(), and rowOrdering_.

Referenced by Bonmin::QuadRow::initialize().

const RowS& Bonmin::TMat::nonEmptyRows (  )  const [inline]

Get the list of non empty row.

Definition at line 71 of file BonTMatrix.hpp.

References nonEmptyRows_.

Referenced by Bonmin::QuadRow::initialize(), and Bonmin::QuadRow::internal_eval_grad().

int Bonmin::TMat::numNonEmptyCols (  ) 

Put the non-empty rows of quadratic form currently stored into indices.

Allocate the array and returns its size.

Definition at line 123 of file BonTMatrix.cpp.

References columnOrdering_, jCol_, nnz_, nonEmptyCols_, and orderByColumns().

Referenced by Bonmin::QuadRow::initialize().

const RowS& Bonmin::TMat::nonEmptyCols (  )  const [inline]

Get the list of non empty row.

Definition at line 78 of file BonTMatrix.hpp.

References nonEmptyCols_.

Referenced by Bonmin::QuadRow::initialize(), and Bonmin::QuadRow::internal_eval_grad().

const vector<int>& Bonmin::TMat::orderByColumns (  )  [inline]

Orders current matrix by columns.

Definition at line 118 of file BonTMatrix.hpp.

References columnOrdering_, nnz_, and resizeOrdering().

Referenced by numNonEmptyCols().

const vector<int>& Bonmin::TMat::orderByRows (  )  [inline]

Orders current matrix by rows.

Definition at line 124 of file BonTMatrix.hpp.

References nnz_, resizeOrdering(), and rowOrdering_.

Referenced by numNonEmptyRows(), and removeDuplicates().

void Bonmin::TMat::removeDuplicates (  ) 

Remove the duplicated entries.

Definition at line 139 of file BonTMatrix.cpp.

References capacity_, iRow_, jCol_, nnz_, orderByRows(), Bonmin::resizeAndCopyArray(), rowOrdering_, and value_.

Referenced by make_full_upper_triangular().

void Bonmin::TMat::makeQuadUpperDiag (  ) 

Assuming that this is representing a quadratic form.

Produce equivalent quadratic form with only upper triange stored.

void Bonmin::TMat::resizeOrdering ( vector< int > &  ordering,
unsigned int  newSize 
) [inline]

Definition at line 137 of file BonTMatrix.hpp.

Referenced by orderByColumns(), and orderByRows().

void Bonmin::TMat::create ( const CoinPackedMatrix &  M  ) 

Create the TMat from M.

Definition at line 61 of file BonTMatrix.cpp.

References capacity_, iRow_, jCol_, k, nnz_, and value_.

Referenced by operator=(), and TMat().

void Bonmin::TMat::make_upper_triangular ( const MatrixStorageType T  ) 

Definition at line 160 of file BonTMatrix.cpp.

References Bonmin::Full, iRow_, jCol_, Bonmin::Lower, make_full_upper_triangular(), make_lower_to_be_upper(), nnz_, and Bonmin::Upper.

Referenced by Bonmin::QuadRow::operator=(), and TMat().

void Bonmin::TMat::make_lower_to_be_upper (  ) 

Assuing that this is representing the lower triangle of a symetric matrix makes it the upper triangle.

Definition at line 185 of file BonTMatrix.cpp.

References iRow_, and jCol_.

Referenced by make_upper_triangular().

void Bonmin::TMat::make_full_upper_triangular (  ) 

Assuming that this is representing a quadratic form.

Makes it upper diagonal.

Definition at line 193 of file BonTMatrix.cpp.

References iRow_, jCol_, nnz_, removeDuplicates(), and value_.

Referenced by make_upper_triangular().


Member Data Documentation

int* Bonmin::TMat::iRow_

Definition at line 23 of file BonTMatrix.hpp.

Referenced by Bonmin::QuadRow::add_to_hessian(), create(), freeSpace(), Bonmin::QuadRow::initialize(), Bonmin::QuadRow::internal_eval_grad(), make_full_upper_triangular(), make_lower_to_be_upper(), make_upper_triangular(), numNonEmptyRows(), Bonmin::TMat::RowOrder::operator()(), Bonmin::TMat::ColumnOrder::operator()(), operator=(), removeDuplicates(), resize(), TMat(), and ~TMat().

int* Bonmin::TMat::jCol_

Definition at line 24 of file BonTMatrix.hpp.

Referenced by Bonmin::QuadRow::add_to_hessian(), create(), freeSpace(), Bonmin::QuadRow::initialize(), Bonmin::QuadRow::internal_eval_grad(), make_full_upper_triangular(), make_lower_to_be_upper(), make_upper_triangular(), numNonEmptyCols(), Bonmin::TMat::RowOrder::operator()(), Bonmin::TMat::ColumnOrder::operator()(), operator=(), removeDuplicates(), resize(), TMat(), and ~TMat().

double* Bonmin::TMat::value_

Definition at line 25 of file BonTMatrix.hpp.

Referenced by create(), Bonmin::QuadRow::eval_hessian(), freeSpace(), Bonmin::QuadRow::internal_eval_grad(), make_full_upper_triangular(), operator=(), removeDuplicates(), resize(), TMat(), and ~TMat().

int Bonmin::TMat::nnz_

Definition at line 26 of file BonTMatrix.hpp.

Referenced by Bonmin::QuadRow::add_to_hessian(), create(), Bonmin::QuadRow::eval_hessian(), Bonmin::QuadRow::initialize(), Bonmin::QuadRow::isLinear(), make_full_upper_triangular(), make_upper_triangular(), Bonmin::QuadRow::nnz_hessian(), numNonEmptyCols(), numNonEmptyRows(), operator=(), orderByColumns(), orderByRows(), Bonmin::QuadRow::remove_from_hessian(), removeDuplicates(), resize(), and TMat().

int Bonmin::TMat::capacity_

Definition at line 27 of file BonTMatrix.hpp.

Referenced by create(), operator=(), and removeDuplicates().

vector<int> Bonmin::TMat::columnOrdering_

Definition at line 147 of file BonTMatrix.hpp.

Referenced by Bonmin::QuadRow::internal_eval_grad(), numNonEmptyCols(), operator=(), and orderByColumns().

vector<int> Bonmin::TMat::rowOrdering_

Definition at line 149 of file BonTMatrix.hpp.

Referenced by Bonmin::QuadRow::internal_eval_grad(), numNonEmptyRows(), operator=(), orderByRows(), and removeDuplicates().

RowS Bonmin::TMat::nonEmptyRows_

Definition at line 158 of file BonTMatrix.hpp.

Referenced by nonEmptyRows(), numNonEmptyRows(), and operator=().

RowS Bonmin::TMat::nonEmptyCols_

Definition at line 161 of file BonTMatrix.hpp.

Referenced by nonEmptyCols(), numNonEmptyCols(), and operator=().


The documentation for this struct was generated from the following files:
Generated on Thu Aug 5 03:12:21 2010 by  doxygen 1.4.7