using System;
using System.Collections;
using System.Collections.Generic;
namespace BotSharp.Algorithm.Bayesian
{
///
/// Class EmptyDataSet. This class cannot be inherited.
///
internal sealed class EmptyDataSet : IDataSet
{
///
/// Returns an enumerator that iterates through the collection.
///
/// A that can be used to iterate through the collection.
public IEnumerator GetEnumerator()
{
yield break;
}
///
/// Returns an enumerator that iterates through a collection.
///
/// An object that can be used to iterate through the collection.
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
///
/// Gets the token count.
///
/// The token count.
public long TokenCount { get { return 0; } }
///
/// Gets the size of the set.
///
/// The size of the set.
public long SetSize { get { return 0; } }
///
/// Gets the class.
///
/// The class.
public IClass Class { get; private set; }
///
/// Gets the with the specified token.
///
/// The token.
/// Additive smoothing parameter. If set to zero, no Laplace smoothing will be applied.
/// TokenInformation<IToken>.
public TokenInformation this[IToken token, double alpha = 0D]
{
get { return new TokenInformation(token, 0L, 0D); }
}
///
/// Initializes a new instance of the class.
///
/// The class.
/// class
public EmptyDataSet(IClass @class)
{
if (ReferenceEquals(null, @class)) throw new ArgumentNullException("class");
Class = @class;
}
///
/// Gets the count.
///
/// The token.
/// System.Int64.
public long GetCount(IToken token)
{
return 0L;
}
///
/// Gets the percentage.
///
/// The token.
/// The alpha.
/// System.Double.
///
public double GetPercentage(IToken token, double alpha = 0)
{
return 0D;
}
///
/// Adds the token.
///
/// The token.
/// The additional tokens.
/// Adding data to the empty data set is not allowed.
public void AddToken(IToken token, params IToken[] additionalTokens)
{
throw new InvalidOperationException("Adding data to the empty data set is not allowed.");
}
///
/// Adds the token.
///
/// The tokens.
/// Adding data to the empty data set is not allowed.
public void AddToken(IEnumerable tokens)
{
throw new InvalidOperationException("Adding data to the empty data set is not allowed.");
}
///
/// Removes the token once.
///
/// The token.
/// The additional tokens.
public void RemoveTokenOnce(IToken token, params IToken[] additionalTokens)
{
}
///
/// Removes the token once.
///
/// The tokens.
public void RemoveTokenOnce(IEnumerable tokens)
{
}
///
/// Purges the token.
///
/// The token.
/// The additional tokens.
public void PurgeToken(IToken token, params IToken[] additionalTokens)
{
}
///
/// Purges the token.
///
/// The tokens.
public void PurgeToken(IEnumerable tokens)
{
}
}
}