Examples of Scalar


Examples of mikera.vectorz.Scalar

   
  }
 
  @Test public void testScalarAdd() {
    NDArray a=NDArray.newArray();
    assertEquals(a,new Scalar(0.0));
   
    a.add(1.0);
    assertEquals(a,new Scalar(1.0));
    assertFalse(a.equals(new Scalar(0.0)));
  }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.Scalar

        if (state.isArray()) {
            return getPersistedPropertyState(name) == null;
        }
        else {
            Scalar value = state.getScalar();
            return !value.equals(ScalarImpl.nullScalar()) && getPersistedPropertyState(name) == null;
        }
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

    return false;
  }

  public boolean visit(ReflectionArrayVariableReference s) throws Exception {
    if (s.getExpression() instanceof Scalar) {
      Scalar name = (Scalar) s.getExpression();
      if (name.getScalarType() == Scalar.TYPE_STRING) {
        String dolarName = DOLLAR + name.getValue();
        check(dolarName, name.start(), name.end());
      }
    }
    operations.push(Operation.USE);

    return super.visit(s);
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

    return super.endvisit(s);
  }

  public boolean visit(ReflectionVariableReference s) throws Exception {
    if (s.getExpression() instanceof Scalar) {
      Scalar name = (Scalar) s.getExpression();
      if (name.getScalarType() == Scalar.TYPE_STRING) {
        String dolarName = DOLLAR + name.getValue();
        check(dolarName, name.start(), name.end());
      }
    }
    operations.push(Operation.USE);

    return super.visit(s);
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

            if (!(element.getKey() instanceof Scalar)) {
                return false;
            }
           
            if (element.getValue() instanceof InfixExpression) {
                Scalar namespace = (Scalar) element.getKey();
                Scalar path = (Scalar) ((InfixExpression) element.getValue()).getRight();
                VariableReference reference = (VariableReference) ((InfixExpression) element.getValue()).getLeft();
                extractPsr0(namespace, path, reference);
                return false;
            } else if(element.getValue() instanceof ArrayCreation) {
                Scalar namespace = (Scalar) element.getKey();
                ArrayCreation paths = (ArrayCreation) element.getValue();
                for (ArrayElement elem  : paths.getElements()) {
                  if (elem.getValue() instanceof InfixExpression) {
                    Scalar path = (Scalar) ((InfixExpression) elem.getValue()).getRight();
                        VariableReference reference = (VariableReference) ((InfixExpression) elem.getValue()).getLeft();
                        extractPsr0(namespace, path, reference);
                  }
                  return false;
                }
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

      return null;
    }
    if (node instanceof ConstantDeclaration) {
      ConstantDeclaration constantDeclaration = (ConstantDeclaration) node;
      if (constantDeclaration.getConstantValue() instanceof Scalar) {
        Scalar scalar = (Scalar) constantDeclaration.getConstantValue();
        return scalar.getValue();
      }
    }
    return null;

  }
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

        List<ASTNode> childs = args.getChilds();
        int i = 0;
        argNames = new String[childs.size()];
        for (ASTNode o : childs) {
          if (o instanceof Scalar) {
            Scalar arg = (Scalar) o;
            argNames[i] = ASTUtils.stripQuotes(arg.getValue());
          }
          i++;
        }
      }
      return new MethodElementReturnTypeGoal(typedGoal.getContext(),
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.Scalar

        if (args.size() == 2) {
          ASTNode firstArg = args.get(0);
          ASTNode secondArg = args.get(0);
          if (firstArg instanceof Scalar
              && secondArg instanceof Scalar) {
            Scalar constantName = (Scalar) firstArg;
            Scalar constantValue = (Scalar) secondArg;
            if (this.constantName.equals(stripQuotes(constantName
                .getValue()))) {
              declarations.add(constantValue);
            }
          }
View Full Code Here

Examples of org.eclipse.test.internal.performance.data.Scalar

    String scenarioId = performanceResult.getClassName() + "." + performanceResult.getName();

    DataPoint[] points = new DataPoint[2];

    Map<Dimension, Scalar> map = new HashMap<Dimension, Scalar>();
    map.put(Dimension.CPU_TIME, new Scalar((Dim) Dimension.CPU_TIME, 0));
    points[0] = new DataPoint(0, map);

    map = new HashMap<Dimension, Scalar>();
    map.put(Dimension.CPU_TIME, new Scalar((Dim) Dimension.CPU_TIME, (long) performanceResult.getTime() * 1000));
    points[1] = new DataPoint(1, map);

    final Sample sample = new Sample(scenarioId, System.currentTimeMillis(), Collections.EMPTY_MAP, points);
    sample.tagAsSummary(true, performanceResult.getName(), new Dimension[] {Dimension.CPU_TIME}, 0, null);
    Variations variations = PerformanceTestPlugin.getVariations();
View Full Code Here

Examples of org.eclipse.test.internal.performance.data.Scalar

  protected void collectGlobalPerformanceInfo(Map scalars) {
    // no default implementation
  }
 
    void addScalar(Map scalars, Dim dimension, long value) {
        scalars.put(dimension, new Scalar(dimension, value));
    }
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.