public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static boolean |
between(double value,
double end1,
double end2) |
static double |
distance(Point2D v,
Point2D v1,
Point2D v2) |
static Graph |
generateHennebergGraph(int n,
boolean isTriangleFree) |
static Graph |
generateListGraph(int n) |
static java.util.LinkedList<Cluster> |
getDecompose(Graph g) |
static java.awt.Color |
randomColor(int seed) |
static Point2D |
solve(Point2D p1,
Point2D p2,
double r1,
double r2,
int orient)
Given coordinates of two base vertices, two bar lengths and local
orientation, solve for a third point constructed using ruler-and-compass
|
public static Graph generateListGraph(int n)
public static Graph generateHennebergGraph(int n, boolean isTriangleFree)
public static java.awt.Color randomColor(int seed)
public static boolean between(double value, double end1, double end2)
public static Point2D solve(Point2D p1, Point2D p2, double r1, double r2, int orient)
orient
- +1: v1->v clockwise from v1->v2; -1: counterclockwise; 0:
collinear | don't care