Refine search
// this build of options is taken from the original method // aggregate(pipe) to have same behaviour AggregationOptions options = AggregationOptions.builder() .outputMode(AggregationOptions.OutputMode.INLINE) .build(); Cursor cursor = collection.aggregate(pipe,options); while (cursor.hasNext() ) { DBObject obj = cursor.next(); //... }
final public static void multiplyComplex( final Img< ComplexFloatType > img, final Img< ComplexFloatType > kernel ) { final Cursor< ComplexFloatType > cursorA = img.cursor(); final Cursor< ComplexFloatType > cursorB = kernel.cursor(); while ( cursorA.hasNext() ) cursorA.next().mul( cursorB.next() ); }
final public static void multiplyComplex( final Img< ComplexFloatType > img, final Img< ComplexFloatType > kernel ) { final Cursor< ComplexFloatType > cursorA = img.cursor(); final Cursor< ComplexFloatType > cursorB = kernel.cursor(); while ( cursorA.hasNext() ) cursorA.next().mul( cursorB.next() ); }
final public static void multiplyComplex( final Img< ComplexFloatType > img, final Img< ComplexFloatType > kernel ) { final Cursor< ComplexFloatType > cursorA = img.cursor(); final Cursor< ComplexFloatType > cursorB = kernel.cursor(); while ( cursorA.hasNext() ) cursorA.next().mul( cursorB.next() ); }
public static <I1, I2, O extends I1> void inplace( final IterableInterval<O> arg, final IterableInterval<I2> in, final BinaryInplace1Op<I1, I2, O> op) { final Cursor<O> argCursor = arg.cursor(); final Cursor<I2> inCursor = in.cursor(); while (argCursor.hasNext()) { op.mutate1(argCursor.next(), inCursor.next()); } }
@Override public void compute(final IterableInterval<T> input1, final IterableInterval<T> input2, final IterableInterval<T> output) { final Cursor<T> in1Cursor = input1.cursor(); final Cursor<T> in2Cursor = input2.cursor(); final Cursor<T> outCursor = output.cursor(); while (in1Cursor.hasNext()) { outCursor.next().set(in1Cursor.next()); outCursor.get().mul(in2Cursor.next()); } }
@Override public void compute(final IterableInterval<T> input1, final IterableInterval<T> input2, final IterableInterval<T> output) { final Cursor<T> in1Cursor = input1.cursor(); final Cursor<T> in2Cursor = input2.cursor(); final Cursor<T> outCursor = output.cursor(); while (in1Cursor.hasNext()) { outCursor.next().set(in1Cursor.next()); outCursor.get().add(in2Cursor.next()); } }
@Override public void compute(final IterableInterval<T> input1, final IterableInterval<T> input2, final IterableInterval<T> output) { final Cursor<T> in1Cursor = input1.cursor(); final Cursor<T> in2Cursor = input2.cursor(); final Cursor<T> outCursor = output.cursor(); while (in1Cursor.hasNext()) { outCursor.next().set(in1Cursor.next()); outCursor.get().div(in2Cursor.next()); } }
private static < T extends RealType< T >, U extends ComplexType< U > > RandomAccessibleInterval< U > calculateEigenValuesImpl( final RandomAccessibleInterval< T > tensor, final RandomAccessibleInterval< U > eigenvalues, final EigenValues< T, U > ev ) { final Cursor< RealComposite< T > > m = Views.iterable( Views.collapseReal( tensor ) ).cursor(); final Cursor< NumericComposite< U > > e = Views.iterable( Views.collapseNumeric( eigenvalues ) ).cursor(); while ( m.hasNext() ) ev.compute( m.next(), e.next() ); return eigenvalues; }