public void Add(SpectrumBand <T> band) { bands.Add(band); bounds.GetOrCreateValue(band.GetStart(), v => new SpectrumBound <T>(v)).AddBandStart(band); bounds.GetOrCreateValue(band.GetEnd(), v => new SpectrumBound <T>(v)).AddBandEnd(band); is_ready = false; }
public void Remove(SpectrumBand <T> band) { if (bands.Remove(band)) { int start = bounds.IndexOfKey(band.GetStart()); if (bounds.IsIndexValid(start)) { bounds.Values[start].RemoveBandStart(band); } int end = bounds.IndexOfKey(band.GetEnd()); if (bounds.IsIndexValid(end)) { bounds.Values[end].RemoveBandEnd(band); } is_ready = false; } }
public void RemoveBandEnd(SpectrumBand <T> to_remove) { ending_bands.Remove(to_remove); }
public void RemoveBandStart(SpectrumBand <T> to_remove) { starting_bands.Remove(to_remove); }
public void AddBandEnd(SpectrumBand <T> to_add) { ending_bands.Add(to_add); }
public void AddBandStart(SpectrumBand <T> to_add) { starting_bands.Add(to_add); }