mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Commit generated files (#5986)
This commit is contained in:
2
.github/workflows/pregenerate.yml
vendored
2
.github/workflows/pregenerate.yml
vendored
@@ -29,6 +29,8 @@ jobs:
|
||||
run: python -m pip install jinja2
|
||||
- name: Run ntcore
|
||||
run: ./ntcore/generate_topics.py
|
||||
- name: Run wpimath
|
||||
run: ./wpimath/generate_numbers.py
|
||||
- name: Add untracked files to index so they count as changes
|
||||
run: git add -A
|
||||
- name: Check output
|
||||
|
||||
@@ -228,7 +228,6 @@ task generateJavaDocs(type: Javadoc) {
|
||||
options.linkSource(true)
|
||||
dependsOn project(':hal').generateUsageReporting
|
||||
dependsOn project(':wpilibj').generateJavaVersion
|
||||
dependsOn project(':wpimath').generateNat
|
||||
source project(':apriltag').sourceSets.main.java
|
||||
source project(':cameraserver').sourceSets.main.java
|
||||
source project(':cscore').sourceSets.main.java
|
||||
|
||||
@@ -80,7 +80,7 @@ if(WITH_JAVA)
|
||||
include(UseJava)
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS "-encoding" "UTF8" "-Xlint:unchecked")
|
||||
|
||||
quickbuf_generate(WPIMATH_QUICKBUF_SRCS "edu/wpi/first/math/proto" ${wpimath_proto_src})
|
||||
quickbuf_generate(WPIMATH_QUICKBUF_SRCS "edu/wpi/first/math/proto" ${wpimath_proto_src})
|
||||
|
||||
if(NOT EXISTS "${WPILIB_BINARY_DIR}/wpimath/thirdparty/ejml/ejml-simple-0.43.1.jar")
|
||||
set(BASE_URL "https://search.maven.org/remotecontent?filepath=")
|
||||
@@ -119,29 +119,9 @@ if(WITH_JAVA)
|
||||
|
||||
set(CMAKE_JAVA_INCLUDE_PATH wpimath.jar ${EJML_JARS} ${JACKSON_JARS} ${QUICKBUF_JAR})
|
||||
|
||||
execute_process(
|
||||
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/generate_numbers.py ${WPILIB_BINARY_DIR}/wpimath
|
||||
RESULT_VARIABLE generateResult
|
||||
)
|
||||
if(NOT (generateResult EQUAL "0"))
|
||||
# Try python
|
||||
execute_process(
|
||||
COMMAND
|
||||
python ${CMAKE_CURRENT_SOURCE_DIR}/generate_numbers.py ${WPILIB_BINARY_DIR}/wpimath
|
||||
RESULT_VARIABLE generateResult
|
||||
)
|
||||
if(NOT (generateResult EQUAL "0"))
|
||||
message(FATAL_ERROR "python and python3 generate_numbers.py failed")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_JNI_TARGET true)
|
||||
|
||||
file(
|
||||
GLOB_RECURSE JAVA_SOURCES
|
||||
src/main/java/*.java
|
||||
${WPILIB_BINARY_DIR}/wpimath/generated/*.java
|
||||
)
|
||||
file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java src/generated/main/java/*.java)
|
||||
|
||||
add_jar(
|
||||
wpimath_jar
|
||||
@@ -175,7 +155,7 @@ if(WITH_JAVA_SOURCE)
|
||||
file(
|
||||
GLOB WPIMATH_SOURCES
|
||||
src/main/java/edu/wpi/first/math/*.java
|
||||
${WPILIB_BINARY_DIR}/wpimath/generated/main/java/edu/wpi/first/math/Nat.java
|
||||
src/generated/main/java/edu/wpi/first/math/Nat.java
|
||||
)
|
||||
file(GLOB WPIMATH_CONTROLLER_SOURCES src/main/java/edu/wpi/first/math/controller/*.java)
|
||||
file(GLOB WPIMATH_ESTIMATOR_SOURCES src/main/java/edu/wpi/first/math/estimator/*.java)
|
||||
@@ -183,10 +163,7 @@ if(WITH_JAVA_SOURCE)
|
||||
file(GLOB WPIMATH_GEOMETRY_SOURCES src/main/java/edu/wpi/first/math/geometry/*.java)
|
||||
file(GLOB WPIMATH_INTERPOLATION_SOURCES src/main/java/edu/wpi/first/math/interpolation/*.java)
|
||||
file(GLOB WPIMATH_KINEMATICS_SOURCES src/main/java/edu/wpi/first/math/kinematics/*.java)
|
||||
file(
|
||||
GLOB WPIMATH_NUMBERS_SOURCES
|
||||
${WPILIB_BINARY_DIR}/wpimath/generated/main/java/edu/wpi/first/math/numbers/*.java
|
||||
)
|
||||
file(GLOB WPIMATH_NUMBERS_SOURCES src/generated/main/java/edu/wpi/first/math/numbers/*.java)
|
||||
file(GLOB WPIMATH_SPLINE_SOURCES src/main/java/edu/wpi/first/math/spline/*.java)
|
||||
file(GLOB WPIMATH_SYSTEM_SOURCES src/main/java/edu/wpi/first/math/system/*.java)
|
||||
file(GLOB WPIMATH_SYSTEM_PLANT_SOURCES src/main/java/edu/wpi/first/math/system/plant/*.java)
|
||||
|
||||
@@ -72,68 +72,7 @@ dependencies {
|
||||
api "us.hebi.quickbuf:quickbuf-runtime:1.3.2"
|
||||
}
|
||||
|
||||
def wpilibNumberFileInput = file("src/generate/GenericNumber.java.jinja")
|
||||
def natFileInput = file("src/generate/Nat.java.jinja")
|
||||
def wpilibNumberFileOutputDir = file("$buildDir/generated/java/edu/wpi/first/math/numbers")
|
||||
def wpilibNatFileOutput = file("$buildDir/generated/java/edu/wpi/first/math/Nat.java")
|
||||
def maxNum = 20
|
||||
|
||||
task generateNumbers() {
|
||||
description = "Generates generic number classes from template"
|
||||
group = "WPILib"
|
||||
|
||||
inputs.file wpilibNumberFileInput
|
||||
outputs.dir wpilibNumberFileOutputDir
|
||||
|
||||
doLast {
|
||||
if(wpilibNumberFileOutputDir.exists()) {
|
||||
wpilibNumberFileOutputDir.delete()
|
||||
}
|
||||
wpilibNumberFileOutputDir.mkdirs()
|
||||
|
||||
def config = new JinjavaConfig()
|
||||
def jinjava = new Jinjava(config)
|
||||
|
||||
def template = wpilibNumberFileInput.text
|
||||
|
||||
for(i in 0..maxNum) {
|
||||
def outputFile = new File(wpilibNumberFileOutputDir, "N${i}.java")
|
||||
def replacements = new HashMap<String,?>()
|
||||
replacements.put("num", i)
|
||||
def output = jinjava.render(template, replacements)
|
||||
outputFile.write(output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task generateNat() {
|
||||
description = "Generates Nat.java"
|
||||
group = "WPILib"
|
||||
inputs.file natFileInput
|
||||
outputs.file wpilibNatFileOutput
|
||||
dependsOn generateNumbers
|
||||
|
||||
doLast {
|
||||
if(wpilibNatFileOutput.exists()) {
|
||||
wpilibNatFileOutput.delete()
|
||||
}
|
||||
|
||||
def config = new JinjavaConfig()
|
||||
def jinjava = new Jinjava(config)
|
||||
|
||||
def template = natFileInput.text
|
||||
|
||||
def replacements = new HashMap<String,?>()
|
||||
replacements.put("nums", 0..maxNum)
|
||||
|
||||
def output = jinjava.render(template, replacements)
|
||||
wpilibNatFileOutput.write(output)
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDir "${buildDir}/generated/java"
|
||||
compileJava.dependsOn generateNumbers
|
||||
compileJava.dependsOn generateNat
|
||||
sourceSets.main.java.srcDir "${projectDir}/src/generated/main/java"
|
||||
|
||||
task unitsHeaders(type: Zip) {
|
||||
destinationDirectory = file("$buildDir/outputs")
|
||||
|
||||
11
wpimath/generate_numbers.py
Normal file → Executable file
11
wpimath/generate_numbers.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (c) FIRST and other WPILib contributors.
|
||||
# Open Source Software; you can modify and/or share it under the terms of
|
||||
# the WPILib BSD license file in the root directory of this project.
|
||||
@@ -19,7 +21,7 @@ def output(outPath, outfn, contents):
|
||||
return
|
||||
|
||||
# File either doesn't exist or has different contents
|
||||
with open(outpathname, "w") as f:
|
||||
with open(outpathname, "w", newline="\n") as f:
|
||||
f.write(contents)
|
||||
|
||||
|
||||
@@ -27,23 +29,22 @@ def main():
|
||||
MAX_NUM = 20
|
||||
|
||||
dirname, _ = os.path.split(os.path.abspath(__file__))
|
||||
cmake_binary_dir = sys.argv[1]
|
||||
|
||||
env = Environment(
|
||||
loader=FileSystemLoader(f"{dirname}/src/generate"),
|
||||
loader=FileSystemLoader(f"{dirname}/src/generate/main/java"),
|
||||
autoescape=False,
|
||||
keep_trailing_newline=True,
|
||||
)
|
||||
|
||||
template = env.get_template("GenericNumber.java.jinja")
|
||||
rootPath = f"{cmake_binary_dir}/generated/main/java/edu/wpi/first/math/numbers"
|
||||
rootPath = f"{dirname}/src/generated/main/java/edu/wpi/first/math/numbers"
|
||||
|
||||
for i in range(MAX_NUM + 1):
|
||||
contents = template.render(num=i)
|
||||
output(rootPath, f"N{i}.java", contents)
|
||||
|
||||
template = env.get_template("Nat.java.jinja")
|
||||
rootPath = f"{cmake_binary_dir}/generated/main/java/edu/wpi/first/math"
|
||||
rootPath = f"{dirname}/src/generated/main/java/edu/wpi/first/math"
|
||||
contents = template.render(nums=range(MAX_NUM + 1))
|
||||
output(rootPath, "Nat.java", contents)
|
||||
|
||||
|
||||
@@ -2,30 +2,27 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/**
|
||||
* A class representing the number {{ num }}.
|
||||
*/
|
||||
/** A class representing the number {{ num }}. */
|
||||
public final class N{{ num }} extends Num implements Nat<N{{ num }}> {
|
||||
private N{{ num }}() {
|
||||
}
|
||||
private N{{ num }}() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number {{ num }}.
|
||||
*/
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return {{ num }};
|
||||
}
|
||||
|
||||
/**
|
||||
* The singleton instance of this class.
|
||||
*/
|
||||
/** The singleton instance of this class. */
|
||||
public static final N{{ num }} instance = new N{{ num }}();
|
||||
}
|
||||
@@ -2,13 +2,15 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math;
|
||||
|
||||
//CHECKSTYLE.OFF: ImportOrder
|
||||
// CHECKSTYLE.OFF: ImportOrder
|
||||
{% for num in nums %}
|
||||
import edu.wpi.first.math.numbers.N{{ num }};
|
||||
{%- endfor %}
|
||||
//CHECKSTYLE.ON
|
||||
// CHECKSTYLE.ON
|
||||
|
||||
/**
|
||||
* A natural number expressed as a java class.
|
||||
@@ -27,5 +29,5 @@ public interface Nat<T extends Num> {
|
||||
static Nat<N{{ num }}> N{{ num }}() {
|
||||
return N{{ num }}.instance;
|
||||
}
|
||||
{% endfor %}
|
||||
{% endfor -%}
|
||||
}
|
||||
131
wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java
Normal file
131
wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java
Normal file
@@ -0,0 +1,131 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math;
|
||||
|
||||
// CHECKSTYLE.OFF: ImportOrder
|
||||
|
||||
import edu.wpi.first.math.numbers.N0;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.numbers.N3;
|
||||
import edu.wpi.first.math.numbers.N4;
|
||||
import edu.wpi.first.math.numbers.N5;
|
||||
import edu.wpi.first.math.numbers.N6;
|
||||
import edu.wpi.first.math.numbers.N7;
|
||||
import edu.wpi.first.math.numbers.N8;
|
||||
import edu.wpi.first.math.numbers.N9;
|
||||
import edu.wpi.first.math.numbers.N10;
|
||||
import edu.wpi.first.math.numbers.N11;
|
||||
import edu.wpi.first.math.numbers.N12;
|
||||
import edu.wpi.first.math.numbers.N13;
|
||||
import edu.wpi.first.math.numbers.N14;
|
||||
import edu.wpi.first.math.numbers.N15;
|
||||
import edu.wpi.first.math.numbers.N16;
|
||||
import edu.wpi.first.math.numbers.N17;
|
||||
import edu.wpi.first.math.numbers.N18;
|
||||
import edu.wpi.first.math.numbers.N19;
|
||||
import edu.wpi.first.math.numbers.N20;
|
||||
// CHECKSTYLE.ON
|
||||
|
||||
/**
|
||||
* A natural number expressed as a java class.
|
||||
* The counterpart to {@link Num} that should be used as a concrete value.
|
||||
*
|
||||
* @param <T> The {@link Num} this represents.
|
||||
*/
|
||||
public interface Nat<T extends Num> {
|
||||
/**
|
||||
* The number this interface represents.
|
||||
*
|
||||
* @return The number backing this value.
|
||||
*/
|
||||
int getNum();
|
||||
|
||||
static Nat<N0> N0() {
|
||||
return N0.instance;
|
||||
}
|
||||
|
||||
static Nat<N1> N1() {
|
||||
return N1.instance;
|
||||
}
|
||||
|
||||
static Nat<N2> N2() {
|
||||
return N2.instance;
|
||||
}
|
||||
|
||||
static Nat<N3> N3() {
|
||||
return N3.instance;
|
||||
}
|
||||
|
||||
static Nat<N4> N4() {
|
||||
return N4.instance;
|
||||
}
|
||||
|
||||
static Nat<N5> N5() {
|
||||
return N5.instance;
|
||||
}
|
||||
|
||||
static Nat<N6> N6() {
|
||||
return N6.instance;
|
||||
}
|
||||
|
||||
static Nat<N7> N7() {
|
||||
return N7.instance;
|
||||
}
|
||||
|
||||
static Nat<N8> N8() {
|
||||
return N8.instance;
|
||||
}
|
||||
|
||||
static Nat<N9> N9() {
|
||||
return N9.instance;
|
||||
}
|
||||
|
||||
static Nat<N10> N10() {
|
||||
return N10.instance;
|
||||
}
|
||||
|
||||
static Nat<N11> N11() {
|
||||
return N11.instance;
|
||||
}
|
||||
|
||||
static Nat<N12> N12() {
|
||||
return N12.instance;
|
||||
}
|
||||
|
||||
static Nat<N13> N13() {
|
||||
return N13.instance;
|
||||
}
|
||||
|
||||
static Nat<N14> N14() {
|
||||
return N14.instance;
|
||||
}
|
||||
|
||||
static Nat<N15> N15() {
|
||||
return N15.instance;
|
||||
}
|
||||
|
||||
static Nat<N16> N16() {
|
||||
return N16.instance;
|
||||
}
|
||||
|
||||
static Nat<N17> N17() {
|
||||
return N17.instance;
|
||||
}
|
||||
|
||||
static Nat<N18> N18() {
|
||||
return N18.instance;
|
||||
}
|
||||
|
||||
static Nat<N19> N19() {
|
||||
return N19.instance;
|
||||
}
|
||||
|
||||
static Nat<N20> N20() {
|
||||
return N20.instance;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 0. */
|
||||
public final class N0 extends Num implements Nat<N0> {
|
||||
private N0() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 0.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N0 instance = new N0();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 1. */
|
||||
public final class N1 extends Num implements Nat<N1> {
|
||||
private N1() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 1.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N1 instance = new N1();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 10. */
|
||||
public final class N10 extends Num implements Nat<N10> {
|
||||
private N10() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 10.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N10 instance = new N10();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 11. */
|
||||
public final class N11 extends Num implements Nat<N11> {
|
||||
private N11() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 11.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 11;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N11 instance = new N11();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 12. */
|
||||
public final class N12 extends Num implements Nat<N12> {
|
||||
private N12() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 12.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 12;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N12 instance = new N12();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 13. */
|
||||
public final class N13 extends Num implements Nat<N13> {
|
||||
private N13() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 13.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 13;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N13 instance = new N13();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 14. */
|
||||
public final class N14 extends Num implements Nat<N14> {
|
||||
private N14() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 14.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N14 instance = new N14();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 15. */
|
||||
public final class N15 extends Num implements Nat<N15> {
|
||||
private N15() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 15.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 15;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N15 instance = new N15();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 16. */
|
||||
public final class N16 extends Num implements Nat<N16> {
|
||||
private N16() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 16.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N16 instance = new N16();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 17. */
|
||||
public final class N17 extends Num implements Nat<N17> {
|
||||
private N17() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 17.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 17;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N17 instance = new N17();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 18. */
|
||||
public final class N18 extends Num implements Nat<N18> {
|
||||
private N18() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 18.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 18;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N18 instance = new N18();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 19. */
|
||||
public final class N19 extends Num implements Nat<N19> {
|
||||
private N19() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 19.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 19;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N19 instance = new N19();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 2. */
|
||||
public final class N2 extends Num implements Nat<N2> {
|
||||
private N2() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 2.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N2 instance = new N2();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 20. */
|
||||
public final class N20 extends Num implements Nat<N20> {
|
||||
private N20() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 20.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N20 instance = new N20();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 3. */
|
||||
public final class N3 extends Num implements Nat<N3> {
|
||||
private N3() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 3.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N3 instance = new N3();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 4. */
|
||||
public final class N4 extends Num implements Nat<N4> {
|
||||
private N4() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 4.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N4 instance = new N4();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 5. */
|
||||
public final class N5 extends Num implements Nat<N5> {
|
||||
private N5() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 5.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N5 instance = new N5();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 6. */
|
||||
public final class N6 extends Num implements Nat<N6> {
|
||||
private N6() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 6.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N6 instance = new N6();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 7. */
|
||||
public final class N7 extends Num implements Nat<N7> {
|
||||
private N7() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 7.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 7;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N7 instance = new N7();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 8. */
|
||||
public final class N8 extends Num implements Nat<N8> {
|
||||
private N8() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 8.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N8 instance = new N8();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.math.numbers;
|
||||
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.Num;
|
||||
|
||||
/** A class representing the number 9. */
|
||||
public final class N9 extends Num implements Nat<N9> {
|
||||
private N9() {}
|
||||
|
||||
/**
|
||||
* The integer this class represents.
|
||||
*
|
||||
* @return The literal number 9.
|
||||
*/
|
||||
@Override
|
||||
public int getNum() {
|
||||
return 9;
|
||||
}
|
||||
|
||||
/** The singleton instance of this class. */
|
||||
public static final N9 instance = new N9();
|
||||
}
|
||||
Reference in New Issue
Block a user