dyng
DynamicGraphLayout
|
#include <foresighted_layout.h>
Public Member Functions | |
foresighted_layout (float tolerance, float canvas_width, float canvas_height, coords center=coords()) | |
foresighted_layout (float tolerance) | |
void | set_canvas (float w, float h, coords center=coords()) |
void | set_tolerance (float tolerance) |
void | use_relative_distance (bool relative) |
Sets whether to use relative or absolute mental distance calculations. More... | |
const StaticLayout & | static_layout () const |
Returns the Layout object used for static layout. | |
StaticLayout & | static_layout () |
Returns the Layout object used for static layout. | |
void | set_cooling (cooling c) |
Sets a different cooling strategy. | |
void | operator() (dynamic_graph &dgraph) |
Performs the algorithm on a dynamic graph. | |
Protected Member Functions | |
virtual void | tolerance (std::vector< graph_state > &states, float width, float height, float tolerance_value) |
void | basic_layout (std::vector< graph_state > &states, float width, float height) |
void | rescale (graph_state &graph, float src_width, float src_height, float dst_width, float dst_height) const |
void | move (graph_state &graph, float src_x, float src_y, float dst_x, float dst_y) const |
node_live_sets | node_live_times (const std::vector< graph_state > &states) const |
edge_live_sets | edge_live_times (const std::vector< graph_state > &states) const |
graph_state | calculate_supergraph (const std::vector< graph_state > &animation) const |
detail::mapped_graph | calculate_gap (const graph_state &supergraph, const node_live_sets &nodes_live, const edge_live_sets &edges_live) const |
detail::mapped_graph | calculate_rgap (detail::mapped_graph gap) const |
unsigned | max_nodes (std::vector< graph_state > &states) const |
float | distance (const graph_state &one, const graph_state &two) const |
Protected Attributes | |
float | m_tolerance |
float | m_canvas_width |
float | m_canvas_height |
coords | m_center |
cooling | m_cooling { 250, 0.4, [](float t){ return t * 0.977; } } |
StaticLayout | m_static_layout |
bool | m_relative_distance = true |
Static Protected Attributes | |
static constexpr float | CalculationHeight = 1 |
An implementation of the Foresighted Layout with Tolerance algorithm. Used as a function object. Uses Layout to create a static layout of a graph that represents the whole sequence. Then it applies tolerance to increase the quality of individual states.
(Described in section 6.1.2 – as the alias 'default_layout')
StaticLayout | Function object that creates static layout and also can be applied as singular iterations to improve the layouts. |
|
inline |
Sets the tolerance and also sets the dimensions of the canvas where graph layout will be located and also sets the center point. This means that every node will be located in (x - w/2, x + w/2) and (y - h/2, y + h/2).
|
inline |
This method sets the dimensions of the canvas where graph layout will be located and sets the center point to (x, y). This means that every node will be located in [x - w/2, x + w/2] and [y - h/2, y + h/2].
|
inline |
Sets whether to use relative or absolute mental distance calculations.
By default relative is used.