Examples of Problem


Examples of de.bwaldvogel.liblinear.Problem

  public void initAllowedLibOptionFlags() {
    allowedLibOptionFlags = "sceB";
  }
 
  private Problem readProblem(InputStreamReader isr) throws MaltChainedException {
    Problem problem = new Problem();
    final FeatureList featureList = new FeatureList();
    if (configLogger.isInfoEnabled()) {
      owner.getGuide().getConfiguration().getConfigLogger().info("- Read all training instances.\n");
    }
    try {
View Full Code Here

Examples of edu.stanford.nlp.maxent.Problem

    TaggerFeatures feats = samples.getTaggerFeatures();
    byte[][] fnumArr = samples.getFnumArr();
    System.err.println("Samples from " + config.getFile());
    System.err.println("Number of features: " + feats.size());
    System.err.println("Tag set: " + maxentTagger.tags.tagSet());
    Problem p = new Problem(samples, feats);
    LambdaSolveTagger prob = new LambdaSolveTagger(p, 0.0001, fnumArr);
    maxentTagger.prob = prob;

    if (config.getSearch().equals("owlqn")) {
      CGRunner runner = new CGRunner(prob, config.getModel(), config.getSigmaSquared());
View Full Code Here

Examples of fr.insalyon.citi.golo.compiler.GoloCompilationException.Problem

      compileAndLoadGoloModule(SRC, "failure-undeclared-parameter.golo");
      fail("A GoloCompilationException was expected");
    } catch (GoloCompilationException expected) {
      List<GoloCompilationException.Problem> problems = expected.getProblems();
      assertThat(problems.size(), is(1));
      Problem problem = problems.get(0);
      assertThat(problem.getType(), is(UNDECLARED_REFERENCE));
      assertThat(problem.getSource().getIrElement(), instanceOf(ReferenceLookup.class));
      ReferenceLookup lookup = (ReferenceLookup) problem.getSource().getIrElement();
      assertThat(lookup.getName(), is("some_parameter"));
      assertThat(lookup.getPositionInSourceCode().getLine(), is(4));
      assertThat(lookup.getPositionInSourceCode().getColumn(), is(13));
      throw expected;
    }
View Full Code Here

Examples of greed.model.Problem

                new ParamValue(param1, "15"),
                new ParamValue(param2, valueList0),
                new ParamValue(param3, valueList1)
        }, new ParamValue(new Param("return", retType, 0), valueList2));

        Problem problem = new Problem("Test", 250, "TestClass", 2000, 256, method, new Testcase[]{case0}, null);

        Map<String, Object> model = new HashMap<String, Object>();
        model.put("Problem", problem);
        model.put("ClassName", "Test");
        model.put("Method", problem.getMethod());
        model.put("Examples", problem.getTestcases());
        model.put("NumOfExamples", problem.getTestcases().length);
        model.put("HasArray", true);
        model.put("ReturnsArray", true);
        model.put("RecordRuntime", true);
        model.put("RecordScore", true);
        model.put("CreateTime", System.currentTimeMillis() / 1000);
View Full Code Here

Examples of hu.u_szeged.nbo.client.model.Problem

  public void run() {
    sqlManager = new SQLManager();
    final String username = ConfigurationManager.settings.get("username");
    final List<String> ttProblemsName = new ArrayList<String>();
    Problem treeElements = ((Problem)tree.getRoot()).getProblems().get(1);

    for (TransportationTask tt: treeElements.getTTProblems()) {
      ttProblemsName.add(tt.getName());
    }
   
    if (!sqlManager.ready()) {
      return;
View Full Code Here

Examples of intellijcoder.model.Problem

public class SolutionCodeBuilderTest {
    private CodeBuilder codeBuilder = new SolutionCodeBuilder();

    @Test
    public void testBasicClassTemplateStructure() throws Exception {
        final Problem problem = make(a(ProblemMaker.Problem, with(className, "Lottery"),
                with(returnType, "String[]"), with(methodName, "sortByOdds"),
                with(paramTypes, new String[]{"String[]"}), with(paramNames, new String[] {"rules"})));
        final String[] expectedTemplate = {"public class Lottery","{","public String[]","sortByOdds","(","String[]","rules",")","{","}","}"};
        verifyGeneratedClassTemplate(problem, expectedTemplate);
    }
View Full Code Here

Examples of intellijcoder.model.ProblemMaker.Problem

        Maker<Problem> defaultProblem = a(Problem,
                with(className, "BinaryCode"), with(methodName, "decode"), with(returnType, "String[]"),
                with(paramTypes, new String[]{"String"}), with(paramNames, new String[]{"message"}),
                with(testCases, new TestCase[] { make(defaultTestCase) }));

        Problem problem = make(defaultProblem);
        Problem problemCopy = make(defaultProblem);
        Problem problemWithDifferentClassName = make(defaultProblem.but(with(className, "Lottery")));
        Problem problemWithDifferentReturnType = make(defaultProblem.but(with(returnType, "float")));
        Problem problemWithDifferentMethodName = make(defaultProblem.but(with(methodName, "calculate")));
        Problem problemWithDifferentParamType = make(defaultProblem.but(with(paramTypes, new String[]{"int"})));
        Problem problemWithDifferentParamName = make(defaultProblem.but(with(paramNames, new String[]{"m"})));
        Problem problemWithDifferentTestCase = make(defaultProblem.but(
                with(testCases, new TestCase[] { make(defaultTestCase.but(with(output, "2"))) })));

        assertTrue("problems with the same fields should be equal", problem.equals(problemCopy));
        assertTrue("hash codes of problems with the same fields should be equal", problem.hashCode() == problemCopy.hashCode());
        assertFalse("problems with different class names should not be equal", problem.equals(problemWithDifferentClassName));
View Full Code Here

Examples of javax.constraints.impl.Problem

  public void trace(Var[] vars, PropagationEvent event) {
    for (int i = 0; i < vars.length; i++) {
      trace(vars[i],event);
    }
   
    Problem p = (Problem)getProblem();
    Constrainer constrainer = p.getConstrainer();
    IntExpArray intvars = new IntExpArray(constrainer,vars.length);
    for(int i=0; i<vars.length; i++) {
      IntExp var = (IntExp)vars[i].getImpl();
      intvars.set(var, i);
    }
View Full Code Here

Examples of net.sf.javailp.Problem

  private final Map<EleConnector, LPVariablePair> variableMap;

 
  public LPEleConstraintEnforcer() {
   
    problem = new Problem();
   
    variables = new ArrayList<LPVariablePair>();
    variableMap = new HashMap<EleConnector, LPVariablePair>();
   
  }
View Full Code Here

Examples of org.apache.tuscany.sca.monitor.Problem

     * @param message
     * @param model
     */
    private void warning(Monitor monitor, String message, Object model, Object... messageParameters) {
        if (monitor != null) {
            Problem problem =
                monitor.createProblem(this.getClass().getName(),
                                      "contribution-validation-messages",
                                      Severity.WARNING,
                                      model,
                                      message,
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.