|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-05-29 17:13:15
Am Donnerstag, 29. Mai 2008 10:59 schrieb Hongzheng Wang:
> In fact, both this question and the above one come from my experience
> using std::valarray. I find it is a convenient and productive
> mechanism to bring in the concepts of 'general slice', 'indirect
> array' and 'masked array' etc. For example, suppose idx is an index
> array, say, idx[0]=5, idx[1]=6, idx[2]=10, then something like
> indirect subsets can be expressed as va[idx]. When I come to uBLAS,
> I notice that there are only slice and range.
there is also indirect_array and the corresponding vector and matrix
proxies. Here you prepare the list of indices in the index_array object
and then create a (AFAIR) vector_indirect(v, ia)
mfg
Gunter