# QuantLib_OneFactorAffineModel man page

OneFactorAffineModel — Single-factor affine base class.

## Synopsis

`#include <ql/models/shortrate/onefactormodel.hpp>`

Inherits **OneFactorModel**, and **AffineModel**.

Inherited by **CoxIngersollRoss**, **GeneralizedHullWhite**, and **Vasicek**.

### Public Member Functions

OneFactorAffineModel(SizenArguments)

virtualReal discountBond(Timenow,Timematurity,Arrayfactors) constReal discountBond(Timenow,Timematurity,Raterate) constDiscountFactor discount(Timet) const

Implied discount curve.

### Protected Member Functions

virtualReal A(Timet,TimeT) const =0

virtualReal B(Timet,TimeT) const =0

### Additional Inherited Members

## Detailed Description

Single-factor affine base class.

Single-factor models with an analytical formula for discount bonds should inherit from this class. They must then implement the functions $ A(t,T) $ and $ B(t,T) $ such that [ P(t, T, r_t) = A(t,T)e^{ -B(t,T) r_t}. ]

## Author

Generated automatically by Doxygen for QuantLib from the source code.

## Referenced By

OneFactorAffineModel(3) is an alias of QuantLib_OneFactorAffineModel(3).