Modifier and Type | Method and Description |
---|---|
static List<List<Double>> |
getNJunctionAngles(Collection<Vertex> vertices)
Calculates the angles between the branches of each vertex.
|
static Map<Integer,List<Vertex>> |
groupByValence(Collection<Vertex> vertices,
int min,
int max)
Groups vertices by their valence, i.e.
|
public static List<List<Double>> getNJunctionAngles(Collection<Vertex> vertices)
For example, if a vertex has 3 branches, it's returned as a list of 3 angles. That is, angles between branches 1-2, 1-3 and 2-3. A vertex with no branches or only one branch returns an empty list.
Angle between branches 1 and 2 is measured from their respective end points (vertices opposite the current "junction", i.e. the vertex being processed).
vertices
- vertices from a graph.public static Map<Integer,List<Vertex>> groupByValence(Collection<Vertex> vertices, int min, int max) throws IllegalArgumentException
Only vertices with valence in the given range are grouped.
vertices
- vertices from a graphmin
- minimum valance (inclusive) for grouped verticesmax
- maximum valence (inclusive) for grouped verticesIllegalArgumentException
- if min < 0, or min > max.Copyright © 2015–2021 Fiji. All rights reserved.