Example #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="nSamples"></param>
 /// <param name="s"></param>
 public CoefficientSpectrum(int nSamples, CoefficientSpectrum s)
     : this(nSamples)
 {
     this.c = new double[nSamples];
     s.c.CopyTo (c, 0);
 }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="s"></param>
 /// <param name="f"></param>
 /// <returns></returns>
 public static CoefficientSpectrum operator *(CoefficientSpectrum s, double f)
 {
     var result = new CoefficientSpectrum (s.nSamples);
     for (var i = 0; i < s.nSamples; ++i)
         result.c[i] = s.c[i] * f;
     return s;
 }
Example #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="s1"></param>
 /// <param name="s2"></param>
 /// <returns></returns>
 public static CoefficientSpectrum operator +(CoefficientSpectrum s1, CoefficientSpectrum s2)
 {
     var ret = new CoefficientSpectrum(s1.nSamples);
     for (var i = 0; i < s1.nSamples; ++i)
         ret.c[i] = s1.c[i] + s2.c[i];
     return ret;
 }