OpenStructure
similarity_matrix.hh
Go to the documentation of this file.
1 #ifndef OST_MOL_ALG_SIMILARITY_MATRIX_HH
2 #define OST_MOL_ALG_SIMILARITY_MATRIX_HH
3 
4 #include <limits>
5 #include <fstream>
6 #include <ost/tri_matrix.hh>
7 #include <ost/img/image.hh>
8 #include "module_config.hh"
9 
10 namespace ost { namespace mol { namespace alg {
11 
12 // triangular distance matrix
14 public:
21  SimilarityMatrix(int n, Real def_val=std::numeric_limits<Real>::min()):
22  ost::TriMatrix<Real>(n, def_val)
23  { }
24 
25  ost::img::ImageHandle AsImage(bool full=false) const;
26 
27  static SimilarityMatrix Load(const String& filename);
28 
29  void Save(const String& filename);
30 
31 };
32 
33 }}}
34 
35 #endif
36 
triangular matrix template
Definition: tri_matrix.hh:13
Manage shared instances of images.
ost::img::ImageHandle AsImage(bool full=false) const
void Save(const String &filename)
SimilarityMatrix(int n, Real def_val=std::numeric_limits< Real >::min())
initialise similarity matrix with n datapoints.
static SimilarityMatrix Load(const String &filename)
float Real
Definition: base.hh:44
std::string String
Definition: base.hh:54
#define DLLEXPORT_OST_MOL_ALG
Definition: base.dox:1