Examples of toArray()


Examples of org.apache.commons.collections.set.ListOrderedSet.toArray()

                fields.add(fds[i]);
            }
        }

        FieldDescriptor[] result = new FieldDescriptor[fields.size()];
        fields.toArray(result);
        return result;
    }

    /**
     * Appends to the statement a comma separated list of column names.
View Full Code Here

Examples of org.apache.commons.collections15.Bag.toArray()

        bag.add("A");
        bag.add("A");
        bag.add("B");
        bag.add("B");
        bag.add("C");
        Object[] array = bag.toArray();
        int a = 0, b = 0, c = 0;
        for (int i = 0; i < array.length; i++) {
            a += (array[i].equals("A") ? 1 : 0);
            b += (array[i].equals("B") ? 1 : 0);
            c += (array[i].equals("C") ? 1 : 0);
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.threed.Vector3D.toArray()

        // action
        Line reverted = line.revert();

        // verify
        Assert.assertArrayEquals(expected.toArray(), reverted.getDirection().toArray(), 0);

    }

}
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D.toArray()

            g2.setPaint(Color.black);
            g2.drawRect(0, 0, w - 1, h - 1);
           
            for (Vector2D point : points) {
                Vector2D p = transform(point, w, h);
                double[] arr = p.toArray();
                g2.draw(new Rectangle2D.Double(arr[0] - 1, arr[1] - 1, 2, 2));
            }
        }       
       
        @Override
View Full Code Here

Examples of org.apache.commons.math3.linear.ArrayRealVector.toArray()

                .weight(new DiagonalMatrix(new double[]{16, 4}))
                .model(new MultivariateJacobianFunction() {
                    public Pair<RealVector, RealMatrix> value(RealVector actualPoint) {
                        //verify correct values passed in
                        Assert.assertArrayEquals(
                                point.toArray(), actualPoint.toArray(), Precision.EPSILON);
                        //return values
                        return new Pair<RealVector, RealMatrix>(
                                new ArrayRealVector(new double[]{3, 4}),
                                MatrixUtils.createRealMatrix(new double[][]{{5, 6}, {7, 8}})
                        );
View Full Code Here

Examples of org.apache.commons.math3.linear.RealVector.toArray()

      }
     
      QRDecomposition qr = new QRDecomposition(matrix);
      RealVector solution = qr.getSolver().solve(vector);
       
      double[] coeffs = solution.toArray();
     
      for (double coeff : coeffs) {
        if (coeff > 10e3) {
          continue calculatePolynomials;
        }
View Full Code Here

Examples of org.apache.cxf.message.MessageContentsList.toArray()

        if (request instanceof List) {
            List<Object> params = CastUtils.cast((List<?>) request);
            parameters = params.toArray(new Object[params.size()]);
        } else if (request != null) {
            List<Object> params = new MessageContentsList(request);
            parameters = params.toArray(new Object[params.size()]);
        } else {
            parameters = new Object[0];
        }

        // injecting context parameters
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptorList.toArray()

    ConglomerateDescriptorList cdl = new ConglomerateDescriptorList();
        getDescriptorViaHeap(
            null, scanQualifier, ti, null, cdl, ConglomerateDescriptor.class);

        return cdl.toArray(new ConglomerateDescriptor[cdl.size()]);
  }
 

  /**
   * Populate the ConglomerateDescriptorList for the
View Full Code Here

Examples of org.apache.hama.commons.math.DoubleVector.toArray()

    MultiLayerPerceptron mlp = new SmallMultiLayerPerceptron(modelPath);
    DoubleVector input = new DenseDoubleVector(new double[] { 1, 2, 3 });
    try {
      DoubleVector result = mlp.output(input);
      assertArrayEquals(new double[] { 0.6636557, 0.7009963, 0.7213835 },
          result.toArray(), 0.0001);
    } catch (Exception e1) {
      e1.printStackTrace();
    }

    // delete meta-data
View Full Code Here

Examples of org.apache.hama.ml.math.DoubleVector.toArray()

    MultiLayerPerceptron mlp = new SmallMultiLayerPerceptron(modelPath);
    DoubleVector input = new DenseDoubleVector(new double[] { 1, 2, 3 });
    try {
      DoubleVector result = mlp.output(input);
      assertArrayEquals(new double[] { 0.6636557, 0.7009963, 0.7213835 },
          result.toArray(), 0.0001);
    } catch (Exception e1) {
      e1.printStackTrace();
    }

    // delete meta-data
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.