-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Addded array indexers * move test resource helper * Added default serialVersionUID to IOExceptionFile * Added tuple generator to ms-util * Bump the standard-plugins group with 3 updates (#11) Bumps the standard-plugins group with 3 updates: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire), [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) and [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin). Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.0.0-M5 to 3.2.5 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](apache/maven-surefire@surefire-3.0.0-M5...surefire-3.2.5) Updates `org.apache.maven.plugins:maven-source-plugin` from 3.2.1 to 3.3.0 - [Commits](apache/maven-source-plugin@maven-source-plugin-3.2.1...maven-source-plugin-3.3.0) Updates `org.apache.maven.plugins:maven-javadoc-plugin` from 3.5.0 to 3.6.3 - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump the test-dependencies group with 3 updates (#12) Bumps the test-dependencies group with 3 updates: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) and [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco). Updates `org.junit.jupiter:junit-jupiter-engine` from 5.8.2 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit5@r5.8.2...r5.10.1) Updates `org.junit.jupiter:junit-jupiter-api` from 5.8.2 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit5@r5.8.2...r5.10.1) Updates `org.jacoco:jacoco-maven-plugin` from 0.8.9 to 0.8.11 - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](jacoco/jacoco@v0.8.9...v0.8.11) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-dependencies - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-dependencies - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:development update-type: version-update:semver-patch dependency-group: test-dependencies ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor package structure (#13) * move path validator (#14) * update workflows * update workflows * test-commit * Update dev_build.yml * Update pr_build.yml * update workflow * update workflows * add text table reader (#17) * Bump the test-dependencies group with 2 updates (#16) Bumps the test-dependencies group with 2 updates: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit5@r5.10.1...r5.10.2) Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit5@r5.10.1...r5.10.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test-dependencies - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test-dependencies ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update pom.xml --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: shawnhatch <[email protected]> Co-authored-by: shawnhatch <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7d1b1fe
commit 839be6d
Showing
154 changed files
with
1,908 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/util/annotations/UnitTag.java → ...hhs/aspr/ms/util/annotations/UnitTag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package util.annotations; | ||
package gov.hhs.aspr.ms.util.annotations; | ||
|
||
public enum UnitTag { | ||
/* | ||
|
2 changes: 1 addition & 1 deletion
2
...util/annotations/UnitTestConstructor.java → ...util/annotations/UnitTestConstructor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/util/annotations/UnitTestField.java → ...pr/ms/util/annotations/UnitTestField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...util/annotations/UnitTestForCoverage.java → ...util/annotations/UnitTestForCoverage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/util/annotations/UnitTestMethod.java → ...r/ms/util/annotations/UnitTestMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
src/main/java/gov/hhs/aspr/ms/util/combinatorics/TupleGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
package gov.hhs.aspr.ms.util.combinatorics; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Utility class for generating tuples from a fixed set of finite ranges of the | ||
* form [0,n). Uses a standard builder pattern for construction. | ||
*/ | ||
public final class TupleGenerator { | ||
private final int[] moduli; | ||
private final int[] dimensions; | ||
private final int size; | ||
|
||
private TupleGenerator(List<Integer> dimensionSizes) { | ||
dimensions = new int[dimensionSizes.size()]; | ||
moduli = new int[dimensionSizes.size()]; | ||
|
||
int count = 1; | ||
for (int i = 0; i < dimensionSizes.size(); i++) { | ||
int dimSize = dimensionSizes.get(i); | ||
dimensions[i] = dimSize; | ||
moduli[i] = count; | ||
count *= dimSize; | ||
} | ||
size = count; | ||
} | ||
|
||
/** | ||
* Returns the number of dimensions in this {@link TupleGenerator}. | ||
*/ | ||
public int dimensions() { | ||
return dimensions.length; | ||
} | ||
|
||
/** | ||
* Returns the number of tuples that can be generated by this {@link TupleGenerator} | ||
*/ | ||
public int size() { | ||
return size; | ||
} | ||
|
||
/** | ||
* Fills the given tuple with the values that correspond to the given index. | ||
* | ||
* @throws IndexOutOfBoundsException | ||
* <ul> | ||
* <li>if index < 0</li> | ||
* <li>if index >= size()</li> | ||
* </ul> | ||
* @throws IllegalArgumentException | ||
* <ul> | ||
* <li>if the tuple is null</li> | ||
* <li>if the tuple's length is not equal to | ||
* dimensions()</li> | ||
* </ul> | ||
*/ | ||
public void fillTuple(int index, int[] tuple) { | ||
if ((index < 0) || (index >= size)) { | ||
throw new IndexOutOfBoundsException("index out of bounds"); | ||
} | ||
|
||
if (tuple == null) { | ||
throw new IllegalArgumentException("null array"); | ||
} | ||
|
||
if (tuple.length != dimensions.length) { | ||
throw new IllegalArgumentException("wrong number of dimensions"); | ||
} | ||
|
||
for (int i = 0; i < dimensions.length; i++) { | ||
tuple[i] = (index / moduli[i]) % dimensions[i]; | ||
} | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private List<Integer> dimensionSizes = new ArrayList<>(); | ||
|
||
private Builder() { | ||
} | ||
|
||
public TupleGenerator build() { | ||
return new TupleGenerator(dimensionSizes); | ||
} | ||
|
||
public Builder addDimension(int dimensionSize) { | ||
if (dimensionSize <= 0) { | ||
throw new IllegalArgumentException("Non positive dimension size"); | ||
} | ||
dimensionSizes.add(dimensionSize); | ||
return this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...til/dimensiontree/DimensionTreeError.java → ...til/dimensiontree/DimensionTreeError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...imensiontree/VolumetricDimensionTree.java → ...imensiontree/VolumetricDimensionTree.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/util/earth/Earth.java → ...ava/gov/hhs/aspr/ms/util/earth/Earth.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/main/java/util/earth/EarthGrid.java → ...gov/hhs/aspr/ms/util/earth/EarthGrid.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/util/earth/LatLon.java → ...va/gov/hhs/aspr/ms/util/earth/LatLon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package util.earth; | ||
package gov.hhs.aspr.ms.util.earth; | ||
|
||
import net.jcip.annotations.Immutable; | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
src/main/java/util/earth/LatLonAlt.java → ...gov/hhs/aspr/ms/util/earth/LatLonAlt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/util/errors/ContractError.java → ...hs/aspr/ms/util/errors/ContractError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/java/util/errors/ContractException.java → ...spr/ms/util/errors/ContractException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/util/graph/Graph.java → ...ava/gov/hhs/aspr/ms/util/graph/Graph.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package util.graph; | ||
package gov.hhs.aspr.ms.util.graph; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.../java/util/graph/GraphDepthEvaluator.java → ...pr/ms/util/graph/GraphDepthEvaluator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/util/graph/MutableGraph.java → .../hhs/aspr/ms/util/graph/MutableGraph.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.