Skip to content

Commit

Permalink
Sparse matrices (#69)
Browse files Browse the repository at this point in the history
* initial work on sparse matrix representation

* store/restore functionality

* addLastRow functionality

* getRow and getColumn

* column-merging functionality

* added an interface class

* introducing also sparse vectors

* added addLastColumn functionality

* another unittest

* get sparse columns/matrices in dense form

* WIP on storing the constraint matrix inside the tableau in sparse form

* more WIP, fixed a few bugs, still have a couple of failing tests

* fixed some test issues

* initialization

* resize _a along with the rest

* sparse lu factors

* store also the transposed versions of F and V

* starting work on the sparse GE

* some work on changing the values within an existing sparse
representation, needed for sparse factorization.
still WIP

* refactoring and new functionality for CSRMatrix: any kind of
insertions and deletions

* support for empty initialization and counting elements

* sparse GE is now working. minor bug fixes elsewhere

* compute Ft and Vt as part of the G-elimination process

* tests

* basis oracles can return also sparse columns, not just dense

* sparse LU factorization class

* switch to using the sparse factorization in the engine/tableau

* bug fix in mergeColumns, and nicer printing

* bug fix

* bug fix

* bug fix: merging columns does not delete the actual column, just
leaves it empty

* configuration changes

* optimization: since the sparse columns of A are needed all the time,
just compute them once-and-for-all

* a more efficient implementation of sparse vectors

* comments and unit tests

* cleanup
  • Loading branch information
guykatzz authored Jul 12, 2018
1 parent ea63029 commit f479f2f
Show file tree
Hide file tree
Showing 53 changed files with 5,716 additions and 525 deletions.
4 changes: 4 additions & 0 deletions src/basis_factorization/BasisFactorizationFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
#include "ForrestTomlinFactorization.h"
#include "GlobalConfiguration.h"
#include "LUFactorization.h"
#include "SparseLUFactorization.h"

IBasisFactorization *BasisFactorizationFactory::createBasisFactorization( unsigned basisSize, const IBasisFactorization::BasisColumnOracle &basisColumnOracle )
{
if ( GlobalConfiguration::BASIS_FACTORIZATION_TYPE ==
GlobalConfiguration::LU_FACTORIZATION )
return new LUFactorization( basisSize, basisColumnOracle );
if ( GlobalConfiguration::BASIS_FACTORIZATION_TYPE ==
GlobalConfiguration::SPARSE_LU_FACTORIZATION )
return new SparseLUFactorization( basisSize, basisColumnOracle );
else if ( GlobalConfiguration::BASIS_FACTORIZATION_TYPE ==
GlobalConfiguration::FORREST_TOMLIN_FACTORIZATION )
return new ForrestTomlinFactorization( basisSize, basisColumnOracle );
Expand Down
Loading

0 comments on commit f479f2f

Please sign in to comment.