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
0
votes
2 answers

Ublas vector initialization outside of function

I would like to declare a specific boost ublas vector as global variable. The problem is that declaration outside of a function always leads to an error. Here is a specific example: The following code will give multiple errors: (error C2143: syntax…
0
votes
1 answer

How to understand and fix recursive template instantiation error using boost ublas?

I'm receiving a compiler error /Developer/boost/boost/numeric/ublas/expression_types.hpp:184:16: fatal error: recursive template instantiation exceeded maximum depth of 512 from clang++ or indefinite compiling with >10GB memory usage from g++…
NoahR
  • 1,417
  • 3
  • 18
  • 33
0
votes
1 answer

How can I calculate a quadratic form using Boost UBLAS?

I am trying to calculate (x-mu)^T*SigmaInverse*(x-mu) using Boost UBLAS, where x and mu are vectors and SigmaInverse is a Matrix. The code looks like this: #include #include #include…
Grzenio
  • 35,875
  • 47
  • 158
  • 240
0
votes
1 answer

C++ Question about Boost UBLAS

Does the Boost UBLAS library have a built-in solver for solving systems of equations? The documentation implies that all the ublas solver routines require the matrix to already be in triangular form. But, if a matrix is not in triangular form, is…
Charles Salvia
0
votes
2 answers

Is there an advantage to using pointers or references to return Boost matrices?

I'm using Boost to do some matrix algebra. I'm trying to understand if this optimization does anything. Original: matrix DoSomething(matrix a, matrix b) { return a + b; //for example } Optimization: matrix*…
beerncircus
  • 161
  • 1
  • 6
0
votes
1 answer

How do I stream a file into a matrix in C++ boost ublas?

I'm trying to read in a file that contains matrix data into a boost matrix. "" is already supposed to have operator overloads for this sort of thing and I can get it to write to a standard stream (cout). I don't know what's wrong with going the…
beerncircus
  • 161
  • 1
  • 6
0
votes
1 answer

What is the difference between project and subrange functions in boost::number::ublas?

Ie, is there any difference between subrange(V, 0, 3); and project(V, range(0,3)); ? I ask because I'm digging into some code that seems to use both forms (with no apparent rhyme/reason for one vs. the other), but I can't see any difference…
Paul Molodowitch
  • 1,366
  • 3
  • 12
  • 29
0
votes
1 answer

How do I use zero_vector to initialize in boost / c++?

I was looking at one of the answers to: filling a boost vector or matrix but I think I'm new to boost(and xcode, for that matter) and am trying to wrap my head around the boost zero_vector. I tried a simple program that I thought was about the same…
Steve Hwan
  • 459
  • 1
  • 6
  • 12
0
votes
1 answer

define a boost::ublas matrix with a given vector

I am looking for a way to define a nxm matrix from a given 1xm vector in boost::ublas. I try the following code boost::numeric::ublas::vector v(100); boost::numeric::ublas::matrix m(10, 100); std::copy(v.begin(), v.end(),…
user1285419
  • 2,183
  • 7
  • 48
  • 70
1 2 3 4 5 6
7