//-------------------------------------------------------------------------------------- //Вектор синусов значений private RealVector GetSinVector(double[] values) { double[] sinValues = ArrayOperator.ComputeFunction(values, Math.Sin); RealVector sinVector = new RealVector(sinValues); return(sinVector); }
//-------------------------------------------------------------------------------------- //Вектор косинусов значений private RealVector GetCosVector(double[] values) { double[] cosValues = ArrayOperator.ComputeFunction(values, Math.Cos); RealVector cosVector = new RealVector(cosValues); return(cosVector); }
//--------------------------------------------------------------------------------------------- //Случайные фазовые сдвиги private double[] GetRandomPhaseShifts(int count) { double[] phaseShifts = ArrayCreator.CreateRandomArray(count); ComputationalFunction function = new ComputationalFunction(delegate(double x) { return(x * 2 * Math.PI); }); phaseShifts = ArrayOperator.ComputeFunction(phaseShifts, function); phaseShifts = new double[] { 0, 2 * Math.PI / 3, 4 * Math.PI / 3 }; return(phaseShifts); }