CalendarYearRateChanges

vecxt_re.CalendarYearRateChanges
See theCalendarYearRateChanges companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(currentYear: Int, years: Array[Int], factors: Array[Double]): CalendarYearRateChanges

Create a CalendarYearRateChanges with years already in contiguous descending order starting at currentYear. The input arrays are copied.

Create a CalendarYearRateChanges with years already in contiguous descending order starting at currentYear. The input arrays are copied.

Attributes

def apply(years: Array[Int], factors: Array[Double]): CalendarYearRateChanges

Create a CalendarYearRateChanges from arrays of years and their corresponding change factors. Years may be provided in any order, but must be contiguous (no gaps) and unique. The current year is set to the most recent year.

Create a CalendarYearRateChanges from arrays of years and their corresponding change factors. Years may be provided in any order, but must be contiguous (no gaps) and unique. The current year is set to the most recent year.

Value parameters

factors

Array of change factors for each year

years

Array of calendar years

Attributes

Returns

CalendarYearRateChanges with the current year set to the most recent year

def constant(fromYear: Int, toYear: Int, factor: Double): CalendarYearRateChanges

Create a CalendarYearRateChanges from a range of years with a constant rate change.

Create a CalendarYearRateChanges from a range of years with a constant rate change.

Value parameters

factor

The constant factor for each year (e.g., 1.05 for 5% per year)

fromYear

The earliest year (inclusive)

toYear

The current/latest year (inclusive)

Attributes

Returns

CalendarYearRateChanges spanning the specified years

def fromRateChanges(years: Array[Int], rateChanges: Array[Double]): CalendarYearRateChanges

Create a CalendarYearRateChanges from arrays of years and rate changes (as percentages). Years may be provided in any order, but must be contiguous and unique.

Create a CalendarYearRateChanges from arrays of years and rate changes (as percentages). Years may be provided in any order, but must be contiguous and unique.

Value parameters

rateChanges

Array of percentage changes for each year (e.g., 5.0 for 5%)

years

Array of calendar years

Attributes

Returns

CalendarYearRateChanges with rate changes converted to factors