Update linear.cpp