|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number fr.inria.opengve.bridge.abstractClasses.AbstractScalar
public abstract class AbstractScalar
This Class is used everywhere numerics computations must be done without specify the type of the of the scalar. This class implement all data types independant code. You must note that this object is not immutable and so calling numerical operations modify the calling object.
Constructor Summary | |
---|---|
AbstractScalar()
|
Method Summary | ||
---|---|---|
abstract AbstractScalar |
abs()
Set the value this AbstractScalar to the absolute value of this
AbstractScalar . |
|
abstract AbstractScalar |
add(AbstractScalar c)
Add an AbstractScalar to this object. |
|
AbstractScalar |
clone()
|
|
abstract AbstractScalar |
divide(AbstractScalar c)
Divide this object by an AbstractScalar . |
|
abstract AbstractScalar |
exp()
Set the value of this AbstractScalar to the exponential value of
this AbstractScalar . |
|
abstract AbstractScalar |
log()
Set the value this AbstractScalar to the log of this
AbstractScalar . |
|
abstract AbstractScalar |
log10()
Set the value this AbstractScalar to the log10 of this
AbstractScalar . |
|
static
|
Max(A v1,
A v2)
Compare two AbstractScalar and return the greatest. |
|
static
|
Min(A v1,
A v2)
Compare two AbstractScalar and return the smallest. |
|
abstract AbstractScalar |
multiply(AbstractScalar c)
Multiply this object by an AbstractScalar . |
|
abstract AbstractScalar |
negate()
Change the value of this AbstractScalar to the opposite. |
|
abstract AbstractScalar |
pow(AbstractScalar c)
Set the value of this AbstractScalar to this^c. |
|
abstract AbstractScalar |
sqrt()
Set this AbstractScalar to sqare root of this. |
|
abstract AbstractScalar |
subtract(AbstractScalar c)
Subtract an AbstractScalar to this object. |
|
abstract java.lang.String |
toString()
|
|
abstract AbstractScalar |
zero()
Return an AbstractScalar of the same type of
this AbstractScalar with a value of zero. |
Methods inherited from class java.lang.Number |
---|
byteValue, doubleValue, floatValue, intValue, longValue, shortValue |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
public AbstractScalar()
Method Detail |
---|
public static final <A extends AbstractScalar> A Max(A v1, A v2)
AbstractScalar
and return the greatest.
v1
- The first AbstractScalar
.v2
- The second AbstractScalar
.
AbstractScalar
between v1
and
v2
. If v1
and v2
are
equals v1
is returned.public static final <A extends AbstractScalar> A Min(A v1, A v2)
AbstractScalar
and return the smallest.
v1
- The first AbstractScalar
.v2
- The second AbstractScalar
.
AbstractScalar
between v1
and
v2
. If v1
and v2
are
equal v2
is returned.public abstract AbstractScalar zero()
AbstractScalar
of the same type of
this AbstractScalar
with a value of zero.
AbstractScalar
of the same type
of this AbstractScalar
with a value
of zero.public abstract AbstractScalar add(AbstractScalar c)
AbstractScalar
to this object.
c
- The AbstractScalar
to add to this object.
public abstract AbstractScalar subtract(AbstractScalar c)
AbstractScalar
to this object.
c
- The AbstractScalar
to subtract to this object.
public abstract AbstractScalar multiply(AbstractScalar c)
AbstractScalar
.
c
- The AbstractScalar
to multiply with this object.
public abstract AbstractScalar divide(AbstractScalar c)
AbstractScalar
.
c
- The AbstractScalar
dividing this object.
public abstract AbstractScalar negate()
AbstractScalar
to the opposite.
public abstract AbstractScalar exp() throws java.lang.Exception
AbstractScalar
to the exponential value of
this AbstractScalar
.
java.lang.Exception
- If this AbstractScalar
must be integer.public abstract AbstractScalar abs()
AbstractScalar
to the absolute value of this
AbstractScalar
.
public abstract AbstractScalar log() throws java.lang.Exception
AbstractScalar
to the log of this
AbstractScalar
.
java.lang.Exception
- If this AbstractScalar
must be integer.public abstract AbstractScalar log10() throws java.lang.Exception
AbstractScalar
to the log10 of this
AbstractScalar
.
java.lang.Exception
- If this AbstractScalar
must be integer.public abstract AbstractScalar pow(AbstractScalar c)
AbstractScalar
to this^c.
c
- The exponent.public abstract AbstractScalar sqrt() throws java.lang.Exception
AbstractScalar
to sqare root of this.
java.lang.Exception
- If this AbstractScalar
must be integer.public abstract java.lang.String toString()
toString
in class java.lang.Object
public AbstractScalar clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |