7#include "LineEquation.h" 
   53      std::string msg = 
"Line equation is already defined with 2 points";
 
 
   68      std::string msg = 
"Line equation undefined:  2 points are required";
 
   71    else if(
p_x[0] == 
p_x[1]) {
 
   72      std::string msg = 
"Points have identical independent variables -- no slope";
 
 
   89      std::string msg = 
"Line equation undefined:  2 points are required";
 
   92    else if(
p_x[0] == 
p_x[1]) {
 
   93      std::string msg = 
"Points have identical independent variables -- no intercept";
 
 
@ Io
A type of error that occurred when performing an actual I/O operation.
bool p_interceptDefined
Variable indicating if intercept is defined yet.
double Slope()
Compute the slope of the line.
void AddPoint(double x, double y)
Add a point to the object.
bool p_slopeDefined
Variable indicating if slope is defined yet.
bool p_defined
Variable indicating if line is defined yet.
std::vector< double > p_x
Independent variables.
LineEquation()
Constructors.
double Intercept()
Compute the intercept of the line.
std::vector< double > p_y
Dependent variables.
This is free and unencumbered software released into the public domain.
Namespace for the standard library.