Examples of Variable


Examples of linearProgramming.Variable

            int length = 1 + rnd.nextInt(4);
            Summand[] summands = new Summand[length];
            List<Variable> vars = new ArrayList<Variable>();
            for (int k = 0; k < length; k++) {
                summands[k].setCoeff(0.5 - rnd.nextDouble());
                Variable v;
                do {
                    v = (Variable)l.getVariables().toArray()[rnd.nextInt(l.getVariables().size())];
                } while (vars.contains(v));
                summands[k].setVar(v);
                vars.add(v);
View Full Code Here

Examples of loop.ast.Variable

      InlineListDef list = (InlineListDef) child;

      if (!list.children().isEmpty()) {
        Node first = list.children().get(0);
        if (first instanceof Variable) {
          Variable var = (Variable) first;

          if ("define".equals(var.name)) {
            return transformToFunctionDecl(list);
          } else {
            // This is a function call.
View Full Code Here

Examples of lupos.datastructures.items.Variable

        int i = 0;

        // result order is defined...
        if (resultOrder != null && resultOrder.size() > 0) {
          for (final String s : resultOrder) {
            if (variables.contains(new Variable(s))) {
              tableHead[i++] = "?" + s;
            }
          }
        } else {
          // result order is not defined...
          for (final Variable v : variables) {
            tableHead[i++] = v.toString();
          }
        }
        // --- generate table head - end ---

        // --- generate table rows - begin ---
        final Object[][] rows = new Object[qr.size()][];

        i = 0;

        for (final Bindings ba : qr) {
          final Object[] row = new Object[variables.size()];

          int j = 0;

          // result order is defined...
          if (resultOrder != null && resultOrder.size() > 0) {
            for (final String s : resultOrder) {
              if (variables.contains(new Variable(s))) {
                final Literal literal = ba.get(new Variable(s));
                String value = "";

                if (literal != null) {
                  value = literal.toString(prefixInstance);
                }
View Full Code Here

Examples of net.asfun.jangod.util.Variable

  public Object retraceVariable(String variable) {
    if ( variable == null || variable.trim().length() == 0 ) {
      JangodLogger.severe("variable name is required.");
      return Constants.STR_BLANK;
    }
    Variable var = new Variable(variable);
    String varName = var.getName();
    //find from runtime(tree scope) > engine > global
    Object obj = runtime.get(varName, level);
    int lvl = level;
    while( obj == null && lvl > 1) {
      obj = runtime.get(varName, --lvl);
    }
    if ( obj == null ) {
      obj = context.getAttribute(varName);
    }
    if ( obj == null ) {
      if( VAR_DATE.equals(variable) ) {
        return new java.util.Date();
      }
      if ( VAR_PATH.equals(variable) ) {
        return getWorkspace();
      }
    }
    if ( obj != null ) {
      obj = var.resolve(obj);
      if ( obj == null ) {
        JangodLogger.fine(varName + " can't resolve member >>> " + variable);
      }
    } else {
      JangodLogger.finer(variable + " can't resolve variable >>> " + varName);
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Variable

   
    /** Variable selection */
    public Variable selectVariable(Solution solution) {
        Model model = solution.getModel();
        if (model.nrUnassignedVariables()==0) return null;
        Variable variable = null;
        for (Enumeration e=model.unassignedVariables().elements();e.hasMoreElements();) {
            Variable v = (Variable)e.nextElement();
            if (variable==null || v.compareTo(variable)<0) variable = v;
        }
        return variable;
    }
View Full Code Here

Examples of net.sf.jmd.metarepresentation.impl.Variable

     * Test method for {@link de.dlr.sistec.modi.checks.impl
     * .MembersModified#check(java.util.List)}.
     */
    public void testCheckVariableModified() {
      //A Variable adds the Value to the member
      amMember = new Variable();
      dmMember = new Variable();
     
      amModelItem.addMember(amMember);
      dmModelItem.addMember(dmMember);
      List<IDifference> results = membersModified.check(differences);
        assertNotNull("The results must not be null", results);
View Full Code Here

Examples of net.sf.laja.parser.engine2.element.Variable

    t511a.add(204, a);

    // t511 = t511a "." $x
    t511.add(205, t511a, testcaseT511T511a);
    t511.add(207, new Str(206, "."));
    t511.add(209, new Variable(208, "t511", x_getT511a));

    // t512 = a $true !$false
    t512.add(210, a);
    t512.add(212, new Variable(211, "t512", true_getTrue));
    t512.add(214, new Variable(213, "t512", false_getFalse, NOT));

    // testcase =
    //   "111. " t111 cr
    //   "112. " t112 cr
    //   "113. " t113 cr
View Full Code Here

Examples of net.sf.laja.parser.grammar.element.Variable

    return new Reference((Row)grammar);
  }

  @Override
  public IVariable createVariable() {
    return new Variable();
  }
View Full Code Here

Examples of net.sf.parteg.base.testsuiteexport.Variable

    List<org.eclipse.uml2.uml.Class> oInstantiatedClasses = new ArrayList<org.eclipse.uml2.uml.Class>();
    for(org.eclipse.uml2.uml.Class oContextClass : Configuration.getStateMachineClassMap().values()) {
      if(!oInstantiatedClasses.contains(oContextClass)) {
        oInstantiatedClasses.add(oContextClass);
        // add new variable definition
        Variable oVar = TestsuiteexportFactory.eINSTANCE.createVariable();
        oVar.setName(m_sObjectName);
        oVar.setType(oContextClass.getName());
        oVar.setValue("");
        m_oCurrentTestCase.getDefine().add(oVar);
      }
    }
   
    // collect real parameters - and their sub attributes
    HashSet<TCGParameter> colRealParameter = new HashSet<TCGParameter>();
   
    // iterate through all collected parameter instances
    for(EventParameterInstance oParameter : in_colParameters.keySet()) {
      TCGParameter oSuperParam = TCGParameterHelperClass.getSuperParameter(
          oParameter.getParameter());
     
      if(!oParameter.isReturnParameter()) {

        // the super parameter is not the original parameter and was not used yet
        if(!oSuperParam.equals(oParameter.getParameter())) {
          if(!colRealParameter.contains(oSuperParam)) {
            colRealParameter.add(oSuperParam);
            // print all complex parameters
            Variable oVar = TestsuiteexportFactory.eINSTANCE.createVariable();
            oVar.setName(oSuperParam.getName()
                + oParameter.getTransitionInstance().getName());
            oVar.setType(getClassName(oSuperParam.getValueType()));
            oVar.setValue("");
            m_oCurrentTestCase.getDefine().add(oVar);
          }
          // print the referenced attribute properties
          boolean define = false; // only assign parameter values
          printParameterValue(in_colParameters, oParameter, define);
View Full Code Here

Examples of net.sf.saxon.trans.Variable

                        (String) entry.getValue());
            }

            xpe.setStaticContext(sc);

            Variable thisVar = sc.declareVariable(_contextVar);
            thisVar.setValue(needsDomSourceWrapping ? rootNode : node);

            XPathExpression exp = xpe.createExpression(_queryExpr);

            // After 8.3(?) Saxon nodes no longer implement Dom.
            // The client needs saxon8-dom.jar, and the code needs
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.