Questions tagged [ublas]

uBLAS is a C++ template class library that provides BLAS level 1, 2, 3 functionality for dense, packed and sparse matrices.

uBLAS is a C++ template class library that provides BLAS level 1, 2, 3 functionality for dense, packed and sparse matrices. The design and implementation unify mathematical notation via operator overloading and efficient code generation via expression templates.

http://www.boost.org/doc/libs/release/libs/numeric

99 questions
1
vote
0 answers

Operation with matrices using boost in c++

I've been using boost for two days now. I'm still trying to figure out how to do a couple of things. As an example. I'm going to use the following matrix and vectors defined below Matrix A and vector V1, V2 and V3 which is an empty vector. Matrix…
1
vote
1 answer

XLL Made By XLW with BOOST UBLAS MyMatrix Data Type Conversion to Double ** Failing

I am using XLW to create an XLL of functions to register in Excel. The XLL calls the actual mathematical models in a C++ DLL. I am using BOOST with UBLAS to aid in conversion from the XLL MyMatrix data type to the double ** that the C++ DLL uses…
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
3 answers

How to use Boost uBLAS C++ library in an iPhone project?

I want to use Boost library in my iPhone project, specifically only boost::numeric::ublas. I managed to build static libraries for boost in order to link them in my iPhone project. However, when I look at those .a libraries I can't find one that's…
saurb
  • 685
  • 1
  • 13
  • 24
1
vote
1 answer

C++ Pointer being freed was not allocated (possibly, an issue with unique_ptr or boost::ublas)

This is a follow up on one of my previous questions. The issue that I am dealing with is explained in detail in the formulation of the aforementioned question. Unfortunately, I was not able to provide a minimal example that showcases the problem. In…
user1391279
1
vote
1 answer

Why the compress_matrix in boost ublas allocate more memory that it needed for nonzero elements?

I dug into the boost ublas code and found out the ublas implementation for memory allocation in compressed_matrix is not as standard as in CSC or CSR. There is one line that cause the trouble, namely, non_zeros = (std::max) (non_zeros, (std::min)…
1
vote
0 answers

boost ublas reverse iterators on sparse matrices

I need to iterate backwards efficiently over a sparse matrix using the boost ublas library. This is my code: for(rit1_t it1 = L.rbegin1(); it1 != L.rend1(); it1++) { for(rit2_t it2 = it1.rbegin(); it2.index2() > it2.index1(); it2++) { …
user2458399
  • 156
  • 1
  • 6
1
vote
0 answers

Boost uBLAS library combined with GMP's multiprecision floats

I'm trying to combine uBLAS' sparse matrices with GMP's multi-precision float numbers. I've reduced my complex source into the following test-case snippet, which for some reason refuses to compile: #include…
davide
  • 2,082
  • 3
  • 21
  • 30
1
vote
2 answers

UBLAS Matrix Finding Surrounding Values of a Cell?

I am looking for an elegant way to implement this. Basically i have a m x n matrix. Where each cell represents the pixel value, and the rows and columns represent the pixel rows and pixel columns of the image. Since i basically mapped points from a…
UberJumper
  • 20,245
  • 19
  • 69
  • 87
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
1
vote
1 answer

ublas vector pointer

I'm trying to initialise/assign values to a ublas vector by defining the vector in my .h file: someClass{ ublas::vector *L; } ; Then in my .cpp file: someClass::someClass() { L = new ublas::vector[4]; L->data()[0] =…
chocobo_ff
  • 510
  • 1
  • 5
  • 14
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

How to use Boost BLAS in Eigen

This page says that you can specify what BLAS libary Eigen should use. I'd like to use the Boost version of BLAS but have been able to get it to link. It is missing a lot of symbols, such as daxpy_, dgemv_ and dtrmv_. From what I can see, these are…
GregReese
  • 27
  • 3
0
votes
1 answer

c++ and ublas: creating an array of c_vectors with different sizes

Is there a way to create an array of ublas c_vectors with different sizes? For example array[0] would return an ublas::c_vector< double, 3 > (size=3) and array[0](0) would access its first element array[1] would return an ublas::c_vector< double, 7…
niels
  • 760
  • 8
  • 25