Esempio n. 1
0
        public void Add(T item, float weight)
        {
            float left_spectrum_value  = total_weight;
            float right_spectrum_value = left_spectrum_value + weight;

            spectrum.Add(new SpectrumBand <T>(item, left_spectrum_value, right_spectrum_value));
            total_weight = right_spectrum_value;
        }
Esempio n. 2
0
 static public void Add <T>(this Spectrum <T> item, IEnumerable <SpectrumBand <T> > to_add)
 {
     to_add.Process(b => item.Add(b));
 }
Esempio n. 3
0
 static public void Add <T>(this Spectrum <T> item, params SpectrumBand <T>[] to_add)
 {
     item.Add((IEnumerable <SpectrumBand <T> >)to_add);
 }