Filter splitterOut = new Identity (bodyOutput.GetType ()); splitterOut.SetupOperator (); splitter.Add (splitterOut);
Channel channelOut = null; if (splitter.IsOutputUsed (0)) { Filter splitterOut = new Identity (bodyOutput.GetType ()); splitterOut.SetupOperator (); splitter.Add (splitterOut); channelOut = splitterOut.GetIOField ("output"); } else { splitter.Add (null); }
    public void ConnectGraph ()    {        // make sure that I have the minimal elements to construct this loop        ASSERT (joiner);        ASSERT (splitter);        ASSERT (body);        // okay, initialize the body and figure out the type of data        // passed around this loop        body.SetupOperator();        Channel bodyInput = body.GetIOField ("input");        Channel bodyOutput = body.GetIOField ("output");        ASSERT (bodyOutput.GetType ().getName ().equals (bodyInput.GetType ().getName ()));        // if I don't have a feedback path, just give myself an identity body        // and initialize whatever the feedback path is        if (loop == null) loop = new Identity (bodyOutput.GetType ());        loop.SetupOperator ();        // create some extra Identities and give them to the split        // and the join so they have a Filter for every input/output        // they have to deal with        {            // the joiner:            Filter joinerIn = new Identity (bodyInput.GetType ());            joinerIn.SetupOperator ();            joiner.Add (joinerIn);            joiner.Add (loop);            joiner.SetupOperator ();            {                ChannelConnectFilter connect = new ChannelConnectFilter ();                Channel in = joiner.GetIOField ("output", 0);                Channel out = body.GetIOField ("input");                connect.UseChannels (in, out);            }            // the splitter:            Filter splitterOut = new Identity (bodyOutput.GetType ());            splitterOut.SetupOperator ();            splitter.Add (splitterOut);            splitter.Add (loop);            splitter.SetupOperator ();            {                ChannelConnectFilter connect = new ChannelConnectFilter ();                Channel in = body.GetIOField ("output");                Channel out = splitter.GetIOField ("input", 0);                connect.UseChannels (in, out);            }            // copy the input/output from the identities to the input/output            // fields of the feedback loop            input = joinerIn.GetIOField ("input");            output = splitterOut.GetIOField("output");        }        // now fill up the feedback path with precomputed data:        {            Channel feedbackChannel = loop.GetIOField ("output");            for (int index = 0; index < delay; index++)            {                InitPath (index, feedbackChannel);            }        }    }