Boost logo

Boost Users :

From: Daniel L Elliott (dan_elliott_at_[hidden])
Date: 2004-12-07 22:12:05


On Tuesday 07 December 2004 01:18 am, Toon Knapen wrote:
> Daniel L Elliott wrote:
> > Thank you for the response! I was unaware of this include-policy
> > problem. Will you be merging this code soon? I will try to look for your
> > email about this merge.
>
> Yes. I posted a mail on the ublas-dev just before the weekend about
> this. Since no one objected I will go forward and do the merge (although
> I'm not sure when exactly because there are a few bugs in the uBLAS_pure
> branch that need to be resolved first)
>

I look forward to your notification that this has been done :) Thanks!

> > Since adding
> > #include<storage.hpp> to lu.hpp didn't fix the problem, should I expect
> > to have to include additional files to my code to fix errors in files
> > such as storage.hpp?
>
> Adding '#include <storage.hpp>' did not solve the problem ? Are you sure
> you added this include before you include lu.hpp (or you can also add
> the include to the top of you lu.hpp). The problem is that the default
> value for the second template argument is an unbounded_array. This need
> to be defined of course and the definition is in storage.hpp. I was able
> to compile your testcase after adding this include. If this does not
> work for you, send your testcase again that demonstrates the problem and
> we'll have a look at it.

OK, here is the code:

#include<boost/numeric/ublas/storage.hpp>
#include<boost/numeric/ublas/lu.hpp>

using namespace boost::numeric::ublas;

int main(){

  // create a permutation matrix
  permutation_matrix P( 5 );
  // default contructions gives the identity-permutation

  return 0;
}

The errors are:
g++ -c -I. -I/s/chopin/a/grad/dane/thesis/code/boost-1.32/include/boost-1_32
-Wall -g3 -o permutationTest.o permutationTest.cpp
In file included from permutationTest.cpp:5:
/s/chopin/a/grad/dane/thesis/code/boost-1.32/include/boost-1_32/boost/numeric/ublas/lu.hpp:
In
   function `typename M::size_type
boost::numeric::ublas::axpy_lu_factorize(M&,
   PM&)':
/s/chopin/a/grad/dane/thesis/code/boost-1.32/include/boost-1_32/boost/numeric/ublas/lu.hpp:181:
error: parse
   error before `>' token
/s/chopin/a/grad/dane/thesis/code/boost-1.32/include/boost-1_32/boost/numeric/ublas/lu.hpp:181:
error: parse
   error before `)' token
permutationTest.cpp: In function `int main()':
permutationTest.cpp:15: error: `permutation_matrix' undeclared (first use this
   function)
permutationTest.cpp:15: error: (Each undeclared identifier is reported only
   once for each function it appears in.)
permutationTest.cpp:15: error: parse error before `(' token

I thought that this error might signal the need for including vector.hpp (or
vector_expression.hpp or something) but this did not fix it. Including
operation.hpp (which I beleive contains the definition for axpy) causes
several screen-fulls of errors!

Again, I am at a loss and appreciate any help I might receive.

Thank you,

Dan elliott


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net