alglib converted to js using pyjs