function [ AlgorithmParams, ModelParams, Diagnostics ] = evolveparticles( AlgorithmParams, ModelParams, PriorParams, ModelSpec, DataSpec, AlgorithmSpec, SpikeTrainData, PositionData )



    if ~isfield(ModelSpec, 'modelIndicator'),
        error('modelIndicator must be a field of ModelSpec!')
    end
    if ModelSpec.modelIndicator == 1,
        [ AlgorithmParams, ModelParams, Diagnostics ] = evolveparticlesdiscretetime( AlgorithmParams, ModelParams, PriorParams, ModelSpec, DataSpec, AlgorithmSpec, SpikeTrainData, PositionData );
    elseif ModelSpec.modelIndicator == 2,
        [ AlgorithmParams, ModelParams, Diagnostics ] = evolveparticlesctstime( AlgorithmParams, ModelParams, PriorParams, ModelSpec, DataSpec, AlgorithmSpec, SpikeTrainData, PositionData );
    end

end