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
,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 ofNumericType
scalars. It is aNumericType
itself, implementing theNumericType
algebra as element-wise operations.- Author:
- Stephan Saalfeld
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Iterator<T>
iterator
protected int
length
-
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 void
add(C c)
void
div(C c)
java.util.Iterator<T>
iterator()
void
mul(double c)
void
mul(float c)
void
mul(C c)
void
set(C c)
Sets the value of anotherType
.void
setOne()
void
setZero()
void
sub(C c)
boolean
valueEquals(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
-
set
public void set(C c)
Description copied from interface:Type
Sets the value of anotherType
.- Specified by:
set
in interfaceType<T extends NumericType<T>>
- Parameters:
c
- the new value
-
mul
public void mul(float c)
- Specified by:
mul
in interfaceMulFloatingPoint
-
mul
public void mul(double c)
- Specified by:
mul
in interfaceMulFloatingPoint
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T extends NumericType<T>>
-
valueEquals
public boolean valueEquals(C t)
- Specified by:
valueEquals
in interfaceValueEquals<T extends NumericType<T>>
-
-