Go to the documentation of this file.
20 #ifndef UBLAS_INTERFACE_HH
21 #define UBLAS_INTERFACE_HH
23 #include <boost/numeric/ublas/vector.hpp>
24 #include <boost/numeric/ublas/matrix.hpp>
25 #include <boost/numeric/ublas/io.hpp>
26 #include <boost/numeric/ublas/triangular.hpp>
28 using namespace boost::numeric;
40 typedef typename boost::numeric::ublas::matrix<real,boost::numeric::ublas::column_major>
gene_matrix;
41 typedef typename boost::numeric::ublas::vector<real>
gene_vector;
43 static inline std::string
name(
void ) {
return "ublas"; }
50 A.resize(A_stl.size(),A_stl[0].size());
51 for (
int j=0;
j<A_stl.size() ;
j++)
52 for (
int i=0;
i<A_stl[
j].size() ;
i++)
57 B.resize(B_stl.size());
58 for (
int i=0;
i<B_stl.size() ;
i++)
63 for (
int i=0;
i<B_stl.size() ;
i++)
78 for (
int i=0;
i<
N;
i++){
84 for (
int i=0;
i<
N;
i++){
85 for (
int j=0;
j<
N;
j++){
86 cible(
i,
j) = source(
i,
j);
118 Y.plus_assign(coef*
X);
136 X = solve(
L,
B, ublas::lower_tag ());
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
static void matrix_vector_product_slow(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
static void axpy_slow(const real coef, const gene_vector &X, gene_vector &Y, int N)
static void axpby(real a, const gene_vector &X, real b, gene_vector &Y, int N)
GaussianFactorGraphValuePair Y
static void matrix_vector_product(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
std::vector< real > stl_vector
static void trisolve_lower(const gene_matrix &L, const gene_vector &B, gene_vector &X, int N)
static void vector_from_stl(gene_vector &B, stl_vector &B_stl)
static void matrix_to_stl(gene_matrix &A, stl_matrix &A_stl)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
static std::string name(void)
static void atv_product(gene_matrix &A, gene_vector &B, gene_vector &X, int N)
static void copy_vector(const gene_vector &source, gene_vector &cible, int N)
static void free_matrix(gene_matrix &A, int N)
static void copy_matrix(const gene_matrix &source, gene_matrix &cible, int N)
std::vector< stl_vector > stl_matrix
static void matrix_matrix_product_slow(gene_matrix &A, gene_matrix &B, gene_matrix &X, int N)
static void ata_product(gene_matrix &A, gene_matrix &X, int N)
static void vector_to_stl(gene_vector &B, stl_vector &B_stl)
static void matrix_matrix_product(gene_matrix &A, gene_matrix &B, gene_matrix &X, int N)
static void matrix_from_stl(gene_matrix &A, stl_matrix &A_stl)
static void aat_product(gene_matrix &A, gene_matrix &X, int N)
boost::numeric::ublas::vector< real > gene_vector
boost::numeric::ublas::matrix< real, boost::numeric::ublas::column_major > gene_matrix
EIGEN_DONT_INLINE void prod(const Lhs &a, const Rhs &b, Res &c)
static void free_vector(gene_vector &B)
static void axpy(const real coef, const gene_vector &X, gene_vector &Y, int N)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:37