main page
namespaces
classes
files
GGL home
Generated on Wed Apr 29 2015 11:51:40 for GGL-4.1.2 by
doxygen
1.8.3.1
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
src
sgm
NSPDK_port.hh
Go to the documentation of this file.
1
/*
2
* NSPDK_port.hh
3
*
4
* Created on: 11.05.2011
5
* Author: mmann
6
*/
7
8
#ifndef NSPDK_PORT_HH_
9
#define NSPDK_PORT_HH_
10
11
#include "
sgm/Graph_Interface.hh
"
12
#include "nspdk/GraphClass.h"
13
#include "nspdk/NSPDK_FeatureGenerator.h"
14
15
16
namespace
sgm {
17
18
/*! @brief Ports NSPDK functionality to SGM
19
*
20
* A utility class that ports the functionalities of the NSPDK graph kernel
21
* for its application the SGM library.
22
*
23
* @author Martin Mann (c) 2008 http://www.bioinf.uni-freiburg.de/~mmann/
24
*/
25
class
NSPDK_port
{
26
27
public
:
28
29
//! Sparse vector definition that represents the features of a graph
30
typedef
nspdk::SVector
FeatureVector
;
31
32
//! List of view points to localize the feature generation
33
typedef
std::vector< unsigned >
ViewPointList
;
34
35
protected
:
36
37
//! The standard NSPDK feature generator
38
static
39
nspdk::NSPDK_FeatureGenerator
featureGenerator_nspdk
;
40
41
public
:
42
43
/*!
44
* Initializes an NSPDK graph object from a given Graph_Interface.
45
*
46
* @param iG IN the graph to be used for the initialization
47
* @param oG OUT the EMPTY graph object to be filled
48
*
49
*/
50
static
51
void
setGraphFromGraphInterface
(
const
Graph_Interface
& iG
52
, nspdk::GraphClass & oG);
53
54
/*!
55
* Computes the feature vector for a given graph
56
*
57
* @param g IN the graph that has to be screened for features
58
* @param maxDistance the maximal distance between subgraphs to
59
* generate features
60
* @param maxRadius the maximal radius between subgraphs to
61
* generate features
62
* @param viewPoints IN optional list of view points to localize the
63
* feature generation to the according subgraph and its
64
* surrounding
65
* @param featureBitSize number of bits to represent the feature space
66
*
67
* @return the feature vector describing the graph g
68
*/
69
static
70
FeatureVector
71
getFeatures
( nspdk::GraphClass & g
72
,
const
size_t
maxDistance
73
,
const
size_t
maxRadius
74
,
const
ViewPointList
& viewPoints =
ViewPointList
()
75
,
const
int
featureBitSize = 30
76
);
77
78
79
/*!
80
* Computes the feature vector for each node of a given graph
81
*
82
* @param g IN the graph that has to be screened for features
83
* @param maxDistance the maximal distance between subgraphs to
84
* generate features
85
* @param maxRadius the maximal radius between subgraphs to
86
* generate features
87
* @param viewPoints IN optional list of view points to localize the
88
* feature generation to the according subgraph and its
89
* surrounding
90
* @param featureBitSize number of bits to represent the feature space
91
*
92
* @return the feature vector describing the graph g for each node
93
*/
94
static
95
std::vector<NSPDK_port::FeatureVector>
96
getNodeFeatures
( nspdk::GraphClass & g
97
,
const
size_t
maxDistance
98
,
const
size_t
maxRadius
99
,
const
ViewPointList
& viewPoints =
ViewPointList
()
100
,
const
int
featureBitSize = 30
101
);
102
103
104
};
105
106
107
}
// namespace sgm
108
109
110
111
#endif
/* NSPDK_PORT_HH_ */