|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.vector.doubles.IsVector
public class IsVector
These are the utility functions to validate input arguments for vector operations.
| Nested Class Summary | |
|---|---|
static class |
IsVector.SizeMismatch
This is the exception thrown when an operation is performed on two vectors with different sizes. |
static class |
IsVector.VectorAccessException
This is the exception thrown when any invalid access to a Vector instance is detected. |
| Method Summary | |
|---|---|
static boolean |
equal(Vector v1,
Vector v2,
double epsilon)
Check the equality of two vectors up to a precision. |
static void |
throwIfInvalidIndex(Vector v,
int index)
Check if an index is a valid index. |
static void |
throwIfNotEqualSize(Vector v1,
Vector v2)
Check if the input vectors have the same size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void throwIfNotEqualSize(Vector v1,
Vector v2)
v1 - a vectorv2 - a vector
IsVector.SizeMismatch - if sizes do not match
public static void throwIfInvalidIndex(Vector v,
int index)
v - a vectorindex - a vector index
IsVector.VectorAccessException - if the index is invalid
public static boolean equal(Vector v1,
Vector v2,
double epsilon)
v1 - a vectorv2 - another vectorepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
true if all entries are equal, entry by entry
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||