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
2
votes
1 answer

C++ templates and OpenBLAS

There exist C++ libraries such as Eigen or Boost::uBlas that implement matrix types and computations. There also exist libraries such as LAPACK, Goto-BLAS, OpenBLAS and ATLAS that implement highly optimized dense matrix computations over…
David Monniaux
  • 1,948
  • 12
  • 23
2
votes
1 answer

Writing a Boost ublas matrix to a text file

I have a Boost ublas matrix, and I want to print its contents to a text file. I have the following implementation, and it works. #include using namespace std; #include "boost\numeric\ublas\matrix.hpp" typedef…
The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
2
votes
1 answer

How to insert an element into ublas matrix with dynamic size

Run time error while trying to insert element in a matrix with size not specified initially. The below code runs finr for m1 but throws error for m2. #include #include #include
Shrey
  • 1,242
  • 1
  • 13
  • 27
2
votes
0 answers

C++ using Lapack within boost

While developing a program i used frequently boost UBLAS types for matrices like hermitian_matrix and others. I need to calculate eigenvalues and as i see UBLAS does not have something related with this. The first solution is to use LAPACK but i do…
Radium
  • 41
  • 2
  • 6
2
votes
1 answer

What are matrix expression and vector expresssion classes in Boost.uBLAS?

I have tried reading Boost Documentation, but I don't understand this expression concept. Matrix class inherits a matrix_expression class, I don't understand what is this class used for. Thank You.
Jignesh
  • 555
  • 1
  • 8
  • 18
1
vote
1 answer

g++ compiler option to warn about type conversions with ublas::bounded_vector

Consider the following code: #include #include #include #include int main() { namespace ublas = boost::numeric::ublas; double d = M_PI; unsigned u =…
mkm
  • 673
  • 5
  • 21
1
vote
1 answer

How can I sort a Boost matrix by column?

I have a 2d boost matrix (boost::numeric::ublas::matrix) of shape (n,m), with the first column being the timestamp. However, the data I'm getting is out of order. How can I sort it with respect to the first column, and what would be the most…
Calvin K
  • 104
  • 2
  • 9
1
vote
1 answer

Boost matrix matrix prod definition

This is a sample code that I'm running or better trying to run. Long story short it is not working as expected. #include #include #include…
Marko Bencik
  • 368
  • 2
  • 13
1
vote
1 answer

Encapsulating ublas and overloading the const reference to the operator()

Considering the following toy example, where I declare a class which encapsulates ublas from boost libraries: #include #include namespace ublas = boost::numeric::ublas; class UblasEncapsulated…
aaamourao
  • 128
  • 1
  • 9
1
vote
2 answers

Constant matrix with boost ublas

I would like to define a constant 3x3 matrix with boost like this and it will never change during the execution: [1 2 3 4 5 6 7 8 9] This matrix will be a member of a class. So, can I define and initialize a constant matrix variable as a class…
simon_tulia
  • 396
  • 1
  • 6
  • 22
1
vote
0 answers

How to load CSR matrix directly into boost compressed_matrix?

I want to transfer a matrix from application A (using matrix in LDU format) to application B (using the boost ublas compressed_matrix, CSR format). I have a function converting the LDU format to CSR format. The ldu2csr function provides me with the…
Klausb
  • 83
  • 4
1
vote
1 answer

Does Boost provide a facility for printing uBLAS datatypes?

I'm debugging an application that massively uses uBLAS vectors and matrices. I would like to print them to console with something like: boost::numeric::ublas::vector v; // ...filling v... std::cout << v; // or boost::whatever << v; Exact…
Sergey
  • 7,985
  • 4
  • 48
  • 80
1
vote
0 answers

boost multiprecision + numeric bindings + LAPACK

I'm trying to implement some numeric procedures using the boost multiprecision template library in combination with numeric bindings for a lapack backend. However, the template resolution doesn't seem to work as intended. I've been able to narrow…
carsten
  • 1,315
  • 2
  • 13
  • 27
1
vote
1 answer

Error in using Boost Ublas lu_Factorize

I am trying to make a fun project which makes a matrix power function using BOOST Ublas.It is very similar to this Numpy library power function for matrix It uses matrix exponentiation to compute the nth power of a matrix in logarithmic time. It…
ArafatK
  • 740
  • 6
  • 25
1
vote
0 answers

CLMath instead of Boost with PyOpenCL

When I run configure.py during PyOpenCL setup, the only libs to direct to are boost and OpenCL. Is it possible to Install CLMath (from AMD) and use that instead of uBLAS/BOOST? I realize that BOOST is no longer required since V0.92, yet the config…
gustable
  • 29
  • 1
  • 8