コード例 #1
0
ファイル: RTs.java プロジェクト: zjpetersen/imagej-ops
 public static <A extends RealType<A>> InplaceOp<A> inplace(
     final OpEnvironment ops,
     final Class<? extends Op> opType,
     final A arg,
     final Object... otherArgs) {
   return ops.inplace(opType, arg, otherArgs);
 }
コード例 #2
0
ファイル: RTs.java プロジェクト: zjpetersen/imagej-ops
 @SuppressWarnings({"rawtypes", "unchecked"})
 public static <I, O extends RealType<O>> HybridOp<I, O> hybrid(
     final OpEnvironment ops,
     final Class<? extends Op> opType,
     final I in,
     final Object... otherArgs) {
   return (HybridOp) ops.hybrid(opType, RealType.class, in, otherArgs);
 }
コード例 #3
0
 private CustomOpEnvironment(
     final Context context, final OpEnvironment parent, final Collection<? extends OpInfo> infos) {
   setContext(context);
   this.parent = parent;
   index = new OpIndex();
   // NB: If this is not performant and/or dynamic enough, we could create/use
   // a concatenating collection (see e.g. Guava's Iterables.concat method)
   // that does not copy all the elements.
   if (parent != null) index.addOps(parent.infos());
   index.addOps(infos);
 }
コード例 #4
0
 /**
  * Creates an op context with the same configuration as the given parent environment, plus the
  * specified additional ops.
  */
 public CustomOpEnvironment(final OpEnvironment parent, final Collection<? extends OpInfo> infos) {
   this(parent.getContext(), parent, infos);
 }