Examples of FLOOR


Examples of org.apache.commons.math3.analysis.function.Floor

        return new UnivariateFunction[] {
            new Power(2.0), new Exp(), new Expm1(), new Log(), new Log10(),
            new Log1p(), new Cosh(), new Sinh(), new Tanh(), new Cos(),
            new Sin(), new Tan(), new Acos(), new Asin(), new Atan(),
            new Inverse(), new Abs(), new Sqrt(), new Cbrt(), new Ceil(),
            new Floor(), new Rint(), new Signum(), new Ulp()
        };
    }
View Full Code Here

Examples of org.apache.commons.math3.analysis.function.Floor

        v_mapCeilToSelf.mapToSelf(new Ceil());
        double[] result_mapCeilToSelf =  {-1d,1d,2d};
        assertClose("compare vectors" ,result_mapCeilToSelf,v_mapCeilToSelf.toArray(),normTolerance);

        //octave =  floor(ceil_v)
        RealVector v_mapFloor = ceil_v.map(new Floor());
        double[] result_mapFloor = {-2d,0d,1d};
        assertClose("compare vectors" ,result_mapFloor,v_mapFloor.toArray(),normTolerance);

        //octave = floor(ceil_v)
        RealVector v_mapFloorToSelf = ceil_v.copy();
        v_mapFloorToSelf.mapToSelf(new Floor());
        double[] result_mapFloorToSelf =  {-2d,0d,1d};
        assertClose("compare vectors" ,result_mapFloorToSelf,v_mapFloorToSelf.toArray(),normTolerance);

        //octave =  ???
        RealVector v_mapRint = ceil_v.map(new Rint());
View Full Code Here

Examples of org.apache.commons.math3.analysis.function.Floor

        v_mapCeilToSelf.mapToSelf(new Ceil());
        double[] result_mapCeilToSelf =  {-1d,1d,2d};
        assertClose("compare vectors" ,result_mapCeilToSelf,v_mapCeilToSelf.toArray(),normTolerance);

        //octave =  floor(ceil_v)
        RealVector v_mapFloor = ceil_v.map(new Floor());
        double[] result_mapFloor = {-2d,0d,1d};
        assertClose("compare vectors" ,result_mapFloor,v_mapFloor.toArray(),normTolerance);

        //octave = floor(ceil_v)
        RealVector v_mapFloorToSelf = ceil_v.copy();
        v_mapFloorToSelf.mapToSelf(new Floor());
        double[] result_mapFloorToSelf =  {-2d,0d,1d};
        assertClose("compare vectors" ,result_mapFloorToSelf,v_mapFloorToSelf.toArray(),normTolerance);

        //octave =  ???
        RealVector v_mapRint = ceil_v.map(new Rint());
View Full Code Here

Examples of org.apache.imperius.spl.parser.expressions.impl.Floor

    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new ShortConstant(sn1));
      Expression e1 = new Floor(v,true);

      v.clear();
      v.add(new IntegerConstant(in1));
      Expression e2 = new Floor(v,true);

      v.clear();
      v.add(new LongConstant(ln1));
      Expression e3 = new Floor(v,true);

      v.clear();
      v.add(new FloatConstant(fn1));
      Expression e4 = new Floor(v,true);

      v.clear();
      v.add(new DoubleConstant(dn1));
      Expression e5 = new Floor(v,true);

      assertTrue(
        (Math.floor(sn1) - ((Number) e1.evaluate()).shortValue())
          == 0);
      assertTrue(
        (Math.floor(in1) - ((Number) e2.evaluate()).intValue())
          == 0);
      assertTrue(
          (Math.floor(ln1) - ((Number) e3.evaluate()).intValue())
            == 0);
      assertTrue(
        (Math.floor(fn1) - ((Number) e4.evaluate()).intValue())
          == 0);
      assertTrue(
        (Math.floor(dn1) - ((Number) e5.evaluate()).longValue())
          == 0);
/*
      assertSame((new Double(sn1)).getClass(), (e1.evaluate()).getClass());
      assertSame((new Double(in1)).getClass(), (e2.evaluate()).getClass());
      assertSame((new Double(ln1)).getClass(), (e3.evaluate()).getClass());
View Full Code Here

Examples of org.apache.pig.piggybank.evaluation.math.FLOOR

          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testFLOOR() throws Exception{
       EvalFunc<DataAtom> FLOOR = new FLOOR();
          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          FLOOR.exec(tup, output);
          double expected = Math.floor(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
View Full Code Here

Examples of org.drools.spring.examples.jiahvac.model.Floor

    }

    private void renderFloors() {
        Floor[] floors = simulator.getFloors();
        for (int i = 0; i < floors.length; i++) {
            Floor floor = floors[i];
            JLabel label = labels[i];
            label.setText(String.format(
                    "%2d) %3.2f - pump-%1d %-8s, vent %-8s",
                    floor.getNumber()+1,
                    floor.getThermometer().getReading(),
                    floor.getHeatPump().getId(),
                    floor.getHeatPump().getState(),
                    floor.getVent().getState()));
        }
    }
View Full Code Here

Examples of wolf.city.buildings.Floor

    this.b = b;
    offset = b.lotShape.getCentroid().getCoordinate();
    float height = 0;
    for(int i=0; i<b.sections.size(); i++){
      for(int f=0; f<b.sections.get(i).floors.size(); f++){
        Floor floor = b.sections.get(i).floors.get(f);
        height += floor.height;
      }
    }
    offset.z = height/2;
    try{
View Full Code Here

Examples of wolf.city.buildings.Floor

          //GL11.glVertex3d(c1.x-offset.x,c1.y-offset.y,c1.z-offset.z);
        }
        GL11.glEnd();
        GL11.glBegin(GL11.GL_QUADS);
        for(int f=0; f<b.sections.get(i).floors.size(); f++){
          Floor floor = b.sections.get(i).floors.get(f);
          height += floor.height;
          for(int j=0; j < floor.exterior.size(); j++){
            WallContainer wc = floor.exterior.get(j);
            //Coordinate p0 = wc.p0;
            Coordinate p1 = wc.p1;
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.