#ifndef _CASHFLOW_IRR_HPP_ #define _CASHFLOW_IRR_HPP_ #ifndef _COMMON_ARRAY_HPP_ #include #endif #ifndef _COMMON_MATH_HPP_ #include #endif class IRR { public: static double irr(Array &cashflows); static double npv(Array &cashflows,double rate); static double pv(Array &cashflows,double rate); static double pvD(Array &cashflows,double rate); private: static double IRR_ERROR; static double IRR_ACCURACY; static int IRR_MAX_ITERATIONS; }; #endif