Examples of toFloatArray()


Examples of com.humaorie.dollar.ArrayWrapper.FloatArrayWrapper.toFloatArray()

    @Test
    public void unboxFloatArray() {
        final Float[] boxed = {42.0f};
        final float[] unboxed = {42};
        final FloatArrayWrapper arrayWrapper = new FloatArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toFloatArray(), 0.1f);
    }

    @Test
    public void unboxFloatArrayToDoubleArray() {
        final Float[] boxed = {42f};
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.IntegerArrayWrapper.toFloatArray()

    public void unboxIntegerArrayToFloatArray() {
        final Integer[] boxed = { 42 };
        final float[] unboxed = { 42f };
        final IntegerArrayWrapper arrayWrapper = new IntegerArrayWrapper(
                boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toFloatArray(), 0.001f);
    }

    @Test
    public void unboxIntegerArrayToDoubleArray() {
        final Integer[] boxed = { 42 };
View Full Code Here

Examples of com.jacob.com.SafeArray.toFloatArray()

   */
  public void testFloatSafeArray() {
    float sourceData[] = new float[] { 1.5F, 2.5F, 3.5F };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromFloatArray(sourceData);
    float[] extractedFromSafeArray = saUnderTest.toFloatArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }
  }

View Full Code Here

Examples of com.jacob.com.SafeArray.toFloatArray()

    System.out.println("elem size:" + fa.getElemSize());
    float fack[] = new float[] { 123.456F, 456.123F, 1234567.89F,
        12.3456789F };
    printArray(fack);
    fa.fromFloatArray(fack);
    fack = fa.toFloatArray();
    printArray(fack);

    float f4[] = new float[4];
    fa.getFloats(0, 4, f4, 0);
    printArray(f4);
View Full Code Here

Examples of com.jacob.com.SafeArray.toFloatArray()

    fa.getFloats(0, 4, f4, 0);
    printArray(f4);

    SafeArray fa2 = new SafeArray(Variant.VariantFloat, 4);
    fa2.setFloats(0, 4, f4, 0);
    fack = fa2.toFloatArray();
    printArray(fack);

    // boolean
    System.out.println("Boolean");
    SafeArray ba = new SafeArray(Variant.VariantBoolean, 4);
View Full Code Here

Examples of it.unimi.dsi.fastutil.floats.FloatArrayList.toFloatArray()

        if (idx>=0){
          scoreList.add(_function.score(_dataCache.freqs[idx], _boostList[idx]));
          explList.add(_function.explain(_dataCache.freqs[idx], _boostList[idx]));
        }
      }
      Explanation topLevel = _function.explain(scoreList.toFloatArray());
      for (Explanation sub : explList){
        topLevel.addDetail(sub);
      }
      return topLevel;
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.floats.FloatArrayList.toFloatArray()

          explList.add(_function.explain(_dataCache.freqs[idx], _boostList[idx]));
        }
        count++;
        encoded >>>= 1;
      }
      Explanation topLevel = _function.explain(scoreList.toFloatArray());
      for (Explanation sub : explList){
        topLevel.addDetail(sub);
      }
      return topLevel;
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.floats.FloatArrayList.toFloatArray()

        if (idx>=0){
          scoreList.add(_function.score(_dataCache.freqs[idx], _boostList[idx]));
          explList.add(_function.explain(_dataCache.freqs[idx], _boostList[idx]));
        }
      }
      Explanation topLevel = _function.explain(scoreList.toFloatArray());
      for (Explanation sub : explList){
        topLevel.addDetail(sub);
      }
      return topLevel;
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.floats.FloatArrayList.toFloatArray()

          explList.add(_function.explain(_dataCache.freqs[idx], _boostList[idx]));
        }
        count++;
        encoded >>>= 1;
      }
      Explanation topLevel = _function.explain(scoreList.toFloatArray());
      for (Explanation sub : explList){
        topLevel.addDetail(sub);
      }
      return topLevel;
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.floats.FloatArrayList.toFloatArray()

        if (idx>=0){
          scoreList.add(_function.score(_dataCache.freqs[idx], _boostList[idx]));
          explList.add(_function.explain(_dataCache.freqs[idx], _boostList[idx]));
        }
      }
      Explanation topLevel = _function.explain(scoreList.toFloatArray());
      for (Explanation sub : explList){
        topLevel.addDetail(sub);
      }
      return topLevel;
    }
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.