reformat all code

This commit is contained in:
Leijurv
2023-03-15 13:30:23 -07:00
parent 2af6dec3df
commit 8ee36bcd46
23 changed files with 341 additions and 203 deletions

View File

@@ -2,9 +2,13 @@ package com.github.btrekkie.connectivity;
import java.util.Random;
/** A vertex in a ConnGraph. See the comments for ConnGraph. */
/**
* A vertex in a ConnGraph. See the comments for ConnGraph.
*/
public class ConnVertex {
/** The thread-local random number generator we use by default to set the "hash" field. */
/**
* The thread-local random number generator we use by default to set the "hash" field.
*/
private static final ThreadLocal<Random> random = new ThreadLocal<Random>() {
@Override
protected Random initialValue() {
@@ -24,8 +28,9 @@ public class ConnVertex {
/**
* Constructs a new ConnVertex.
*
* @param random The random number generator to use to produce a random hash code. ConnGraph relies on random hash
* codes for its performance guarantees.
* codes for its performance guarantees.
*/
public ConnVertex(Random random) {
hash = random.nextInt();