Hey Russell,

I just took a look at the MASON code and I think I know what's happening. First, note the following from Edge.java:

    // to prevent edges from breaking fields by being stored in two different fields.
    // if null, then no owner -- the Edge is free to be added to a field.
    Network owner;

Then, in Network.addEdge(final Edge edge):

        if (edge.owner!=null)
            throw new RuntimeException("Attempted to add an Edge already added elsewhere");

When you created the network the first time, each of your edge's had their owner variable set. You can't really reuse edges like that, but I think you can use the copy constructor like so:

consumerSocialNetwork.addEdge(new Edge(e[i][j]));

Good luck,
Joey

On Tue, Jul 17, 2012 at 3:02 PM, Joey Harrison <[log in to unmask]> wrote:
Hey Russell,

I just took a look at the MASON code and I think I know what's happening. First, note the following from Edge.java:

    // to prevent edges from breaking fields by being stored in two different fields.
    // if null, then no owner -- the Edge is free to be added to a field.
    Network owner;

Then, in Network.addEdge(final Edge edge):

        if (edge.owner!=null)
            throw new RuntimeException("Attempted to add an Edge already added elsewhere");

When you created the network the first time, each of your edge's had their owner variable set. You can't really reuse edges like that, but I think you can use the copy constructor like so:

consumerSocialNetwork.addEdge(new Edge(e[i][j]));

Good luck,
Joey