graphToPrototype: Convert graph to a prototype

View source: R/cluster_distances.R

graphToPrototypeR Documentation

Convert graph to a prototype

Description

A graph prototype consists of the starting and ending points of each path in the graph, as well as and evenly spaced points along each path. The prototype also stores the center point of the graph. All points are represented as xy-coordinates and the center point is at (0,0).

Usage

graphToPrototype(graph, numPathCuts = 8)

Arguments

graph

A graph from a handwriting sample

numPathCuts

Number of segments to cut the path(s) into

Value

List of pathEnds, pathQuarters, and pathCenters given as (x,y) coordinates with the graph centroid at (0,0). The returned list also contains path lengths. pathQuarters gives the (x,y) coordinates of the path at the cut points and despite the name, the path might not be cut into quarters.


handwriter documentation built on Oct. 25, 2024, 1:06 a.m.