libsegl/matrix.h

47 lines
783 B
C++

#ifndef __MATRIX_H
#define __MATRIX_H
#include <iostream>
#include <iomanip>
#include "punkt3d.h"
#include "emath.h"
namespace segl {
class Matrix {
protected:
float **c;
int m, n;
void allocate();
void copyFromSource(const float**);
public:
Matrix(int, int);
Matrix(int, int, const float**);
Matrix(Punkt3D);
Matrix(const Matrix&);
~Matrix();
const float **getMatrix() const;
bool set(float, int, int);
float get(int, int);
int getM() const;
int getN() const;
Matrix operator*(const Matrix&);
Matrix& operator=(const Matrix&);
Matrix operator+(const float&);
Matrix operator-(const float&);
Matrix operator*(const float&);
Matrix operator/(const float&);
void print(std::string="") const;
};
} // namespace segl
#endif