Package prefuse.data

Examples of prefuse.data.Table.rows()


  @Test
  public void testCopyTable() {
    Table t2 = TableUtilities.copyTable(this.table);

    for (IntIterator rows = t2.rows(); rows.hasNext();) {
      int row = (Integer) rows.next();
      for (int col = 0; col < t2.getColumnCount(); col++) {
        assertTrue(t2.get(row, col) + " " + this.table.get(row, col)
            + " didn't match.",
            t2.get(row, col).equals(this.table.get(row, col)));
View Full Code Here


   
    // Make sure row three is still in the table we copied.
    t2.get(3, 1);

    t2 = TableUtilities.copyTable(this.table);
    for (IntIterator t2Rows = t2.rows(), tableRows = this.table.rows(); t2Rows
        .hasNext();) {
      int t2Row = (Integer) t2Rows.next();
      int tableRow = (Integer) tableRows.next();
      for (int col = 0; col < t2.getColumnCount(); col++) {
        Object t2Value = t2.get(t2Row, col);
View Full Code Here

    /*
     * TODO: (might want to shortcut all of this by counting from 0 to
     * numberOfNodes)
     */
    Table nodeTable = g.getNodeTable();
    for (IntIterator ii = nodeTable.rows(); ii.hasNext();) {
      int nodeID = ii.nextInt();
      Node node = g.getNode(nodeID);
     
      int numEdges = g.getInDegree(node) + g.getOutDegree(node);
     
View Full Code Here

    /*
     * TODO: (might want to shortcut all of this by counting from 0 to
     * numberOfNodes)
     */
    Table nodeTable = g.getNodeTable();
    for (IntIterator ii = nodeTable.rows(); ii.hasNext();) {
      int nodeID = ii.nextInt();
      Node node = g.getNode(nodeID);
     
      int numEdges = g.getInDegree(node) + g.getOutDegree(node);
     
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.