24 #ifndef _GEMALUA_MATRIX_H_ 25 #define _GEMALUA_MATRIX_H_ 46 virtual const char*
typeName()
const {
return "matrix"; }
60 int nlin (lua_State* L);
61 int ncol (lua_State* L);
62 int size (lua_State* L);
63 int at (lua_State* L);
64 int set (lua_State* L);
65 int col (lua_State* L);
66 int line (lua_State* L);
67 int setCol (lua_State* L);
68 int setLine (lua_State* L);
70 int det (lua_State* L);
71 int equal (lua_State* L);
72 int print (lua_State* L);
73 int toTable (lua_State* L);
75 int solve (lua_State* L);
76 int inv (lua_State* L);
77 int dot (lua_State* L);
78 int cross (lua_State* L);
79 int norm (lua_State* L);
80 int eig_sym (lua_State* L);
82 int eq (lua_State* L);
83 int unm(lua_State* L);
85 static int add(lua_State* L);
86 static int sub(lua_State* L);
87 static int mul(lua_State* L);
88 static int div(lua_State* L);
89 static int mod(lua_State* L);
91 static GmLuaMatrix* getOperand(lua_State* L,
int index,
char op,
double* v);
Declaration of the GmLuaObject class.
GmMatrix & matrix() const
Returns a reference for the internal matrix.
Definition: gmLuaMatrix.h:57
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition: gmLuaMatrix.h:46
A proxy class to export GmMatrix and GmVector methods to the Lua environment.
Definition: gmLuaMatrix.h:35
bool equal(double a, double b, double relTol=GM_DOUBLECMP_RELTOL, double absTol=GM_DOUBLECMP_ABSTOL)
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a GmLuaMesh object.
Definition: gmLuaMatrix.h:54
virtual void fillMetatable(lua_State *L, int index)=0
Function called by populateMetatable() to fill the metatable with exported methods by derived classes...
virtual QString toString() const
Default method used by the __tostring metamethod to capture the result of tostring() over an object.
Definition: gmLuaMatrix.h:49
void print(const GmMatrix &m, const GmLogCategory &logger, GmLogLevel level, int fieldWidth, char format, int precision)
virtual QString toString() const
Default method used by the __tostring metamethod to capture the result of tostring() over an object.
Definition: gmLuaObject.h:55
A proxy class to export object methods to the Lua environment.
Definition: gmLuaObject.h:35
GmMatrix * _newMat
A new matrix (owned by the proxy) 'wrapped' by this proxy object.
Definition: gmLuaMatrix.h:96
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
GmMatrix & _mat
A reference to the exported matrix, either external or pointing to _newMat.
Definition: gmLuaMatrix.h:97