libpysal.cg.Line(m, b)[source]¶Geometric representation of line objects.
Attributes
| m | (float) slope |
| b | (float) y-intercept |
Methods
x(y) |
Returns the x-value of the line at a particular y-value. |
y(x) |
Returns the y-value of the line at a particular x-value. |
__init__(m, b)[source]¶Returns a Line object.
__init__(number, number) -> Line
Test tag: <tc>#is#Line.__init__</tc> Test tag: <tc>#tests#Line.__init__</tc>
| Parameters: | m : the slope of the line b : the y-intercept of the line |
|---|
Examples
>>> ls = Line(1, 0)
>>> ls.m
1.0
>>> ls.b
0.0
Methods
__init__(m, b) |
Returns a Line object. |
x(y) |
Returns the x-value of the line at a particular y-value. |
y(x) |
Returns the y-value of the line at a particular x-value. |