Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
ink.cpp File Reference
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <common/types.h>
#include <common/globals.h>
#include <sparse/general.h>
#include <mingle/ink.h>
#include <vector>
Include dependency graph for ink.cpp:

Go to the source code of this file.

Functions

static point_t addPoint (point_t a, point_t b)
 
static point_t subPoint (point_t a, point_t b)
 
static point_t scalePoint (point_t a, double d)
 
static double dotPoint (point_t a, point_t b)
 
static double sumLengths_avoid_bad_angle (const std::vector< point_t > &points, point_t end, point_t meeting, double angle_param)
 
static double sumLengths (const std::vector< point_t > &points, point_t end, point_t meeting)
 
static double bestInk (const std::vector< point_t > &points, point_t begin, point_t end, double prec, point_t *meet, double angle_param)
 
static double project_to_line (point_t pt, point_t left, point_t right, double angle)
 
double ink (const std::vector< pedge > &edges, int numEdges, int *pick, double *ink0, point_t *meet1, point_t *meet2, double angle_param, double angle)
 
double ink1 (const pedge &e)
 

Variables

double ink_count
 
static const point_t Origin = {0, 0}
 

Function Documentation

◆ addPoint()

static point_t addPoint ( point_t  a,
point_t  b 
)
static

Definition at line 22 of file ink.cpp.

References point_t::x, and point_t::y.

Referenced by bestInk(), and ink().

Here is the caller graph for this function:

◆ bestInk()

static double bestInk ( const std::vector< point_t > &  points,
point_t  begin,
point_t  end,
double  prec,
point_t meet,
double  angle_param 
)
static

Definition at line 97 of file ink.cpp.

References addPoint(), dotPoint(), points, scalePoint(), subPoint(), sumLengths(), and sumLengths_avoid_bad_angle().

Referenced by ink().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dotPoint()

static double dotPoint ( point_t  a,
point_t  b 
)
static

Definition at line 43 of file ink.cpp.

References point_t::x, and point_t::y.

Referenced by bestInk(), and project_to_line().

Here is the caller graph for this function:

◆ ink()

double ink ( const std::vector< pedge > &  edges,
int  numEdges,
int *  pick,
double *  ink0,
point_t meet1,
point_t meet2,
double  angle_param,
double  angle 
)

Definition at line 226 of file ink.cpp.

References addPoint(), bestInk(), pedge::dim, ink_count, M_PI, pedge::npoints, Origin, project_to_line(), scalePoint(), subPoint(), vector_sort_int(), pedge::wgt, pedge::x, point_t::x, and point_t::y.

Referenced by Agglomerative_Ink_Bundling_establish(), agglomerative_ink_bundling_internal(), and modularity_ink_bundling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ink1()

double ink1 ( const pedge e)

Definition at line 307 of file ink.cpp.

References pedge::dim, pedge::npoints, and pedge::x.

Referenced by Agglomerative_Ink_Bundling_establish(), Agglomerative_Ink_Bundling_init(), agglomerative_ink_bundling_internal(), and modularity_ink_bundling().

Here is the caller graph for this function:

◆ project_to_line()

static double project_to_line ( point_t  pt,
point_t  left,
point_t  right,
double  angle 
)
static

Definition at line 177 of file ink.cpp.

References alpha, dotPoint(), left, M_PI, right, and subPoint().

Referenced by ink().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalePoint()

static point_t scalePoint ( point_t  a,
double  d 
)
static

Definition at line 36 of file ink.cpp.

References point_t::x, and point_t::y.

Referenced by bestInk(), and ink().

Here is the caller graph for this function:

◆ subPoint()

static point_t subPoint ( point_t  a,
point_t  b 
)
static

Definition at line 29 of file ink.cpp.

References point_t::x, and point_t::y.

Referenced by bestInk(), ink(), and project_to_line().

Here is the caller graph for this function:

◆ sumLengths()

static double sumLengths ( const std::vector< point_t > &  points,
point_t  end,
point_t  meeting 
)
static

Definition at line 77 of file ink.cpp.

References points, point_t::x, and point_t::y.

Referenced by bestInk().

Here is the caller graph for this function:

◆ sumLengths_avoid_bad_angle()

static double sumLengths_avoid_bad_angle ( const std::vector< point_t > &  points,
point_t  end,
point_t  meeting,
double  angle_param 
)
static

Definition at line 51 of file ink.cpp.

References len(), points, point_t::x, and point_t::y.

Referenced by bestInk().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ink_count

double ink_count

Definition at line 20 of file ink.cpp.

Referenced by agglomerative_ink_bundling(), and ink().

◆ Origin

const point_t Origin = {0, 0}
static

Definition at line 47 of file ink.cpp.

Referenced by ink().