American-transaction costs 1.0.0.0 American option pricer under proportional transaction costs

- Main Page
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

Classes | Functions
line.h File Reference
`#include <ostream>`
`#include "../numbers.h"`

Go to the source code of this file.

## Classes
class | Line
| Straight line in two dimensions. More...
## Functions
coefficient | crossing (const Line &line1, const Line &line2)
std::ostream & | operator<< (std::ostream &output, const Line &line)
int | parallel (const Line &line1, const Line &line2)

## Detailed Description

Line and associated utility functions.

## Function Documentation

coefficient crossing | ( | const Line & | line1,
|  | const Line & | line2
| ) |  | `[inline]`

Finds crossing point of two lines. Returns NAN if the lines are parallel.

std::ostream& operator<< | ( | std::ostream & | output,
|  | const Line & | line
| ) |  | `[inline]`

Prints line in format line.slope()*x + line.intercept()

int parallel | ( | const Line & | line1,
|  | const Line & | line2
| ) |  | `[inline]`

Tests if line1 and line2 are parallel. Fudges it a little bit to help with numerics.

All Classes Namespaces Files Functions Variables Typedefs Defines