jim.brown wrote:[color=blue]
> Many thanks for the reply. I've supplied more information.[/color]
Please don't top-post. Read section 5 of the FAQ for posting guidelines.
http://www.parashift.com/c++-faq-lite/
[color=blue]
>
> Here is the template definition of Eigenvalue in namespace JAMA.
>
> template <class Real>
> class Eigenvalue
> {
>
> The method I'm tring to call is a public method in class Eigenvalue
> with this header.
>
> Eigenvalue(const TNT::Array2D<Real> &A) {[/color]
OK, that's quite a bit different from what I was expecting, so my reply
is not accurate. In the future you might want to give more context when
asking a question.
As John said, this is a constructor for the class. How you use the class
to extract the actual eigenvalues is unknown to us -- check the docs.
[color=blue]
>
> You are right that the example I posted is nonsense but I had tried
> other obvious calls as you suggest. If I understand templates
> (and I don't much), Real is the type paramater to the template.
> I should be able to instantiate a "double" version of this template.[/color]
That's right, but the code snippets in your first post suggested that
Eigenvalue was a function taking a specialization of Array2d for an
unknown type 'Real'. There's a big difference between this:
void Func(vector<Type> vec);
and this:
template <class Type> void Func(vector<Type> vec);
You gave the former, while in reality Eigenvalue() is closer to the latter.
[color=blue]
>
> If I try
> Eigenvalue (A);
> I get "A unknown size"
>
> If I say
> new Eigenvalue( A );
> I get "JAMA::Eigenvalue: class has no constructors"
>
> If I say
> Eigenvalue(
> The MS VC7 Compiler prompts me with
> "Eigenvalue(const TNT::Array2D<Real>&A)"[/color]
Eigenvalue is a class [template], so you actually want to create an
instance (probably -- it's also possible that you might want to use
static members of Eigenvalue, in which case an instance is not
required), and you probably want to initialize it (via the constructor
above) with an Array2d object:
Eigenvalue<double> my_eigenvalue(my_array2d);
[color=blue]
>
> I'm completely lost. JAMA and TNT are publicly available codes
> and I have to believe they are well defined. I just don't know
> how to call them.[/color]
That's about as far as we can help. The rest has to do with details of
the library. If the docs aren't helpful, you might see if there's a
forum or mailing list for those libraries and seek help there. Or search
the web, or examine the source code and see if you can figure it out
yourself.
-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.