/*******************************************************************************
* Copyright 2012 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
package com.analog.lyric.dimple.schedulers;
import com.analog.lyric.dimple.model.core.FactorGraph;
import com.analog.lyric.dimple.schedulers.schedule.ISchedule;
import com.analog.lyric.dimple.schedulers.schedule.RandomWithoutReplacementSchedule;
/**
* @author jeffb
*
* This creates a dynamic schedule, which updates factors in a randomly
* chosen sequence without replacement. Prior to each factor update, the
* corresponding edges of the connected variables are updated. On each
* iteration a new random update sequence is generated.
*
* WARNING: This schedule DOES NOT respect any existing sub-graph
* scheduler associations. That is, if any sub-graph already has an
* associated scheduler, that scheduler is ignored in creating this
* schedule.
*/
public class RandomWithoutReplacementScheduler extends StatelessBPScheduler
{
private static final long serialVersionUID = 1L;
@Override
public ISchedule createSchedule(FactorGraph g)
{
return new RandomWithoutReplacementSchedule(this, g);
}
}