Node and edge weights

By default, the graph partitioning algorithm used in Graphcode weights each node and link equally. However, it is possible to perform load balancing by specifying a computational weight function on each node, and a communication weight function for each edge. For example:

class foo: public object
  virtual idxtype weight() {return size()*size();}
  vitural idxtype edgeweight(const objref& x) {return (*x)->size();}