MASON-INTEREST-L Archives

January 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

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

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

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 4 Jan 2016 13:59:33 -0500
MIME-version:
1.0 (Mac OS X Mail 7.3 \(1878.6\))
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=windows-1252
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Message-ID:
Content-transfer-encoding:
7bit
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