Skip to content

Commit

Permalink
Fix javadoc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trickl committed Mar 30, 2019
1 parent 2544ff0 commit 91975e2
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 776 deletions.
280 changes: 84 additions & 196 deletions src/main/java/com/trickl/math/ChainPermutator.java

Large diffs are not rendered by default.

254 changes: 62 additions & 192 deletions src/main/java/com/trickl/math/IntArrayPermutator.java

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/main/java/com/trickl/math/PairedPermutator.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
*
* @deprecated Use ChainPermutator directly
* @author tgee
* @version $Id: $Id
*/
@Deprecated
public class PairedPermutator extends ChainPermutator {
/**
* <p>Constructor for PairedPermutator.</p>
*
* @param pair an array of int.
*/
public PairedPermutator(int pair[]) {
super(new IntArrayPermutator(pair), new StandardPermutator());
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/trickl/math/Permutations.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* 2) (4 3 1 2) (2 3 4 1) (3 2 4 1) (2 4 3 1) (4 2 3 1) (3 4 2 1) (4 3 2 1).
*
* @author tgee
* @version $Id: $Id
*/
public final class Permutations {

Expand Down
37 changes: 19 additions & 18 deletions src/main/java/com/trickl/math/Permutator.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* Permutators are responsible for reordering the elements in arrays.
*
* @author tgee
* @version $Id: $Id
*/
public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -21,7 +22,7 @@ public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -33,7 +34,7 @@ public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -45,7 +46,7 @@ public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -57,7 +58,7 @@ public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -69,7 +70,7 @@ public interface Permutator {

/**
* Perform a three cycle permutation.
* [ 1, 2, 3 ] -> [ 2, 3, 1 ]
* [ 1, 2, 3 ] -&gt; [ 2, 3, 1 ]
*
* @param <T> The type of the array
* @param S The array
Expand All @@ -82,7 +83,7 @@ public interface Permutator {

/**
* Perform a four cycle permutation.
* [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -95,7 +96,7 @@ public interface Permutator {

/**
* Perform a four cycle permutation.
* [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -107,7 +108,7 @@ public interface Permutator {
char[] cycle(char[] S, int first, int second, int third, int fourth);

/**
* Perform a four cycle permutation [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* Perform a four cycle permutation [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -119,7 +120,7 @@ public interface Permutator {
float[] cycle(float[] S, int first, int second, int third, int fourth);

/**
* Perform a four cycle permutation [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* Perform a four cycle permutation [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -131,7 +132,7 @@ public interface Permutator {
double[] cycle(double[] S, int first, int second, int third, int fourth);

/**
* Perform a four cycle permutation [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* Perform a four cycle permutation [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -143,7 +144,7 @@ public interface Permutator {
int[] cycle(int[] S, int first, int second, int third, int fourth);

/**
* Perform a four cycle permutation [ 1, 2, 3, 4] -> [ 2, 3, 4, 1]
* Perform a four cycle permutation [ 1, 2, 3, 4] -&gt; [ 2, 3, 4, 1]
*
* @param <T> The type of the array
* @param S The array
Expand All @@ -156,7 +157,7 @@ public interface Permutator {
<T> T[] cycle(T[] S, int first, int second, int third, int fourth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -169,7 +170,7 @@ public interface Permutator {
short[] cycle(short[] S, int first, int second, int third, int fourth, int fifth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -182,7 +183,7 @@ public interface Permutator {
char[] cycle(char[] S, int first, int second, int third, int fourth, int fifth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -195,7 +196,7 @@ public interface Permutator {
float[] cycle(float[] S, int first, int second, int third, int fourth, int fifth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -208,7 +209,7 @@ public interface Permutator {
double[] cycle(double[] S, int first, int second, int third, int fourth, int fifth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param S The array
* @param first The index of the first element to swap
Expand All @@ -221,7 +222,7 @@ public interface Permutator {
int[] cycle(int[] S, int first, int second, int third, int fourth, int fifth);

/**
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -> [ 2, 3, 4, 5, 1]
* Perform a five cycle permutation [ 1, 2, 3, 4, 5] -&gt; [ 2, 3, 4, 5, 1]
*
* @param <T> The data type of the array
* @param S The array
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/com/trickl/math/Quaternion.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* http://en.wikipedia.org/wiki/Quaternion
*
* @author tgee
* @version $Id: $Id
*/
public class Quaternion {

Expand All @@ -32,10 +33,10 @@ public class Quaternion {
/**
* Create a quaternion
*
* @param a
* @param b
* @param c
* @param d
* @param a a double.
* @param b a double.
* @param c a double.
* @param d a double.
*/
public Quaternion(double a, double b, double c, double d) {
this.a = a;
Expand Down Expand Up @@ -107,9 +108,9 @@ public Quaternion div(Quaternion other) {
}

/**
* Get the string representation of this quaternion, e.g. "1 + 2i + 3j + 4k".
* {@inheritDoc}
*
* @return The string representation
* Get the string representation of this quaternion, e.g. "1 + 2i + 3j + 4k".
*/
@Override
public String toString() {
Expand Down
Loading

0 comments on commit 91975e2

Please sign in to comment.