Package edu.wpi.first.math
Class VecBuilder
java.lang.Object
edu.wpi.first.math.VecBuilder
public final class VecBuilder extends Object
A class for constructing vectors (Nx1 matrices).
-
Method Summary
Modifier and Type Method Description static Vector<N1>
fill(double n1)
Returns a 1x1 vector containing the given elements.static Vector<N2>
fill(double n1, double n2)
Returns a 2x1 vector containing the given elements.static Vector<N3>
fill(double n1, double n2, double n3)
Returns a 3x1 vector containing the given elements.static Vector<N4>
fill(double n1, double n2, double n3, double n4)
Returns a 4x1 vector containing the given elements.static Vector<N5>
fill(double n1, double n2, double n3, double n4, double n5)
Returns a 5x1 vector containing the given elements.static Vector<N6>
fill(double n1, double n2, double n3, double n4, double n5, double n6)
Returns a 6x1 vector containing the given elements.static Vector<N7>
fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7)
Returns a 7x1 vector containing the given elements.static Vector<N8>
fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8)
Returns a 8x1 vector containing the given elements.static Vector<N9>
fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8, double n9)
Returns a 9x1 vector containing the given elements.static Vector<N10>
fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8, double n9, double n10)
Returns a 10x1 vector containing the given elements.
-
Method Details
-
fill
Returns a 1x1 vector containing the given elements.- Parameters:
n1
- the first element.- Returns:
- 1x1 vector
-
fill
Returns a 2x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.- Returns:
- 2x1 vector
-
fill
Returns a 3x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.- Returns:
- 3x1 vector
-
fill
Returns a 4x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.- Returns:
- 4x1 vector
-
fill
Returns a 5x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.- Returns:
- 5x1 vector
-
fill
Returns a 6x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.n6
- the sixth element.- Returns:
- 6x1 vector
-
fill
public static Vector<N7> fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7)Returns a 7x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.n6
- the sixth element.n7
- the seventh element.- Returns:
- 7x1 vector
-
fill
public static Vector<N8> fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8)Returns a 8x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.n6
- the sixth element.n7
- the seventh element.n8
- the eighth element.- Returns:
- 8x1 vector
-
fill
public static Vector<N9> fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8, double n9)Returns a 9x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.n6
- the sixth element.n7
- the seventh element.n8
- the eighth element.n9
- the ninth element.- Returns:
- 9x1 vector
-
fill
public static Vector<N10> fill(double n1, double n2, double n3, double n4, double n5, double n6, double n7, double n8, double n9, double n10)Returns a 10x1 vector containing the given elements.- Parameters:
n1
- the first element.n2
- the second element.n3
- the third element.n4
- the fourth element.n5
- the fifth element.n6
- the sixth element.n7
- the seventh element.n8
- the eighth element.n9
- the ninth element.n10
- the tenth element.- Returns:
- 10x1 vector
-