Examples of toPackedArray()


Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList<Integer>();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList<Integer>();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.antlr.misc.BitSet.toPackedArray()

      words = new long[1];
            tokenTypeList = new ArrayList();
        }
    else {
      BitSet bits = BitSet.of(follow.tokenTypeSet);
      words = bits.toPackedArray();
            tokenTypeList = follow.tokenTypeSet.toList();
        }
    // use the target to convert to hex strings (typically)
    String[] wordStrings = new String[words.length];
    for (int j = 0; j < words.length; j++) {
View Full Code Here

Examples of org.encog.mathutil.matrices.Matrix.toPackedArray()

 
  public void testPackedArray() throws Throwable
  {
    double matrixData[][] = {{1.0,2.0},{3.0,4.0}};
    Matrix matrix = new Matrix(matrixData);
    Double matrixData2[] = matrix.toPackedArray();
    TestCase.assertEquals(4, matrixData2.length);
    TestCase.assertEquals(1.0,matrix.get(0, 0));
    TestCase.assertEquals(2.0,matrix.get(0, 1));
    TestCase.assertEquals(3.0,matrix.get(1, 0));
    TestCase.assertEquals(4.0,matrix.get(1, 1));
View Full Code Here

Examples of org.encog.mathutil.matrices.Matrix.toPackedArray()

 
  public void testPackedArray() throws Throwable
  {
    double matrixData[][] = {{1.0,2.0},{3.0,4.0}};
    Matrix matrix = new Matrix(matrixData);
    double matrixData2[] = matrix.toPackedArray();
    TestCase.assertEquals(4, matrixData2.length);
    TestCase.assertEquals(1.0,matrix.get(0, 0));
    TestCase.assertEquals(2.0,matrix.get(0, 1));
    TestCase.assertEquals(3.0,matrix.get(1, 0));
    TestCase.assertEquals(4.0,matrix.get(1, 1));
View Full Code Here

Examples of org.matrix.Matrix.toPackedArray()

        Matrix myMatrix = new Matrix(2, 2);
        myMatrix.set(0, 0, 1.0);
        myMatrix.set(0, 1, 2.0);
        myMatrix.set(1, 0, 3.0);
        myMatrix.set(1, 1, 4.0);
        double []myArray = myMatrix.toPackedArray();
        assertEquals(4, myArray.length);
        assertEquals(myArray[0], 1.0);
        assertEquals(myArray[1], 2.0);
        assertEquals(myArray[2], 3.0);
        assertEquals(myArray[3], 4.0);
View Full Code Here

Examples of org.matrix.Matrix.toPackedArray()

    }
    @Test
    public void columnMatrixToArray() {
        double []myinitMatrix = {1, 2, 3};
        Matrix myMatrix = Matrix.createColumnMatrix(myinitMatrix);
        double []myArrayFromMatrix = myMatrix.toPackedArray();
        assertEquals(3, myArrayFromMatrix.length);
        assertEquals(myinitMatrix[0], myArrayFromMatrix[0], EPSILON);
        assertEquals(myinitMatrix[1], myArrayFromMatrix[1], EPSILON);
        assertEquals(myinitMatrix[2], myArrayFromMatrix[2], EPSILON);
    }
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.