Added check_linearity().
Added check_linearity().