MASON-INTEREST-L Archives

January 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 4 Jan 2016 13:59:33 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (20 lines)
On Jan 4, 2016, at 1:50 PM, Axel Kowald <[log in to unmask]> wrote:

> But playing with the code I think I spotted a bug in the Sequence class.
> The Sequence contructor for Collection does not set "size". Thus if I
> create my ParallelSequence with a Collection, size is zero, leading to a
> division by zero exception.

Looks like a bug to me.  Try this:

    public Sequence(Collection collection)
        {
        steps = (Steppable[])(collection.toArray(
			new Steppable[collection.size()]));
        size = steps.length;
        }

I'll commit that.

Sean

ATOM RSS1 RSS2