DGtal 1.4.0
Loading...
Searching...
No Matches
testEigenSolver.cpp File Reference
#include <iostream>
#include <vector>
#include <list>
#include "DGtal/base/Common.h"
#include "ConfigTest.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/math/linalg/CLinearAlgebraSolver.h"
#include "DGtal/math/linalg/CSparseMatrix.h"
#include "DGtal/math/linalg/CDynamicMatrix.h"
#include "DGtal/math/linalg/CDenseVector.h"
#include "DGtal/math/linalg/CDynamicVector.h"
#include "DGtal/math/linalg/EigenSupport.h"
Include dependency graph for testEigenSolver.cpp:

Go to the source code of this file.

Functions

bool testEigenSolverConcepts ()
 
int main (int argc, char **argv)
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Pierre Gueth (pierr.nosp@m.e.gu.nosp@m.eth@l.nosp@m.iris.nosp@m..cnrs.nosp@m..fr ) Laboratoire d'InfoRmatique en Image et Systemes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
Date
2014/03/26

Functions for testing class EigenSolver.

This file is part of the DGtal library.

Definition in file testEigenSolver.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 81 of file testEigenSolver.cpp.

82{
83 trace.beginBlock ( "Testing class EigenSolver" );
84 trace.info() << "Args:";
85 for ( int i = 0; i < argc; ++i )
86 trace.info() << " " << argv[ i ];
87 trace.info() << endl;
88
89 bool res = testEigenSolverConcepts();
90 trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
92 return res ? 0 : 1;
93}
void beginBlock(const std::string &keyword="")
std::ostream & emphase()
std::ostream & info()
double endBlock()
Trace trace
Definition Common.h:153
bool testEigenSolverConcepts()

References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testEigenSolverConcepts(), and DGtal::trace.

◆ testEigenSolverConcepts()

bool testEigenSolverConcepts ( )

Test eigen linear algebra concepts

Definition at line 55 of file testEigenSolver.cpp.

56{
57 typedef EigenLinearAlgebraBackend LAB;
58 typedef LAB::DenseVector Vector;
59 typedef LAB::SparseMatrix Matrix;
60 typedef LAB::Triplet Triplet;
61 typedef std::vector<Triplet> TripletsVector;
62 typedef std::list<Triplet> TripletsList;
63 BOOST_CONCEPT_ASSERT(( concepts::CDynamicVector<Vector> ));
64 BOOST_CONCEPT_ASSERT(( concepts::CDenseVector<Vector> ));
65 BOOST_CONCEPT_ASSERT(( concepts::CDynamicMatrix<Matrix> ));
74
75 return true;
76}
DigitalPlane::Point Vector
Aim: Provide linear algebra backend using Eigen dense and sparse matrix as well as dense vector....
Aim: Represent any dynamic or static sized matrix having dense representation.
Aim: Represent any dynamic sized matrix having sparse or dense representation.
Aim: Represent any dynamic sized column vector having sparse or dense representation.
Aim: Describe a linear solver defined over a linear algebra. Problems are of the form:
Aim: Represent any dynamic or static sized matrix having sparse representation.

Referenced by main().