[Trilinos-Users] tuple-indexable matrices?
Bartlett, Roscoe A
rabartl at sandia.gov
Wed Feb 3 10:58:49 MST 2010
I am not sure what you are asking. Is this a class of your own that you are writing that represents 'A'? If you want to accept an array of indexes, I would declare this as:
someFunc( const ArrayView<dconst int> &indexes );
You would then call this as:
Note that all the Teuchos array types Tuple, Array, and ArrayRCP can all be converted into an ArrayView. You can declare 'i' to be any of these Array types and the implicit conversion to ArrayView will take place.
Does this help?
> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
> users-bounces at software.sandia.gov] On Behalf Of Nico Schlömer
> Sent: Wednesday, February 03, 2010 10:14 AM
> To: trilinos-users at software.sandia.gov
> Subject: [Trilinos-Users] tuple-indexable matrices?
> Hi all,
> I'm looking at dense vectors which can be indexed by some sort of tuple
> (e.g., Teuchos::Tuple).
> Currently I find myself writing something like
> A( i, i, i )
> a lot of times, when it's semantically nothing more than
> A( i )
> Any ideas?
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
More information about the Trilinos-Users