add nodes with double[] or int[] weights
adds edges with double[] or int[] weights
Bugfix: empty graph won't throw ArithmeticException anymore