CMatrix Class Reference

#include </home/scilab/compilation_chain/sci_checkOut/scilab/modules/core/examples/call_scilab/cpp/common/ccmatrix.h>


Public Member Functions

 CMatrix (char *name1, char *job)
void scijob (char *jobname)
CMatrixplus (CMatrix &B)
void print ()
void inv ()

Private Attributes

int m
int n
char * name
double * v


Detailed Description

Definition at line 8 of file ccmatrix.h.


Constructor & Destructor Documentation

CMatrix::CMatrix ( char *  name1,
char *  job 
)

Definition at line 21 of file ccmatrix1.cc.

References buf, C2F(), cmatptr(), m, n, name, SciError(), SendScilabJob(), stk, and v.

00022 {
00023   sprintf(buf,"%s=%s;",name1,job);
00024   if ( SendScilabJob(buf) != 0) 
00025     throw SciError();
00026   else 
00027     {
00028       int lp;
00029       C2F(cmatptr)(name1, &m, &n, &lp,strlen(name1));
00030       v = stk(lp);
00031     }
00032   name = new char[strlen(name1)+1];
00033   strcpy(name,name1);
00034 }

Here is the call graph for this function:


Member Function Documentation

void CMatrix::scijob ( char *  jobname  ) 

Definition at line 37 of file ccmatrix1.cc.

References buf, name, SciError(), and SendScilabJob().

Referenced by cc_test(), and print().

00038 {
00039   sprintf(buf,jobname,name);
00040   if ( SendScilabJob(buf) != 0) 
00041     throw SciError();
00042 }

Here is the call graph for this function:

Here is the caller graph for this function:

CMatrix & CMatrix::plus ( CMatrix B  ) 

Definition at line 44 of file ccmatrix1.cc.

References buf, C2F(), cmatptr(), m, n, name, SciError(), SendScilabJob(), stk, and v.

Referenced by cc_test().

00045 {
00046   sprintf(buf,"%s=%s+%s",this->name,this->name,B.name);
00047   if ( SendScilabJob(buf) != 0) 
00048     throw SciError();
00049   int lp;
00050   C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
00051   v = stk(lp);
00052   return *this;
00053 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CMatrix::print (  ) 

Definition at line 55 of file ccmatrix1.cc.

References name, and scijob().

Referenced by cc_test().

00056 {
00057   fprintf(stdout,"Matrix %s=\n",name);
00058   scijob("disp(%s)");
00059 }

Here is the call graph for this function:

Here is the caller graph for this function:

void CMatrix::inv (  ) 

Definition at line 61 of file ccmatrix1.cc.

References buf, C2F(), cmatptr(), m, n, name, SciError(), SendScilabJob(), stk, and v.

Referenced by cc_test().

00062 {
00063   sprintf(buf,"%s=inv(%s)",name,name);
00064   if ( SendScilabJob(buf) != 0) 
00065     throw SciError();
00066   int lp;
00067   C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
00068   v = stk(lp);
00069 }

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

int CMatrix::m [private]

Definition at line 11 of file ccmatrix.h.

Referenced by CMatrix(), inv(), and plus().

int CMatrix::n [private]

Definition at line 11 of file ccmatrix.h.

Referenced by CMatrix(), inv(), and plus().

char* CMatrix::name [private]

Definition at line 12 of file ccmatrix.h.

Referenced by CMatrix(), inv(), plus(), print(), and scijob().

double* CMatrix::v [private]

Definition at line 13 of file ccmatrix.h.

Referenced by CMatrix(), inv(), and plus().


The documentation for this class was generated from the following files:

Generated on Tue Sep 9 18:23:00 2008 for Scilab [trunk] by  doxygen 1.5.5