|
14 | 14 | * To support the Op matching paradigm, we establish three types of equivalence: |
15 | 15 | * <ol> |
16 | 16 | * <li><b>Form Equivalence</b></li> Drawn from <a href="https://en.wikipedia.org/wiki/Theory_of_forms">Plato's Theory of Forms</a>, Form Equivalence implies that two objects (which could be Ops, or Op parameters) theoretically draw from the same shared idea (such as an addition operation, or an image, etc.) |
17 | | - * <li><b>Op Equivalence</b></li> Algorithmic Equivalence means that two Ops: |
| 17 | + * <li><b>Algorithmic Equivalence</b></li> Algorithmic Equivalence means that two Ops: |
18 | 18 | * <ol> |
19 | 19 | * <li>Are Form Equivalent</li> |
20 | 20 | * <li>Have the same number of inputs and the same number of outputs</li> |
|
25 | 25 | * </ol> |
26 | 26 | * Within the Ops API, each type of equivalence is utilized in the following ways: |
27 | 27 | * <ol> |
28 | | - * <li><b>Form Equivalence</b></li> If two Ops are "Form Equivalent", they are defined under the same name. |
29 | | - * <li><b>Op Equivalence</b></li> If two Ops are "Op Equivalent", then they are considered to implement the same computational algorithm. |
| 28 | + * <li><b>Form Equivalence</b></li> If two Ops are "Form Equivalent", they are defined under the same name, i.e. {@code op1.name().equals(op2.name())} |
| 29 | + * <li><b>Algorithmic Equivalence</b></li> If two Ops are "Algorithm Equivalent", then they are considered to implement the same computational algorithm. |
30 | 30 | * <li><b>Numerical Equivalence</b></li> If two Ops are "Numerically Equivalent", then they are considered to output the same values, neglecting trivial differences such as floating-point errors. |
31 | 31 | * </ol> |
32 | 32 | * |
|
36 | 36 | * <li> filter.gauss(ij.ImagePlus, java.lang.Double) -> ij.ImagePlus</li> |
37 | 37 | * <li> filter.gauss(net.imglib2.img.Img, net.imglib2.algorithm.neighborhood.Shape) -> net.imglib2.img.Img</li> |
38 | 38 | * </ol> |
39 | | - * Ops 1 and 2 should be considered form equivalent, as they have the same name, and Op equivalent, as they both take in an image data structure and a floating point number and return an image data structure, but they are likely not numerically equivalent due to the underlying data structures. |
| 39 | + * Ops 1 and 2 should be considered form equivalent, as they have the same name, and algorithmically equivalent, as they both take in an image data structure and a floating point number and return an image data structure, but they are likely not numerically equivalent due to the underlying data structures. |
40 | 40 | * <p> |
41 | 41 | * Ops 1 and 3 should also be considered form equivalent, as they have the same name, but are not form equivalent, as one computes its own Shape over which to perform a gaussian blur, while the other takes a predefined shape. |
42 | 42 | * <p> |
43 | 43 | * These definitions of equivalence provide a level of flexibility impossible without the Ops API; form equivalence allows us to, for example, define equivalent Ops across programming languages and libraries, and then to create scripts that can run unaltered on data types from each of those languages and libraries. Within each form implementation, however, we ensure numeric equivalence and therefore reproducability |
44 | 44 | * |
45 | | - * |
46 | 45 | */ |
47 | 46 | package org.scijava.ops.api; |
0 commit comments