NCBI C++ ToolKit
DistanceMatrix.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: DistanceMatrix.hpp 33815 2007-05-04 17:18:18Z kazimird $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  */
27 
28 /// @file DistanceMatrix.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'biotree.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: DistanceMatrix_.hpp
37 
38 
39 #ifndef OBJECTS_BIOTREE_DISTANCEMATRIX_HPP
40 #define OBJECTS_BIOTREE_DISTANCEMATRIX_HPP
41 
42 
43 // generated includes
45 
46 #include <util/math/matrix.hpp>
47 
48 // generated classes
49 
51 
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 /////////////////////////////////////////////////////////////////////////////
56 {
58 public:
59  // Type of Phylip-style format
60  enum EFormat {
61  eSquare, // full square matrix
62  eUpper, // upper-triangular
63  eLower, // lower-triangular
64  eGuess // guess which of the above it is
65  };
66 
67  // constructor
68  CDistanceMatrix(void);
69  // destructor
70  ~CDistanceMatrix(void);
71 
72  // Create an ordinary matrix representation
73  void AsMatrix(CNcbiMatrix<double>& mat) const;
74  // Set to values of an ordinary matrix.
75  // Must be square and symmetric, with zeros on the main diagonal.
76  void FromMatrix(const CNcbiMatrix<double>& mat);
77  // Read from a stream in the format used by Phylip
78  void Read(istream &istr, EFormat format = eGuess);
79 private:
80  // Prohibit copy constructor and assignment operator
83 
84 };
85 
86 /////////////////// CDistanceMatrix inline methods
87 
88 // constructor
89 inline
91 {
92 }
93 
94 
95 /////////////////// end of CDistanceMatrix inline methods
96 
97 
98 END_objects_SCOPE // namespace ncbi::objects::
99 
101 
102 #endif // OBJECTS_BIOTREE_DISTANCEMATRIX_HPP
103 /* Original file checksum: lines: 94, chars: 2678, CRC32: a1f7b9a8 */
Data storage class.
CDistanceMatrix_Base –.
CDistanceMatrix_Base Tparent
CDistanceMatrix(const CDistanceMatrix &value)
CDistanceMatrix & operator=(const CDistanceMatrix &value)
EFormat
The formats are checked in the same order as declared here.
void Read(CObjectIStream &in, TObjectPtr object, const CTypeRef &type)
Definition: serial.cpp:60
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_BIOTREE_EXPORT
Definition: ncbi_export.h:320
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static Format format
Definition: njn_ioutil.cpp:53
Modified on Sun Apr 14 05:28:55 2024 by modify_doxy.py rev. 669887