Chemical Data Processing Library C++ API - Version 1.1.1
AutoCorrelation2DVectorCalculator.hpp
Go to the documentation of this file.
1 /*
2  * AutoCorrelation2DVectorCalculator.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_DESCR_AUTOCORRELATION2DVECTORCALCULATOR_HPP
30 #define CDPL_DESCR_AUTOCORRELATION2DVECTORCALCULATOR_HPP
31 
32 #include <cstddef>
33 #include <functional>
34 
35 #include "CDPL/Descr/APIPrefix.hpp"
36 #include "CDPL/Math/Vector.hpp"
37 
38 
39 namespace CDPL
40 {
41 
42  namespace Chem
43  {
44 
45  class MolecularGraph;
46  class Atom;
47 
48  } // namespace Chem
49 
50  namespace Descr
51  {
52 
58  {
59 
60  public:
68  typedef std::function<double(const Chem::Atom&, const Chem::Atom&)> AtomPairWeightFunction;
69 
74 
85 
91  void setMaxDistance(std::size_t max_dist);
92 
97  std::size_t getMaxDistance() const;
98 
106 
118  void calculate(const Chem::MolecularGraph& molgraph, Math::DVector& corr_vec);
119 
120  private:
121  AtomPairWeightFunction weightFunc;
122  std::size_t maxDist;
123  };
124  } // namespace Descr
125 } // namespace CDPL
126 
127 #endif // CDPL_DESCR_AUTOCORRELATION2DVECTORCALCULATOR_HPP
CDPL::Math::Vector< double >
CDPL::Descr::AutoCorrelation2DVectorCalculator::calculate
void calculate(const Chem::MolecularGraph &molgraph, Math::DVector &corr_vec)
Calculates the topological autocorrelation vector of the molecular graph molgraph.
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
CDPL::Descr::AutoCorrelation2DVectorCalculator::AutoCorrelation2DVectorCalculator
AutoCorrelation2DVectorCalculator(const Chem::MolecularGraph &molgraph, Math::DVector &corr_vec)
Constructs the AutoCorrelation2DVectorCalculator instance and calculates the autocorrelation vector o...
CDPL::Descr::AutoCorrelation2DVectorCalculator::AutoCorrelation2DVectorCalculator
AutoCorrelation2DVectorCalculator()
Constructs the AutoCorrelation2DVectorCalculator instance.
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::Descr::AutoCorrelation2DVectorCalculator::getMaxDistance
std::size_t getMaxDistance() const
Returns the maximum considered bond path length.
double
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Descr::AutoCorrelation2DVectorCalculator::AtomPairWeightFunction
std::function< double(const Chem::Atom &, const Chem::Atom &)> AtomPairWeightFunction
Type of the generic functor class used to store user-defined atom pair weight functions.
Definition: AutoCorrelation2DVectorCalculator.hpp:68
CDPL::Descr::AutoCorrelation2DVectorCalculator
AutoCorrelation2DVectorCalculator.
Definition: AutoCorrelation2DVectorCalculator.hpp:58
CDPL::Descr::AutoCorrelation2DVectorCalculator::setAtomPairWeightFunction
void setAtomPairWeightFunction(const AtomPairWeightFunction &func)
Allows to specify a custom atom pair weight function.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_DESCR_API.
CDPL_DESCR_API
#define CDPL_DESCR_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Vector.hpp
Definition of vector data types.
CDPL::Descr::AutoCorrelation2DVectorCalculator::setMaxDistance
void setMaxDistance(std::size_t max_dist)
Allows to specify that maximum bond path length to consider.