/*
 *    Copyright (c) Yaron Keren 1994-1996. All rights reserved.
 */
#ifndef __M_H
#define __M_H
#include <stddef.h>
#include <math.h>
#define M_MATRIX 0
#define M_TEXT	 1
union i_o_t {
int i;
int o;
};
class Mr;
class M {
  char *name;
int type;
int m;
int n;
int p;
double *pr;
double *pi;
void allocate_double();
void delete_double();
public:
M();
M(int l_260,int l_261);
M(int l_260,int l_261, char *l_262);
M(char *l_262, double l_263, double l_264=0);
M(char *l_262, char *text);
M(double val);
M(char *text);
  M(const M& l_57);
M(const Mr& l_57);
~M();
  void operator =(double val);
void operator =(char *text);
void operator =(const M& l_57);
void operator =(const Mr& l_57);
  void deepcopy(const M& l_57);
  inline int rows() const { return(m); }
inline int cols() const { return(n); }
inline int size() const { return(m*n); }
int gettype() const { return(type); }
void settype(int t) { type=t; }
char *getname() const { return(name); }
int dirty() const;
inline double *addr() const { return(pr); }
inline double *addr(int row,int col) const { return(pr+row-1+(col-1)*m); }
inline double *addi() const { return(pi); }
inline double *addi(int row,int col) const { return(pi+row-1+(col-1)*m); }
double& r() const;
double& r(double l_265) const;
double& r(double row, double col) const;
double& i() const;
double& i(double l_265) const;
double& i(double row, double col) const;
Mr operator ()(M l_57);
Mr operator ()(M l_266, M l_267);
void vwcopy(const M& l_57, const M& v);
void vwcopy(const M& l_57, const M& v, const M& l_268);
friend void rowcol(M& x);
};
#include "file_32.h"
#endif
