Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2000-12-07 12:20:53


Here is another way of showing what I want:

There are two modules, ivect and dvect.

They could be used like this:

-----------------------------
import ivect
iv = ivect.ivect((1,2,3,4,5))
print iv.as_tuple()
-----------------------------

Or similarly:

-----------------------------
import dvect
dv = dvect.dvect((1,2,3,4,5))
print dv.as_tuple()
-----------------------------

The feature I am looking for is this:

-----------------------------
import dvect
dv = dvect.dvect((1,2,3,4,5))
iv = dvect.as_ivect()
-----------------------------

The effect should be similar to this:

-----------------------------
import ivect
import dvect
dv = dvect.dvect((1,2,3,4,5))
iv = ivect.ivect(dv.as_tuple())
-----------------------------

Of course, for large or complex objects the detour through a native
Python object is impractical.

Ralf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk