Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::ProcrustesSubLayout Class Reference

Simple procrustes analysis. More...

#include <ogdf/misclayout/ProcrustesSubLayout.h>

+ Inheritance diagram for ogdf::ProcrustesSubLayout:

Public Member Functions

 ProcrustesSubLayout (LayoutModule *pSubLayout)
 Constructor.
 
virtual ~ProcrustesSubLayout ()
 Destructor.
 
virtual void call (GraphAttributes &GA) override
 Computes a layout of graph GA.
 
bool scaleToInitialLayout () const
 Should the new layout scale be used or the initial scale? Defaults to true.
 
void setScaleToInitialLayout (bool flag)
 Should the new layout scale be used or the initial scale? Defaults to true.
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module.
 
virtual ~LayoutModule ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA.
 

Private Member Functions

void copyFromGraphAttributes (const GraphAttributes &graphAttributes, ProcrustesPointSet &pointSet)
 Copies the coords in graph attributes to the point set.
 
void flipY (GraphAttributes &graphAttributes)
 Flips all y coordinates.
 
void reverseTransform (GraphAttributes &graphAttributes, const ProcrustesPointSet &pointSet)
 Does a reverse transform of graph attributes by using the origin, scale and angle in pointset.
 
void rotate (GraphAttributes &graphAttributes, double angle)
 Rotates all coords in graphAttributes by angle.
 
void scale (GraphAttributes &graphAttributes, double scale)
 Scales all coords in graphAttributes by scale.
 
void translate (GraphAttributes &graphAttributes, double dx, double dy)
 Moves all coords in graphAttributes by dx, dy.
 

Private Attributes

LayoutModulem_pSubLayout
 Layout module to call for a new layout.
 
bool m_scaleToInitialLayout
 Option for enabling/disabling scaling to initial layout scale.
 

Detailed Description

Simple procrustes analysis.

Definition at line 108 of file ProcrustesSubLayout.h.

Constructor & Destructor Documentation

◆ ProcrustesSubLayout()

ogdf::ProcrustesSubLayout::ProcrustesSubLayout ( LayoutModule pSubLayout)
explicit

Constructor.

◆ ~ProcrustesSubLayout()

virtual ogdf::ProcrustesSubLayout::~ProcrustesSubLayout ( )
inlinevirtual

Destructor.

Definition at line 114 of file ProcrustesSubLayout.h.

Member Function Documentation

◆ call()

virtual void ogdf::ProcrustesSubLayout::call ( GraphAttributes GA)
overridevirtual

Computes a layout of graph GA.

This method is the actual algorithm call and must be implemented by derived classes.

Parameters
GAis the input graph and will also be assigned the layout information.

Implements ogdf::LayoutModule.

◆ copyFromGraphAttributes()

void ogdf::ProcrustesSubLayout::copyFromGraphAttributes ( const GraphAttributes graphAttributes,
ProcrustesPointSet pointSet 
)
private

Copies the coords in graph attributes to the point set.

◆ flipY()

void ogdf::ProcrustesSubLayout::flipY ( GraphAttributes graphAttributes)
private

Flips all y coordinates.

◆ reverseTransform()

void ogdf::ProcrustesSubLayout::reverseTransform ( GraphAttributes graphAttributes,
const ProcrustesPointSet pointSet 
)
private

Does a reverse transform of graph attributes by using the origin, scale and angle in pointset.

◆ rotate()

void ogdf::ProcrustesSubLayout::rotate ( GraphAttributes graphAttributes,
double  angle 
)
private

Rotates all coords in graphAttributes by angle.

◆ scale()

void ogdf::ProcrustesSubLayout::scale ( GraphAttributes graphAttributes,
double  scale 
)
private

Scales all coords in graphAttributes by scale.

◆ scaleToInitialLayout()

bool ogdf::ProcrustesSubLayout::scaleToInitialLayout ( ) const
inline

Should the new layout scale be used or the initial scale? Defaults to true.

Definition at line 122 of file ProcrustesSubLayout.h.

◆ setScaleToInitialLayout()

void ogdf::ProcrustesSubLayout::setScaleToInitialLayout ( bool  flag)
inline

Should the new layout scale be used or the initial scale? Defaults to true.

Definition at line 119 of file ProcrustesSubLayout.h.

◆ translate()

void ogdf::ProcrustesSubLayout::translate ( GraphAttributes graphAttributes,
double  dx,
double  dy 
)
private

Moves all coords in graphAttributes by dx, dy.

Member Data Documentation

◆ m_pSubLayout

LayoutModule* ogdf::ProcrustesSubLayout::m_pSubLayout
private

Layout module to call for a new layout.

Definition at line 145 of file ProcrustesSubLayout.h.

◆ m_scaleToInitialLayout

bool ogdf::ProcrustesSubLayout::m_scaleToInitialLayout
private

Option for enabling/disabling scaling to initial layout scale.

Definition at line 148 of file ProcrustesSubLayout.h.


The documentation for this class was generated from the following file: