Solving problem using linear algebra functionality provided by dlibc++