Пример #1
0
            private void Prepare(int length)
            {
                m_length   = length;
                m_bitcount = (int)System.Math.Floor(System.Math.Log(length) / System.Math.Log(2) + 0.5);
                m_brlookup = new BitReversedLUT(m_bitcount);
                m_tlookup  = new TrigonometricLUT(m_bitcount);

                if ((1L << m_bitcount) != length)
                {
                    throw new Exception("Invalid length - must be power of 2");
                }

                // allocate our buffer
                m_data = new double[length];
            }
Пример #2
0
			private void Prepare(int length)
			{
				m_length = length;
				m_bitcount = (int)System.Math.Floor(System.Math.Log(length) / System.Math.Log(2) + 0.5);
				m_brlookup = new BitReversedLUT(m_bitcount);
				m_tlookup = new TrigonometricLUT(m_bitcount);

				if((1L << m_bitcount) != length)
				{
					throw new Exception("Invalid length - must be power of 2");
				}

				// allocate our buffer
				m_data = new double[length];
			}