Package org.cdma.interfaces

Examples of org.cdma.interfaces.IArray


            itemName.setText(itemNameString);
            int rank = dataItem.getRank();
            // System.out.println("dataItem rank=" + rank);
            if (rank < 3) {
                try {
                    IArray array = dataItem.getData();
                    // System.out.println("array rank =" + array.getRank());
                    // System.out.println("array shape =" + Arrays.toString(array.getShape()));
                    arrayViewer.setArray(array, itemNameString);
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            else {
                playerComposite.setVisible(true);
                // Create rank - 2 player
                for (int i = 0; i < rank - 2; i++) {
                    createPlayer(i);
                }

                // At first display the first index
                try {
                    // Extract the completeShapeInformation
                    int[] completeShape = dataItem.getShape();

                    // Create the first index origine fill to 0
                    arrayOrigine = new int[rank];
                    Arrays.fill(arrayOrigine, 0);
                    // Create the unitary slice
                    arrayShape = new int[rank];
                    Arrays.fill(arrayShape, 1);
                    arrayShape[arrayShape.length - 2] = completeShape[completeShape.length - 2];
                    arrayShape[arrayShape.length - 1] = completeShape[completeShape.length - 1];
                    IArray array = dataItem.getData(arrayOrigine, arrayShape);
                    IArray slice = array.getArrayUtils().section(arrayOrigine, arrayShape)
                    .getArray();
                    arrayViewer.setArray(slice, itemNameString);
                }
                catch (Exception e) {
                    e.printStackTrace();
View Full Code Here


                    {
                        int index = ((IPlayer) source).getIndex();
                        arrayOrigine[aposition] = index;
                        try {

                            IArray array = dataItem.getData(arrayOrigine, arrayShape);
                            // long end1 = System.currentTimeMillis();
                            // System.out.println("getData=" + (end1 - beginTime));
                            // dataGroup.setLayout(new FillLayout());
                            // System.out.println("arrayOrigine=" + Arrays.toString(arrayOrigine));
                            // System.out.println("arrayShape=" + Arrays.toString(arrayShape));
                            int[] newOrigine = new int[arrayOrigine.length];
                            Arrays.fill(newOrigine, 0);

                            IArray slice = array.getArrayUtils().section(newOrigine, arrayShape)
                            .getArray();
                            // long end2 = System.currentTimeMillis();
                            // System.out.println("getSlice=" + (end2 - beginTime));

                            arrayViewer.setArray(slice, dataItem.getShortName());
View Full Code Here

TOP

Related Classes of org.cdma.interfaces.IArray

Copyright © 2018 www.massapicom. 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.