50 return std::numeric_limits<T>::has_infinity && value == std::numeric_limits<T>::infinity();
60 : m_numberOfPivots(250)
63 , m_hasEdgeCostsAttribute(false)
64 , m_forcing2DLayout(false) { }
71 m_numberOfPivots = std::max(numberOfPivots, m_dimensionCount);
96 m_hasEdgeCostsAttribute = useEdgeCostsAttribute;
109 const static unsigned int SEED = 0;
Declaration and implementation of Array class and Array algorithms.
Includes declaration of graph class.
Declaration of interface for layout algorithms (class LayoutModule)
Basic declarations, included by all source files.
The parameterized class Array implements dynamic arrays of type E.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Interface of general layout algorithms.
Class for the representation of nodes.
The Pivot MDS (multi-dimensional scaling) layout algorithm.
void copySPSS(Array< double > ©To, NodeArray< double > ©From)
void doPathLayout(GraphAttributes &GA, const node &v)
Computes the layout of a path.
double normalize(Array< double > &x)
Normalizes the vector x.
virtual void call(GraphAttributes &GA) override
Calls the layout algorithm for graph attributes GA.
bool isForcing2DLayout() const
Returns whether a 2D-layout is calculated even when GraphAttributes::threeD is set.
void pivotMDSLayout(GraphAttributes &GA)
Computes the pivot mds layout of the given connected graph of GA.
void eigenValueDecomposition(Array< Array< double > > &K, Array< Array< double > > &eVecs, Array< double > &eValues)
Computes the eigen value decomposition based on power iteration.
double prod(const Array< double > &x, const Array< double > &y)
Computes the product of two vectors x and y.
void setNumberOfPivots(int numberOfPivots)
Sets the number of pivots. If the new value is smaller or equal 0 the default value (250) is used.
int m_numberOfPivots
The number of pivots.
void setEdgeCosts(double edgeCosts)
Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default ...
static const double FACTOR
Factor used to center the pivot matrix.
bool m_forcing2DLayout
Whether a 2D-layout is calculated even when GraphAttributes::threeD is set.
bool m_hasEdgeCostsAttribute
Tells whether the pivot mds is based on uniform edge costs or a edge costs attribute.
void useEdgeCostsAttribute(bool useEdgeCostsAttribute)
void getPivotDistanceMatrix(const GraphAttributes &GA, Array< Array< double > > &pivDistMatrix)
Computes the pivot distance matrix based on the maxmin strategy.
double m_edgeCosts
The costs to traverse an edge.
void selfProduct(const Array< Array< double > > &d, Array< Array< double > > &result)
Computes the self product of d.
node getRootedPath(const Graph &G)
Checks whether the given graph is a path or not.
void setForcing2DLayout(bool forcing2DLayout)
Sets whether a 2D-layout should be calculated even when GraphAttributes::threeD is set.
void singularValueDecomposition(Array< Array< double > > &K, Array< Array< double > > &eVecs, Array< double > &eVals)
Computes the singular value decomposition of matrix K.
int m_dimensionCount
The dimension count determines the number of evecs that will be computed. Nevertheless PivotMDS only ...
void centerPivotmatrix(Array< Array< double > > &pivotMatrix)
Centers the pivot matrix.
void randomize(Array< Array< double > > &matrix)
Fills the given matrix with random doubles d 0 <= d <= 1.
static const double EPSILON
Convergence factor used for power iteration.
bool useEdgeCostsAttribute() const
RegisteredArray for nodes, edges and adjEntries of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
The namespace for all OGDF objects.