Questions tagged [boost-ublas]

A Boost C++ library directed towards scientific computing on the level of basic linear algebra constructions with matrices and vectors and their corresponding abstract operations.

50 questions
1
vote
1 answer

Using boost's LU-solver but avoid computing a matrix inverse?

I am solving system of linear equations in C++ using the LU decomposition as provided by Boost. static void boostLU(const boost::numeric::ublas::matrix &A, const boost::numeric::ublas::matrix &y) { …
bogus
  • 867
  • 6
  • 14
  • 24
1
vote
1 answer

How to adapt a boost::property_map in order to use it like a ublas::vector?

I am looking for a smart way to use the Boost Graph Library in conjunction with Boost uBLAS. More precisely, I need to update a given vertex property for each vertex by using the result of the scalar product between the graphs adjacency matrix and a…
mtd
  • 123
  • 7
1
vote
0 answers

How to perform an operation on a subset of elements in a Boost::uBlas::vector?

Suppose you have a long boost::numeric::ublas::vector and you want to perform an update operation on a subset of the elements. How many of the elements should be updated is somewhere between "all" or "none". Which elements to update is given by a…
user20948
  • 11
  • 1
1
vote
0 answers

Boost matrix product for multiprecision numbers

I am trying to implement some high precision calculations in C++ using Boost.Multiprecision and Boost.uBLAS, in VS 2010 Express. However even in the simplest case my code fails to compile, giving the following error: error C2677: binary '+=' : no…
daimoz
  • 11
  • 2
0
votes
2 answers

boost, matrix_proxy, const matrix

Giving this: void foo(const matrix& lol) { matrix_row > lolwut(lol, 5); } error: no matching function for call to ‘boost::numeric::ublas::matrix_row >::matrix_row(const…
0
votes
1 answer

Solving (dense) linear system Ax=b using boost

I have a dense system of equations of type Ax=b to solve in my C++ program, and I was hoping to implement the solution using UBLAS in boost. In some other questions I found that people were using the extension LAPACK, but unfortunately it doesn't…
Grzenio
  • 35,875
  • 47
  • 158
  • 240
0
votes
1 answer

Use of vector_expression directly in Boost.uBLAS

We have a performance issue where an expression is first translated to a Boost.uBLAS vector and then evaluated. It makes a difference if the vector creation could be skipped and that the vector_expression is used directly. I couldn't find in the…
gast128
  • 1,223
  • 12
  • 22
0
votes
1 answer

What is wrong with passing a function that returns a vector by value as argument of ublas::element_prod()?

I cannot seem to understand why passing directly a function as argument to ublas::element_prod() produces a wrong result. If I run the following code: #include #include #include…
0
votes
2 answers

typedef a vector and boost::numeric::ublas::vector of fixed size

I mean to typedef a name for a vector / boost vector with fixed size, and then for corresponding iterators. What I could do is (see below) typedef std::array point_3d_array; typedef point_3d_array::iterator point_3d_iterator; typedef…
0
votes
1 answer

Disable warning log in boost::ublas

While inverting a matrix with boost::ublas I sometimes get this error in the log: Check failed in file /usr/include/boost/numeric/ublas/lu.hpp at line 298: detail::expression_type_check (prod (triangular_adaptor (m), e), cm2) I am aware this…
user2891462
  • 3,033
  • 2
  • 32
  • 60
0
votes
1 answer

Program takes (a lot) longer than it should due to a function call that never runs

I'm currently running Bayesian Optimization, written in c++. I use a toolbox call Bayesopt from Ruben Martinez-Cantin (http://rmcantin.bitbucket.org/html/). I'm doing my thesis about Bayesian Optimization…
Ze Nog
  • 13
  • 2
0
votes
1 answer

How to create a nonempty boost ublas::vector inside an initializer list?

I'm trying to do something like this #include using namespace boost::numeric::ublas; class A{ protected: vector< double > a_; public: A( vector< double > a ) : a_( a ) {}; }; class B : public A{ …
Gregor de Cillia
  • 7,397
  • 1
  • 26
  • 43
0
votes
1 answer

How to multiply a Boost uBLAS vector of doubles with a complex double factor?

Is it possible to calculate the elementwise product of an uBLAS vector of doubles with a complex double? The following code fails to compile since it can not find an overloaded operator *. I would expect it to work since multiplying a double with a…
Ton van den Heuvel
  • 10,157
  • 6
  • 43
  • 82
0
votes
0 answers

Efficient implementation of Element product of Ublas Matrix

makemake I benchmarked the default function for element by element product of Boost Ublas Matrix and found that element_prod was way slower than if I wrote my own implementation with simple for loops. So, I decided to write my own version. I am…
0
votes
2 answers

Boost Vector size constructor not working

When I compile the following code: #include #include namespace ublas = boost::numeric::ublas; class Point { ublas::vector v(3); } I get this error below complaining about the…
Max Rahm
  • 684
  • 11
  • 25