 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Andreas Harnack Guest
|
Posted: Mon Sep 13, 2004 8:41 pm Post subject: Is there an algebraic vector class? |
|
|
Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry? Such a vector would typically
have an arbitrary but fixed dimension, hence no need
for insert/remove operations, and should offer all
operation defined in vector space (sum, scalar
factor, scalar product etc.) Note that such a vector
would be fundamentally different from the one
implemented in the std::vector class.
Andreas
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Falk Tannhäuser Guest
|
Posted: Tue Sep 14, 2004 11:59 am Post subject: Re: Is there an algebraic vector class? |
|
|
Have you looked at std::valarray?
Falk
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Hendrik Belitz Guest
|
Posted: Tue Sep 14, 2004 12:03 pm Post subject: Re: Is there an algebraic vector class? |
|
|
Andreas Harnack wrote:
| Quote: | Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry? Such a vector would typically
have an arbitrary but fixed dimension, hence no need
for insert/remove operations, and should offer all
operation defined in vector space (sum, scalar
factor, scalar product etc.) Note that such a vector
would be fundamentally different from the one
implemented in the std::vector class.
|
Take a look at
http://oonumerics.org/blitz
and also at
http://www.codesourcery.com/pooma
--
To get my real email adress, remove the two onkas
--
Hendrik Belitz
- Abort, Retry, Fthagn? -
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Gabriel Dos Reis Guest
|
Posted: Tue Sep 14, 2004 12:15 pm Post subject: Re: Is there an algebraic vector class? |
|
|
"Andreas Harnack" <andreas_harnack (AT) web (DOT) de> writes:
| Quote: | Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry? Such a vector would typically
have an arbitrary but fixed dimension, hence no need
for insert/remove operations, and should offer all
operation defined in vector space (sum, scalar
factor, scalar product etc.) Note that such a vector
would be fundamentally different from the one
implemented in the std::vector class.
|
You have std::valarray, as an approximation. See TC++PL3 for
introduction.
--
Gabriel Dos Reis
[email]gdr (AT) integrable-solutions (DOT) net[/email]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Malte Clasen Guest
|
Posted: Tue Sep 14, 2004 12:22 pm Post subject: Re: Is there an algebraic vector class? |
|
|
Andreas Harnack wrote:
| Quote: | Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry?
|
There's a vector class in the Boost ublas library:
http://www.boost.org/libs/numeric/ublas/doc/vector.htm
Malte
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Nicola Musatti Guest
|
Posted: Tue Sep 14, 2004 11:02 pm Post subject: Re: Is there an algebraic vector class? |
|
|
"Andreas Harnack" <andreas_harnack (AT) web (DOT) de> wrote
| Quote: | Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry?
|
The Boost.uBlas library might fit your requirements:
http://www.boost.org/libs/numeric/ublas/doc/index.htm
Cheers,
Nicola Musatti
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Paul Evans Guest
|
|
| Back to top |
|
 |
David Fisher Guest
|
Posted: Wed Sep 15, 2004 9:57 am Post subject: Re: Is there an algebraic vector class? |
|
|
"Hendrik Belitz" wrote:
| Quote: | Is anybody aware of an implementation of a vector class ...
|
[snip]
Hope this isn't off topic, but whenever I have tried that address (in the
last few months) it has failed ... Google isn't turning up many alternative
sites either.
Do you know if it has moved ? (Or is this just a local problem ?)
Thanks,
David Fisher
Sydney, Australia
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Wed Sep 15, 2004 6:36 pm Post subject: Re: Is there an algebraic vector class? |
|
|
In article <gNM1d.848$pl.27044 (AT) nasal (DOT) pacific.net.au>, David Fisher
<david (AT) hsa (DOT) com.au> writes
| Quote: | "Hendrik Belitz" wrote:
Is anybody aware of an implementation of a vector class ...
[snip]
Take a look at
http://oonumerics.org/blitz
Hope this isn't off topic, but whenever I have tried that address (in the
last few months) it has failed ... Google isn't turning up many alternative
sites either.
Do you know if it has moved ? (Or is this just a local problem ?)
|
Must be some local problem because I have no difficulty with accessing
it.
--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Hyman Rosen Guest
|
Posted: Wed Sep 15, 2004 7:27 pm Post subject: Re: Is there an algebraic vector class? |
|
|
David Fisher wrote:
| Quote: | http://oonumerics.org/blitz
Hope this isn't off topic, but whenever I have tried that address (in the
last few months) it has failed
|
I just tried it, and it worked for me.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Andreas Harnack Guest
|
Posted: Wed Sep 15, 2004 11:58 pm Post subject: Re: Is there an algebraic vector class? |
|
|
Thanks for your feedback; some suggestions I'd already
checked, others were new to me. However, non of them
represented what I have in mind. In particular I don't
think that an algebraic vector can be a container. It
could be implemented using a container but that would
be a private detail. I think I'll write this up in a
separate article.
Andreas
"Andreas Harnack" <andreas_harnack (AT) web (DOT) de> wrote
| Quote: | Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry? Such a vector would typically
have an arbitrary but fixed dimension, hence no need
for insert/remove operations, and should offer all
operation defined in vector space (sum, scalar
factor, scalar product etc.) Note that such a vector
would be fundamentally different from the one
implemented in the std::vector class.
Andreas
|
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Patrick Kowalzick Guest
|
Posted: Fri Sep 17, 2004 3:03 am Post subject: Re: Is there an algebraic vector class? |
|
|
Hi Andreas,
I dont know if this helps:
Theres a fixed size array in boost, which is simply called - array. But
there are no algebraic routines implemented. As well there is nothing
virtual inside, so take care with inheritance.
boost.uBLAS has a bounded_vector, what is similar at a first glance. But it
is quite nice integrated in the library so all implemented vector and matrix
operations can be used.
Me, myself I cheat a little bit:
I inherit from the uBLAS bounded_vector an own type, more exact several
types. Points, Lines, Planes and so on....I need just to introduce the
ctors, dtor and assignment operators. Like this I can easily use the power
of uBLAS with my own classes.
Regards,
Patrick
"Andreas Harnack" <andreas_harnack (AT) web (DOT) de> schrieb im Newsbeitrag
news:7m32d.10812$Iz5.4673 (AT) news (DOT) cpqcorp.net...
| Quote: | Thanks for your feedback; some suggestions I'd already
checked, others were new to me. However, non of them
represented what I have in mind. In particular I don't
think that an algebraic vector can be a container. It
could be implemented using a container but that would
be a private detail. I think I'll write this up in a
separate article.
Andreas
"Andreas Harnack" <andreas_harnack (AT) web (DOT) de> wrote in message
news:K1k1d.10466$It2.9572 (AT) news (DOT) cpqcorp.net...
Is anybody aware of an implementation respectively
discussion of a vector class based on the vector
concept typically used in linear algebra respectively
Euclidian geometry? Such a vector would typically
have an arbitrary but fixed dimension, hence no need
for insert/remove operations, and should offer all
operation defined in vector space (sum, scalar
factor, scalar product etc.) Note that such a vector
would be fundamentally different from the one
implemented in the std::vector class.
Andreas
|
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|