%module ReducedHessAngle %{ #include "ReducedHessAngle.h" %} %include "Real.h" %include "Vector3D.h" %include "Matrix3by3.h" %include "ReducedHessAngle.h" %extend ProtoMol::Matrix3by3 { ProtoMol::Matrix3by3 operator+(ProtoMol::Matrix3by3 m2) { return self->operator+(m2); } } %extend ProtoMol::ReducedHessAngle { ProtoMol::Matrix3by3 operator()(int i, int j) {return self->H[i][j];} ProtoMol::ReducedHessAngle operator*(Real s) { ProtoMol::ReducedHessAngle retval = (*self); for (unsigned int i = 0; i < 3; i++) for (unsigned int j = 0; j < 3; j++) retval.H[i][j].scale(s); return retval; } void set(int i, int j, ProtoMol::Matrix3by3 m1) {self->H[i][j] = m1;} }