Subversion Repositories gelsvn

Rev

Rev 39 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 595
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
1
/*!
7
/*!
2
\file LinAlgIO.h
8
\file LinAlgIO.h
3
\brief I/O functions for the LinAlg types
9
\brief I/O functions for the LinAlg types
4
*/
10
*/
5
#if !defined(LINALGIO_H__HAA_AGUST_2001)
11
#if !defined(LINALGIO_H__HAA_AGUST_2001)
6
#define LINALGIO_H__HAA_AGUST_2001
12
#define LINALGIO_H__HAA_AGUST_2001
7
 
13
 
8
#include "Matrix.h"
14
#include "Matrix.h"
9
#include <iostream>
15
#include <iostream>
10
 
16
 
11
namespace LinAlg
17
namespace LinAlg
12
{
18
{
13
 
19
 
14
/*!
20
/*!
15
\name I/O from MatLab
21
\name I/O from MatLab
16
Reads or writes the type to or from a m-file with a somwhat 
22
Reads or writes the type to or from a m-file with a somwhat 
17
strict format. MatLab can 'load' the matrix by running the m-file
23
strict format. MatLab can 'load' the matrix by running the m-file
18
in question, and write to the format via the 'LinAlg.m' function.
24
in question, and write to the format via the 'LinAlg.m' function.
19
 
25
 
20
Since MatLab uses double as the working percision, this is the only 
26
Since MatLab uses double as the working percision, this is the only 
21
value of T where this interface to MatLab works. For other types, 
27
value of T where this interface to MatLab works. For other types, 
22
this functionality is good for loading, saving and debuging.
28
this functionality is good for loading, saving and debuging.
23
 
29
 
24
\todo write the LinAlg.m fuction.
30
\todo write the LinAlg.m fuction.
25
\todo make a template overloading, of these functions.
31
\todo make a template overloading, of these functions.
26
\author Henrik Aanæs
32
\author Henrik Aanæs
27
\version Aug 2001
33
\version Aug 2001
28
*/
34
*/
29
//@{
35
//@{
30
void ToMatlab(const CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m",const bool append=true,const std::string& Comment = "");
36
void ToMatlab(const CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m",const bool append=true,const std::string& Comment = "");
31
void FromMatlab(CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m");
37
void FromMatlab(CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m");
32
//@}
38
//@}
33
 
39
 
34
 
40
 
35
 
41
 
36
 
42
 
37
 
43
 
38
 
44
 
39
}
45
}
40
#endif // !defined(LINALGIO_H__HAA_AGUST_2001)
46
#endif // !defined(LINALGIO_H__HAA_AGUST_2001)
41
 
47