FixedPointValuePopulator<FxvType extends FixedPointValue> class

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

Constructors

FixedPointValuePopulator.new(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) → FxvType
Constructs FixedPointValue from a Dart double rounding away from zero.
ofFixedPoint(FixedPoint fp) → FxvType
Extracts a FixedPointValue from a FixedPoint's current value.
ofLogicValue(LogicValue val) → FxvType
Construct a FixedPointValue from a LogicValue
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}) bool
Return true if double val to be stored in FixedPointValue with integerWidth and fractionWidth lengths without overflowing.