| Modifier and Type | Method and Description |
|---|---|
static I2 |
generate(clojure.lang.IFn.L g)
g is a 'function' of no arguments, which is
expected to return a different value on each call, typically
wrapping some pseudo-random number generator. |
int |
get0() |
int |
get1() |
double |
l1Norm()
Here as a convenience.
|
Vector |
linearCombination(Number a0,
Number a1,
Vector v1)
Almost certainly would want scalars to be primitive,
not Object references.
|
static I2 |
make(int v0,
int v1) |
public final int get0()
public final int get1()
public final Vector linearCombination(Number a0, Number a1, Vector v1)
VectorHere as a convenience. Doesn't belong in a vector interface, because same vector can be in many different linear spaces, with differing interpretations of linear combination.
linearCombination in interface Vectorpublic final double l1Norm()
Vectorpublic static final I2 make(int v0, int v1)
public static final I2 generate(clojure.lang.IFn.L g)
g is a 'function' of no arguments, which is
expected to return a different value on each call, typically
wrapping some pseudo-random number generator.
Clojure unfortunately only supports functions returning
primitive long and double
values.an - exception if the generated value is not within
the valid range.Copyright © 2017. All rights reserved.