quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_math_matrix.a #include <MatrixShort.h> MatrixShort(long nrows = DEF_SIZE, long ncols = DEF_SIZE, long type = DEF_TYPE); MatrixShort(const MatrixShort& matrix);
description:short data0[6] = {1, 2, 3, 4, 5, 6}; short data1[6] = {4, 6, 7, 2, 3, 9}; MatrixShort val0; MatrixShort val1(3, 3, Integral::LOWER_TRIANGLE); val0.assign(2, 3, data0); val1.assign(3, 3, data1);
static const String CLASS_NAME = L"MatrixShort";
static const long ERR = 24500;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~MatrixShort();
MatrixShort(long nrows = DEF_SIZE, long ncols = DEF_SIZE, long type = DEF_TYPE);
MatrixShort(const MatrixShort& matrix);
these methods are inherited from the MMatrix template class
MatrixShort& operator=(const MatrixShort& matrix);
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
these methods are inherited from the MMatrix template class
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
MatrixShort(long nrows, long ncols, const unichar* arg, long type = DEF_TYPE, const Char delim = DEF_DELIM);
MatrixShort& operator=(short value);
// define a MatrixShort object // MatrixShort val0(3, 3, Integral::SYMMETRIC); // assign values to the matrix by calling operator= method // val0 = 5; // define a file name and declare an Sof object // String tmp_filename(L"foo"); Sof tmp_file; // open the file in write mode // tmp_file.open(tmp_filename, File::WRITE_ONLY, File::TEXT); // write the matrix object to the Sof file // val0.write(tmp_file, (long)0); // close the file // tmp_file.close();