public int sumCapacities ( Collection < Node > ids , boolean undef ) { int s = 0 ; for ( Node u : ids ) { if ( capacityDefined ( u ) || undef ) { s += nodesCapacity . get ( u ) ; } } return s ; }
Get the cumulative nodes capacity .