Updating SheetToMap to take comma separated cell names. Lines 180 – 193. I think I’ll need an iterating compare function. Nope, wound up doing something simpler
for (String colName : colNames) { String curCells = tm.get(colName); String[] cellArray = curCells.split("\\|\\|"); <--- new! for(String curCell : cellArray) { addNode(curCell, rowName); if (prevCell != null && !curCell.equals(prevCell)) { String edgeName = curCell + "+" + prevCell; if (graph.getEdge(edgeName) == null) { try { graph.addEdge(edgeName, curCell, prevCell); System.out.println("adding edge [" + edgeName + "]"); } catch (EdgeRejectedException e) { System.out.println("didn't add edge [" + edgeName + "]"); } } } prevCell = curCell; } //System.out.print(curCell + ", "); prevCell = cellArray[0]; col++; }
Updating GPM to generate comma separated cell names in trajectories
- need to get the previous n cell names
- Need to change the cellName val in FlockingBeliefCA to be a stack of tail length. Done.
- Parsed the strings in SheetToMap. Each cell has a root name (the first) which connects to the roots of the previous cell. The root then links to the subsequent names in the chain of names that are separated by “||”
"cell_[4, 5]||cell_[4, 4]||cell_[4, 3]||cell_[4, 2]||cell_[4, 1]"
- Seems to be working: