public void minInPlace(GraphCommunity b) { double x = Math.min(this.getCoords().getFirst(), b.getCoords().getFirst()); double y = Math.min(this.getCoords().getSecond(), b.getCoords().getSecond()); double px = Math.min(this.getParentCoords().getFirst(), b.getParentCoords().getFirst()); double py = Math.min(this.getParentCoords().getSecond(), b.getParentCoords().getSecond()); _hierLevel = Math.min(this.getHierLevel(), b.getHierLevel()); _id = Math.min(this.getID(), b.getID()); _coords = new Pair<Double, Double>(x,y); _radius = Math.min(this.getRadius(), b.getRadius()); _degree = Math.min(this.getDegree(), b.getDegree()); _numNodes = Math.min(this.getNumNodes(), b.getNumNodes()); _metadata = ""; _bIsPrimaryNode = false; _parentID = Math.min(this.getParentID(), b.getParentID()); _parentCoords = new Pair<Double, Double>(px,py); _parentRadius = Math.min(this.getParentRadius(), b.getParentRadius()); _communityStats = minOfStatsList(this.getStatsList().get(0), b.getStatsList()); _interEdges = minOfEdgeLists(this.getInterEdges().get(0), b.getInterEdges()); _intraEdges = minOfEdgeLists(this.getIntraEdges().get(0), b.getIntraEdges()); }
public void maxInPlace(GraphCommunity b) { double x = Math.max(this.getCoords().getFirst(), b.getCoords().getFirst()); double y = Math.max(this.getCoords().getSecond(), b.getCoords().getSecond()); double px = Math.max(this.getParentCoords().getFirst(), b.getParentCoords().getFirst()); double py = Math.max(this.getParentCoords().getSecond(), b.getParentCoords().getSecond()); _hierLevel = Math.max(this.getHierLevel(), b.getHierLevel()); _id = Math.max(this.getID(), b.getID()); _coords = new Pair<Double, Double>(x,y); _radius = Math.max(this.getRadius(), b.getRadius()); _degree = Math.max(this.getDegree(), b.getDegree()); _numNodes = Math.max(this.getNumNodes(), b.getNumNodes()); _metadata = ""; _bIsPrimaryNode = false; _parentID = Math.max(this.getParentID(), b.getParentID()); _parentCoords = new Pair<Double, Double>(px,py); _parentRadius = Math.max(this.getParentRadius(), b.getParentRadius()); _communityStats = maxOfStatsList(this.getStatsList().get(0), b.getStatsList()); _interEdges = maxOfEdgeLists(this.getInterEdges().get(0), b.getInterEdges()); _intraEdges = maxOfEdgeLists(this.getIntraEdges().get(0), b.getIntraEdges()); }
elt.put("x", rawElt.getCoords().getFirst()); elt.put("y", rawElt.getCoords().getSecond()); elt.put("r", rawElt.getRadius()); elt.put("degree", rawElt.getDegree()); elt.put("numNodes", rawElt.getNumNodes());
+ "\"id\": " + node.getID() + ", " + "\"coords\": [" + node.getCoords().getFirst() + ", " + node.getCoords().getSecond() + "], " + "\"radius\": " + node.getRadius() + ", " + "\"degree\": " + node.getDegree() + ", " + "\"numNodes\": " + node.getNumNodes() + ", "