Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkConnectomicsSimulatedAnnealingCostFunctionModularity.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkConnectomicsSimulatedAnnealingCostFunctionModularity_h
18 #define mitkConnectomicsSimulatedAnnealingCostFunctionModularity_h
19 
21 
23 
24 namespace mitk
25 {
29  {
30  public:
31 
33  typedef std::map< VertexDescriptorType, int > ToModuleMapType;
34  typedef std::map< VertexDescriptorType, VertexDescriptorType > VertexToVertexMapType;
35 
40  itkFactorylessNewMacro(Self)
41  itkCloneMacro(Self)
42 
43  // Evaluate the network according to the set cost function
44  double Evaluate( mitk::ConnectomicsNetwork::Pointer network, ToModuleMapType *vertexToModuleMap ) const;
45 
46  // Will calculate and return the modularity of the network
47  double CalculateModularity( mitk::ConnectomicsNetwork::Pointer network, ToModuleMapType *vertexToModuleMap ) const;
48 
49 
50  protected:
51 
52  // returns the number of modules
53  int getNumberOfModules( ToModuleMapType *vertexToModuleMap ) const;
54 
58 
59  };
60 
61 }// end namespace mitk
62 
63 #endif // mitkConnectomicsSimulatedAnnealingCostFunctionModularity_h
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
boost::graph_traits< NetworkType >::vertex_descriptor VertexDescriptorType
Connectomics Network Class.
A generic base class for cost functions for use in simulated annealing.