array access "A[i]" and luabind

Sebastian Wolff <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi,

I try to enable array index in my classes for linear algebra.

At least the calls

  object[ integer key ]
  object[ table key ]

should work. The idea is to make index access as general and convenient 
as possible by providing a syntax like
   Vector[i]
  Matrix[i][j] -- a switch creates a temp. object onto the i-th row if ncols>1
  Matrix[{i,j}] -- a second key type (table) which allows common keys 
for vectors AND matrices
  Vector[{i,0}]
  -- both instantiations, Vector and Matrix, should be of the same data type

Somehow it is not possible to change the __index and __newindex methods 
using luabind. Is there any way to simulate such a behavior or is 
support like this planned?

Thanks
Sebastian




----- Ende der weitergeleiteten Nachricht -----



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.