FixedPointValuePopulator<FxvType extends FixedPointValue> class

A populator for FixedPointValues, a utility that can populate various forms of FixedPointValues.

Constructors

FixedPointValuePopulator(FxvType _unpopulated)
Creates a FixedPointValuePopulator for the given _unpopulated FixedPointValue.

Properties

fractionWidth → int
The width of the mantissa field.
no setter
hashCode → int
The hash code for this object.
no setterinherited
integerWidth → int
The width of the exponent field.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signed → bool
Return whether the FixedPointValue is signed.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ofDouble(double val, {FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.truncate}) → FxvType
Constructs a FixedPointValue from a Dart double.
ofFixedPoint(FixedPoint fp) → FxvType
Extracts a FixedPointValue from a FixedPoint's current value.
ofFloatingPointValue(FloatingPointValue fpv, {FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.truncate}) → FxvType
Converts fpv directly into this fixed-point format.
ofLogicValue(LogicValue val) → FxvType
Construct a FixedPointValue from a LogicValue
ofScaledBigInt(BigInt significand, int exponent, {FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.truncate}) → FxvType
Constructs a value equal to significand times two to exponent.
populate({required LogicValue integer, required LogicValue fraction}) → FxvType
Populates the FixedPointValue with the given integer and fraction, then performs additional validation.
random(Random rv, {bool subNormal = false, bool genNormal = true, bool genSubNormal = true, FxvType? gt, FxvType? lt, FxvType? gte, FxvType? lte}) → FxvType
Generate a random FixedPointValue, using random seed rv.
toString() → String
A string representation of this object.
override
widen(FxvType fxv) → FxvType
Constructs a FixedPointValue from another FixedPointValue with by widening the integer and/or fraction widths.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

canStore(double val, {required bool signed, required int integerWidth, required int fractionWidth, FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.truncate}) → bool
Return true if double val to be stored in FixedPointValue with integerWidth and fractionWidth lengths without overflowing.