Examples of doubleMatrix()


Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

            DoubleMatrixToken affineMatrixToken = (DoubleMatrixToken) affineMatrix
                    .getToken();

            if ((affineMatrixToken.getColumnCount() == 3)
                    && (affineMatrixToken.getRowCount() == 2)) {
                _matrixValue = affineMatrixToken.doubleMatrix();
                _affineTransform = new AffineTransform(_matrixValue[0][0],
                        _matrixValue[1][0], _matrixValue[0][1],
                        _matrixValue[1][1], _matrixValue[0][2],
                        _matrixValue[1][2]);
            } else {
View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     */
    public void fire() throws IllegalActionException {
        super.fire();

        DoubleMatrixToken doubleMatrixToken = (DoubleMatrixToken) input.get(0);
        double[][] data = doubleMatrixToken.doubleMatrix();
        int width = doubleMatrixToken.getRowCount();
        int height = doubleMatrixToken.getColumnCount();

        for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     */
    public void fire() throws IllegalActionException {
        super.fire();

        DoubleMatrixToken doubleMatrixToken = (DoubleMatrixToken) input.get(0);
        double[][] data = doubleMatrixToken.doubleMatrix();
        int width = doubleMatrixToken.getRowCount();
        int height = doubleMatrixToken.getColumnCount();
        double[][] outputData = new double[width][height];
        int windowSize = 3;

View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     */
    public void fire() throws IllegalActionException {
        super.fire();

        DoubleMatrixToken doubleMatrixToken = (DoubleMatrixToken) input.get(0);
        double[][] data = doubleMatrixToken.doubleMatrix();
        int width = doubleMatrixToken.getRowCount();
        int height = doubleMatrixToken.getColumnCount();
        double[] newData = new double[width * height];
        _maxValue = 1;
        _minValue = 0;
View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     */
    public void attributeChanged(Attribute attribute)
            throws IllegalActionException {
        if (attribute == filter) {
            DoubleMatrixToken matrix = (DoubleMatrixToken) filter.getToken();
            double[][] matrixValue = matrix.doubleMatrix();
            int height = matrix.getRowCount();
            int width = matrix.getColumnCount();
            float[] floatArray = new float[width * height];
            int count = 0;

View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     @see #setLocation(double [])
     */
    public double[] getLocation() {
        try {
            DoubleMatrixToken token = (DoubleMatrixToken) getToken();
            double[][] value = token.doubleMatrix();
            return value[0];
        } catch (IllegalActionException ex) {
            // Should not occur.
            throw new InternalErrorException(ex);
        }
View Full Code Here

Examples of ptolemy.data.DoubleMatrixToken.doubleMatrix()

     *   playing audio.
     */
    public boolean postfire() throws IllegalActionException {
        if (input.hasToken(0)) {
            DoubleMatrixToken token = (DoubleMatrixToken) input.get(0);
            double[][] data = token.doubleMatrix();

            // This method is most efficient if repeated calls pass the same size
            // array. In this case, it does not re-allocate the byte array that
            // it returns, but rather reuses the same array on the heap.
            int numberOfSamples = data[0].length;
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.