"red floyd" <no*****@here.dude> wrote in message
news:fK******************@newssvr29.news.prodigy.c om...
Michael wrote: Hi guys,
I'm trying to use the JAMA libraries which are a templated set of
classes, but my experience in templated classes is limited.
Now, htis is the definition according to the lib's DOxygen breakdown:
template<class Real>
JAMA::Eigenvalue<Real>::Eigenvalue<Real> ( const TNT::Array2D<
Real > & A ) [inline]
and I try to invoke it with:
TNT::Array2D<double> CovarMatrix(3,3,0.0);
//(Do stuff to Covar)
JAMA::Eigenvalue<double> EV(CovarMatrix);
but the compilers not having any of it. Could someone please expain the
above notation to me.
Many Thanks
Mike
Care to be a bit more specific? What is the error you are getting?
Visual Studio .Net 2003 tries to compile with the following errors:
Compiling...
BSPTCreator.cpp
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\Tnt\jama\jama_eig.h(234) : error C2668: 'std::max' :
ambiguous call to overloaded function
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xutility(1242): could be 'const _Ty &std::max<Real>(const
_Ty &,const _Ty &)'
with
[
_Ty=double,
Real=double
]
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\Tnt\tnt_math_utils.h(43): or 'Scalar TNT::max<Real>(const
Scalar &,const Scalar &)'
with
[
Scalar=double,
Real=double
]
while trying to match the argument list '(double, double)'
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\Tnt\jama\jama_eig.h(215) : while compiling class-template
member function 'void JAMA::Eigenvalue<Real>::tql2(void)'
with
[
Real=double
]
c:\Documents and
Settings\Michael\Desktop\Ixium3D\BSPTCreator\BSPTC reator.cpp(181) : see
reference to class template instantiation 'JAMA::Eigenvalue<Real>' being
compiled
with
[
Real=double
]
Build Time 0:02
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\BSPTCreator\Debug \BuildLog.htm"
BSPTCreator - 1 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped