I am thinking of accessing a C ++ array using matlab type indexing, for example a[1 , :]
,: a[1 , :]
. That would be very convenient.
I overloaded the [] operator, but the syntax a[1, : ]
seems impossible.
The solution I understood is to write a script that preprocesses the C ++ source code and turns a[1, :]
into a C ++ function, for example col(a, 1)
. But it seems laborious.
Does anyone have a better solution? Thanks!!
source share