Package net.imglib2.view.composite
Class AbstractNumericComposite<T extends NumericType<T>,C extends AbstractNumericComposite<T,C>>
- java.lang.Object
-
- net.imglib2.view.composite.AbstractComposite<T>
-
- net.imglib2.view.composite.AbstractNumericComposite<T,C>
-
- All Implemented Interfaces:
java.lang.Iterable<T>,NumericType<C>,Add<C>,Div<C>,Mul<C>,MulFloatingPoint,Pow<C>,PowFloatingPoint,SetOne,SetZero,Sub<C>,ValueEquals<C>,Type<C>,Composite<T>
- Direct Known Subclasses:
NumericComposite,RealComposite
public abstract class AbstractNumericComposite<T extends NumericType<T>,C extends AbstractNumericComposite<T,C>> extends AbstractComposite<T> implements NumericType<C>, java.lang.Iterable<T>
Abstract base class for a vector ofNumericTypescalars. It is aNumericTypeitself, implementing theNumericTypealgebra as element-wise operations.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Iterator<T>iteratorprotected intlength-
Fields inherited from class net.imglib2.view.composite.AbstractComposite
d, sourceAccess
-
-
Constructor Summary
Constructors Constructor Description AbstractNumericComposite(RandomAccess<T> sourceAccess, int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(C c)voiddiv(C c)intgetLength()java.util.Iterator<T>iterator()voidmul(double c)voidmul(float c)voidmul(C c)voidpow(double power)voidpow(C c)voidset(C c)Sets the value of anotherType.voidsetOne()voidsetZero()voidsub(C c)booleanvalueEquals(C t)-
Methods inherited from class net.imglib2.view.composite.AbstractComposite
get
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.type.Type
copy, createVariable
-
-
-
-
Field Detail
-
length
protected final int length
-
iterator
protected final java.util.Iterator<T extends NumericType<T>> iterator
-
-
Constructor Detail
-
AbstractNumericComposite
public AbstractNumericComposite(RandomAccess<T> sourceAccess, int length)
-
-
Method Detail
-
getLength
public int getLength()
-
set
public void set(C c)
Description copied from interface:TypeSets the value of anotherType.- Specified by:
setin interfaceType<T extends NumericType<T>>- Parameters:
c- the new value
-
pow
public void pow(double power)
- Specified by:
powin interfacePowFloatingPoint
-
mul
public void mul(float c)
- Specified by:
mulin interfaceMulFloatingPoint
-
mul
public void mul(double c)
- Specified by:
mulin interfaceMulFloatingPoint
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<T extends NumericType<T>>
-
valueEquals
public boolean valueEquals(C t)
- Specified by:
valueEqualsin interfaceValueEquals<T extends NumericType<T>>
-
-