Chemical Data Processing Library C++ API - Version 1.1.1
GaussianShapeOverlapFunction.hpp
Go to the documentation of this file.
1 /*
2  * GaussianShapeOverlapFunction.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_SHAPE_GAUSSIANSHAPEOVERLAPFUNCTION_HPP
30 #define CDPL_SHAPE_GAUSSIANSHAPEOVERLAPFUNCTION_HPP
31 
32 #include <cstddef>
33 #include <memory>
34 #include <functional>
35 
36 #include "CDPL/Shape/APIPrefix.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Shape
44  {
45 
46  class GaussianShapeFunction;
47 
49  {
50 
51  public:
52  typedef std::shared_ptr<GaussianShapeOverlapFunction> SharedPointer;
53 
54  typedef std::function<bool(std::size_t)> ColorFilterFunction;
55  typedef std::function<bool(std::size_t, std::size_t)> ColorMatchFunction;
56 
58 
59  virtual void setShapeFunction(const GaussianShapeFunction& func, bool is_ref) = 0;
60 
61  virtual const GaussianShapeFunction* getShapeFunction(bool ref) const = 0;
62 
63  virtual void setColorMatchFunction(const ColorMatchFunction& func) = 0;
64 
65  virtual const ColorMatchFunction& getColorMatchFunction() const = 0;
66 
67  virtual void setColorFilterFunction(const ColorFilterFunction& func) = 0;
68 
69  virtual const ColorFilterFunction& getColorFilterFunction() const = 0;
70 
71  virtual double calcSelfOverlap(bool ref) const = 0;
72 
73  virtual double calcColorSelfOverlap(bool ref) const = 0;
74 
75  virtual double calcOverlap() const = 0;
76 
77  virtual double calcColorOverlap() const = 0;
78 
79  virtual double calcOverlap(const Math::Vector3DArray& coords) const = 0;
80 
81  virtual double calcColorOverlap(const Math::Vector3DArray& coords) const = 0;
82 
83  virtual double calcOverlapGradient(const Math::Vector3DArray& coords, Math::Vector3DArray& grad) const = 0;
84 
85  protected:
87 
89 
91  {
92  return *this;
93  }
94  };
95  } // namespace Shape
96 } // namespace CDPL
97 
98 #endif // CDPL_SHAPE_GAUSSIANSHAPEOVERLAPFUNCTION_HPP
VectorArray.hpp
Definition of the class CDPL::Math::VectorArray.
CDPL::Shape::GaussianShapeOverlapFunction::getColorFilterFunction
virtual const ColorFilterFunction & getColorFilterFunction() const =0
CDPL::Shape::GaussianShapeOverlapFunction::getColorMatchFunction
virtual const ColorMatchFunction & getColorMatchFunction() const =0
CDPL::Shape::GaussianShapeOverlapFunction::calcOverlap
virtual double calcOverlap(const Math::Vector3DArray &coords) const =0
CDPL::Shape::GaussianShapeOverlapFunction::calcOverlap
virtual double calcOverlap() const =0
CDPL::Shape::GaussianShapeOverlapFunction::ColorMatchFunction
std::function< bool(std::size_t, std::size_t)> ColorMatchFunction
Definition: GaussianShapeOverlapFunction.hpp:55
CDPL::Shape::GaussianShapeOverlapFunction::calcColorOverlap
virtual double calcColorOverlap(const Math::Vector3DArray &coords) const =0
CDPL::Shape::GaussianShapeOverlapFunction::SharedPointer
std::shared_ptr< GaussianShapeOverlapFunction > SharedPointer
Definition: GaussianShapeOverlapFunction.hpp:52
bool
VectorArray< Vector3D >
CDPL::Shape::GaussianShapeOverlapFunction::getShapeFunction
virtual const GaussianShapeFunction * getShapeFunction(bool ref) const =0
CDPL::Shape::GaussianShapeOverlapFunction::setColorFilterFunction
virtual void setColorFilterFunction(const ColorFilterFunction &func)=0
CDPL::Shape::GaussianShapeOverlapFunction::calcOverlapGradient
virtual double calcOverlapGradient(const Math::Vector3DArray &coords, Math::Vector3DArray &grad) const =0
CDPL::Shape::GaussianShapeOverlapFunction::setShapeFunction
virtual void setShapeFunction(const GaussianShapeFunction &func, bool is_ref)=0
CDPL::Shape::GaussianShapeOverlapFunction
Definition: GaussianShapeOverlapFunction.hpp:49
CDPL::Shape::GaussianShapeFunction
Definition: GaussianShapeFunction.hpp:53
CDPL_SHAPE_API
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL
The namespace of the Chemical Data Processing Library.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_SHAPE_API.
CDPL::Shape::GaussianShapeOverlapFunction::calcColorOverlap
virtual double calcColorOverlap() const =0
CDPL::Shape::GaussianShapeOverlapFunction::operator=
GaussianShapeOverlapFunction & operator=(const GaussianShapeOverlapFunction &func)
Definition: GaussianShapeOverlapFunction.hpp:90
CDPL::Shape::GaussianShapeOverlapFunction::calcColorSelfOverlap
virtual double calcColorSelfOverlap(bool ref) const =0
CDPL::Shape::GaussianShapeOverlapFunction::setColorMatchFunction
virtual void setColorMatchFunction(const ColorMatchFunction &func)=0
CDPL::Shape::GaussianShapeOverlapFunction::GaussianShapeOverlapFunction
GaussianShapeOverlapFunction(const GaussianShapeOverlapFunction &func)
Definition: GaussianShapeOverlapFunction.hpp:88
CDPL::Shape::GaussianShapeOverlapFunction::~GaussianShapeOverlapFunction
virtual ~GaussianShapeOverlapFunction()
Definition: GaussianShapeOverlapFunction.hpp:57
CDPL::Shape::GaussianShapeOverlapFunction::calcSelfOverlap
virtual double calcSelfOverlap(bool ref) const =0
CDPL::Shape::GaussianShapeOverlapFunction::ColorFilterFunction
std::function< bool(std::size_t)> ColorFilterFunction
Definition: GaussianShapeOverlapFunction.hpp:54
CDPL::Shape::GaussianShapeOverlapFunction::GaussianShapeOverlapFunction
GaussianShapeOverlapFunction()
Definition: GaussianShapeOverlapFunction.hpp:86