Examples of apply()


Examples of a.b.cloner.impl.BookCloner987.apply()

   
    // instantiate cloner
    BookCloner987 bookCloner987 = new BookCloner987();
   
    // create clone
    Book clonedBook = bookCloner987.apply(book);
   
    // check assumptions
    assertNotNull(clonedBook);
   
    // clone should have same structure and values
View Full Code Here

Examples of a.b.cloner.impl.BookCloner988.apply()

   
    // instantiate cloner
    BookCloner988 bookCloner = new BookCloner988();
   
    // create clone
    Book clonedBook = bookCloner.apply(book);

    // clone should have same structure and values
    System.out.println(clonedBook.getAuthor()); //  John O'Farrel
    System.out.println(clonedBook.getSections().get(1).getName()); // Section2
    System.out.println(clonedBook.getSections().get(1).getParagraphs().iterator().next().getNumber()); // 1066
View Full Code Here

Examples of aima.core.logic.fol.inference.Demodulation.apply()

    Predicate expression = (Predicate) parser
        .parse("P(A,F(B,G(A,H(B)),C),D)");
    TermEquality assertion = (TermEquality) parser.parse("B = E");

    Demodulation demodulation = new Demodulation();
    Predicate altExpression = (Predicate) demodulation.apply(assertion,
        expression);

    System.out.println("Demodulate '" + expression + "' with '" + assertion
        + "' to give");
    System.out.println(altExpression.toString());
View Full Code Here

Examples of aima.core.logic.fol.inference.Paramodulation.apply()

    lits.add(new Literal(a2));

    Clause c2 = new Clause(lits);

    Paramodulation paramodulation = new Paramodulation();
    Set<Clause> paras = paramodulation.apply(c1, c2);

    System.out.println("Paramodulate '" + c1 + "' with '" + c2
        + "' to give");
    System.out.println(paras.toString());
    System.out.println("");
View Full Code Here

Examples of ar.com.dgarcia.java_verbs.api.Verb.apply()

        describe("a piece of behavior", ()->{

            Verb verb = Verbs.in("tests").asFunction("name", () -> "John Smith");

            it("is a function defined in a namespace", () -> {
                String returnedValue = verb.apply();

                assertThat(returnedValue).isEqualTo("John Smith");
            });

            it("that can be used to implement a method", () -> {
View Full Code Here

Examples of ca.eandb.jmist.framework.tone.ToneMapper.apply()

      ToneMapper toneMapper = toneMapperFactory.createToneMapper(image);

      for (int y = 0; y < height; y++) {
        for (int x = 0; x < width; x++) {
          CIEXYZ xyz = toneMapper.apply(image.get(x, y));
          int rgb = xyz.toRGB().toR8G8B8();
          bi.setRGB(x, y, rgb);
        }
      }
View Full Code Here

Examples of cascading.flow.FlowStepStrategy.apply()

    List<FlowStep> predecessorSteps = new ArrayList<FlowStep>();

    for( FlowStepJob predecessor : predecessors )
      predecessorSteps.add( predecessor.flowStep );

    flowStepStrategy.apply( flowStep.getFlow(), predecessorSteps, flowStep );
    }

  protected boolean isSkipFlowStep() throws IOException
    {
    // if runID is not set, never skip a step
View Full Code Here

Examples of cern.colt.function.DoubleDoubleFunction.apply()

  double b = 0.2;
  double v = Math.sin(a) + Math.pow(Math.cos(b),2);
  System.out.println(v);
  DoubleDoubleFunction f = F.chain(F.plus,F.sin,F.chain(F.square,F.cos));
  //DoubleDoubleFunction f = F.chain(plus,sin,F.chain(square,cos));
  System.out.println(f.apply(a,b));
  DoubleDoubleFunction g = new DoubleDoubleFunction() {
    public final double apply(double x, double y) { return Math.sin(x) + Math.pow(Math.cos(y),2); }
  };
  System.out.println(g.apply(a,b));
  DoubleFunction m = F.plus(3);
View Full Code Here

Examples of cern.colt.function.DoubleFunction.apply()

  };
  System.out.println(g.apply(a,b));
  DoubleFunction m = F.plus(3);
  DoubleFunction n = F.plus(4);
  System.out.println(m.apply(0));
  System.out.println(n.apply(0));
}
/**
* Benchmarks and demonstrates usage of trivial and complex functions.
*/
public static void demo2(int size) {
View Full Code Here

Examples of ceylon.language.meta.declaration.ValueDeclaration.apply()

            ceylon.language.meta.declaration.ClassDeclaration caseClass = caseClassType.getDeclaration();
            if(!caseClass.getAnonymous())
                continue;
            ValueDeclaration valueDeclaration = caseClass.getContainingPackage().getValue(caseClass.getName());
            ceylon.language.meta.model.Value<? extends Type,? super Object> valueModel =
                    valueDeclaration.<Type,Object>apply($reifiedType, TypeDescriptor.NothingType);
            Type value = valueModel.get();
            ret.set(count++, value);
        }
        return ret.take(count).sequence();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.