- java.lang.Object
-
- org.scijava.ops.tutorial.OpDependencies
-
public class OpDependencies extends Object
A simple showcase of an Op that uses anOpDependency. UsingOpDependencys to break up your code into simple, reusable blocks, Ops become more modular and enable specialization for unseen types.- Author:
- Gabriel Selzer
-
-
Constructor Summary
Constructors Constructor Description OpDependencies()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String... args)static doublemean(Function<double[],Double> sumOp, Function<double[],Double> sizeOp, double[] inArray)An Op that computes the mean of adoublestatic doublesize(double[] inArray)An Op that computes the size of adoublestatic doublesum(double[] inArray)An Op that computes the sum of adouble
-
-
-
Method Detail
-
size
public static double size(double[] inArray)
An Op that computes the size of adouble- Parameters:
inArray- the input- Returns:
- the size of
inArray - Implementation Note:
- op names="stats.size"
-
sum
public static double sum(double[] inArray)
An Op that computes the sum of adouble- Parameters:
inArray- the input- Returns:
- the sum of
inArray - Implementation Note:
- op names="stats.sum"
-
mean
public static double mean(Function<double[],Double> sumOp, Function<double[],Double> sizeOp, double[] inArray)
An Op that computes the mean of adouble- Parameters:
sumOp- an Op that computes the sum of the adoublesizeOp- an Op that computes the size of the adoubleinArray- the input- Returns:
- the mean of
inArray - Implementation Note:
- op names="stats.mean"
-
main
public static void main(String... args)
-
-