using System;
using System.Collections.Generic;
using System.Text;
using DataPerformer;
using DataPerformer.Interfaces;
namespace Regression
{
/// <summary>
/// Selection of array collections
/// </summary>
public class ArraySelectionCollection : IStructuredSelectionCollection, IMeasurements
{
#region Fields
private ArraySelection[] selections;
#endregion
#region Constructors
protected ArraySelectionCollection()
{
}
#endregion
#region IStructuredSelectionCollection Members
int IStructuredSelectionCollection.Count
{
get
{
return selections.Length;
}
}
IStructuredSelection IStructuredSelectionCollection.this[int i]
{
get
{
return selections[i];
}
}
#endregion
#region IMeasurements Members
int IMeasurements.Count
{
get
{
return selections.Length;
}
}
IMeasure IMeasurements.this[int n]
{
get
{
return selections[n];
}
}
public void UpdateMeasurements()
{
}
public string SourceName
{
get
{
return "";
}
}
public bool IsUpdated
{
get
{
return true;
}
set
{
}
}
#endregion
#region Specific Members
protected void Set(string[] names, double[][] data)
{
if (names.Length != data.Length)
{
throw new Exception("Names length does not coincides with data length");
}
selections = new ArraySelection[names.Length];
for (int i = 0; i < selections.Length; i++)
{
selections[i] = new ArraySelection(names[i], data[i]);
}
}
#endregion
}
}