public void trimToSize() { indexes.trimToSize(); values.trimToSize(); } public DoubleMatrix1D zMult(DoubleMatrix1D y, DoubleMatrix1D z, double alpha, double beta, boolean transposeA) {
public void trimToSize() { indexes.trimToSize(); values.trimToSize(); } public DoubleMatrix1D zMult(DoubleMatrix1D y, DoubleMatrix1D z, double alpha, double beta, boolean transposeA) {
/** * Part of interface contract */ public int[] getNodeIndicesArray() { giny_nodes.trimToSize(); return giny_nodes.elements(); }
/** * Part of interace contract */ public int[] getEdgeIndicesArray() { giny_edges.trimToSize(); return giny_edges.elements(); }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public int[] getNodeIndicesArray() { node_indices.trimToSize(); return node_indices.elements(); }
public int elementsHash() { if (elementsHashDirty) { // Update elementsHash if (permutation.size() > permutation.elements().length) { permutation.trimToSize(); } elementsHash = Arrays.hashCode(permutation.elements()); elementsHashDirty = false; } return elementsHash; } }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public int[] getEdgeIndicesArray() { final IntArrayList edge_indices = new IntArrayList(edges.size()); edges.keys(edge_indices); edge_indices.trimToSize(); return edge_indices.elements(); }
/** * It removes the views of the edges in the array from the given <code>giny.view.GraphView</code> * object. * * @param graph_view the <code>giny.view.GraphView</code> object from which edges will be removed * @param edge_indices the indices of the edges that will be removed * @return an array of edge indices that were removed */ // TESTED // NOTE: USE THIS INSTEAD OF removeGraphViewEdges (GraphView,Edge[]) static public int[] removeGraphViewEdges(GraphView graph_view, int[] edge_indices) { //TODO: Remove //CyLogger.getLogger().info("In BasicGraphViewHandler.removeGraphViewEdges()"); IntArrayList removedEdges = new IntArrayList(edge_indices.length); for (int i = 0; i < edge_indices.length; i++) { EdgeView edgeView = graph_view.removeEdgeView(edge_indices[i]); if (edgeView != null) { removedEdges.add(edge_indices[i]); } } //for i removedEdges.trimToSize(); //TODO: Remove //CyLogger.getLogger().info("Leaving BasicGraphViewHandler.removeGraphViewEdges()," + "num removed edges = " + removedEdges.size()); return removedEdges.elements(); } //removeGraphViewEdges
/** * It removes the views of the nodes with the given indices that are contained in the given * <code>giny.view.GraphView</code> object, it also removes the connected edges to * these nodes (an edge without a connecting node makes no mathematical sense). * * @param graph_view the <code>giny.view.GraphView</code> object from which nodes will be removed * @param node_indices the indices of the nodes that will be removed * @return an array of indices of nodes that were removed */ // NOTE: GINY automatically hides the edges connected to the nodes in the GraphPerspective // and this hiding fires a hideEdgesEvent, so removeGraphViewEdges will get called on those // edges and we don't need to remove them in this method static public int[] removeGraphViewNodes(GraphView graph_view, int[] node_indices) { //TODO: Remove //CyLogger.getLogger().info("In BasicGraphViewHandler.removeGraphViewNodes()"); IntArrayList removedNodesIndices = new IntArrayList(node_indices.length); for (int i = 0; i < node_indices.length; i++) { NodeView nodeView = graph_view.removeNodeView(node_indices[i]); if (nodeView != null) { removedNodesIndices.add(node_indices[i]); } } //for i removedNodesIndices.trimToSize(); //TODO: Remove //CyLogger.getLogger().info("Leaving BasicGraphViewHandler.removeGraphViewNodes(), " +"num removed nodes = " + removedNodesIndices.size()); return removedNodesIndices.elements(); } //removeGraphViewNodes
matches.trimToSize(); return viewSelection(matches.elements(), null, null); // take all rows and columns
matches.trimToSize(); return viewSelection(matches.elements(), null, null); // take all rows and columns
matches.trimToSize(); return viewSelection(matches.elements(), null, null); // take all rows and columns
matches.trimToSize(); return viewSelection(matches.elements(), null, null); // take all rows and columns
if (condition.apply(getQuick(i))) matches.add(i); matches.trimToSize(); return viewSelection(matches.elements());
if (condition.apply(getQuick(i))) matches.add(i); matches.trimToSize(); return viewSelection(matches.elements());
if (condition.apply(getQuick(i))) matches.add(i); matches.trimToSize(); return viewSelection(matches.elements());
if (condition.apply(getQuick(i))) matches.add(i); matches.trimToSize(); return viewSelection(matches.elements());
matches.trimToSize(); return viewSelection(matches.elements(), null); // take all columns
matches.trimToSize(); return viewSelection(matches.elements(), null); // take all columns
matches.trimToSize(); return viewSelection(matches.elements(), null); // take all columns