Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class DefaultScientificValueSerializer<Quantity : PhysicalQuantity, Unit : AbstractScientificUnit<Quantity>>(quantitySerializer: KSerializer<Quantity>, unitSerializer: KSerializer<Unit>) : KSerializer<DefaultScientificValue<Quantity, Unit>>

The DefaultScientificValue used to be a data class of "value" and "unit", instead of "decimalValue" and "unit". This custom serializer is backwards compatible with the old serializer.

Link copied to clipboard
@Serializable
sealed class PhysicalQuantity : Serializable

A physical property of a material or system that can be quantified by measurement

Link copied to clipboard
Link copied to clipboard
@Serializable
sealed class UndefinedQuantityType

Functions

Link copied to clipboard
Link copied to clipboard

Combines this ScientificArray and right into a DefaultScientificArray using a transformation method

Combines this ScientificArray and right into a TargetArray using a transformation method

Link copied to clipboard

Creates a DefaultScientificArray containing all values of this ScientificArray and right This will convert the values right into Unit

Creates a DefaultScientificArray containing all values of this ScientificArray and right This will convert the values of both this ScientificArray and right into TargetUnit

Creates a TargetArray containing all values of this ScientificArray and right This will convert the values right into Unit

Creates a TargetArray containing all values of this ScientificArray and right This will convert the values of both this ScientificArray and right into TargetUnit

Link copied to clipboard

Creates a DefaultScientificArray that contains all values of a ScientificArray converted to TargetUnit


Creates a TargetArray that contains all values of a ScientificArray converted to TargetUnit

Converts a ScientificValue into another ScientificValue with a ScientificUnit of the same PhysicalQuantity

Link copied to clipboard

Creates a DefaultScientificValue equal to a ScientificValue.value divided from this Decimal

Creates a DefaultScientificValue equal to the ScientificValue.value divided by value

Divides the ScientificValue.value of two ScientificValue into a DefaultScientificValue with LeftUnit as its unit

Creates a DefaultScientificValue equal to a ScientificValue.value divided from this Number

Creates a Value equal to a ScientificValue.value divided from this Decimal

Creates a Value equal to the ScientificValue.value divided by value

Divides the ScientificValue.value of two ScientificValue into a Value with TargetUnit as its unit

Link copied to clipboard

Creates a DefaultScientificValue of this Decimal using a given AbstractScientificUnit

Creates a DefaultScientificValue of this number using a given AbstractScientificUnit

@JvmName(name = "scientificArrayFromListOfDecimalDefault")
operator fun <Quantity : PhysicalQuantity, Unit : AbstractScientificUnit<Quantity>> List<Decimal>.invoke(unit: Unit): DefaultScientificArray<Quantity, Unit>

Creates a DefaultScientificArray containing this list of Decimal using a given AbstractScientificUnit

@JvmName(name = "scientificArrayFromListOfNumberDefault")
operator fun <Quantity : PhysicalQuantity, Unit : AbstractScientificUnit<Quantity>> List<Number>.invoke(unit: Unit): DefaultScientificArray<Quantity, Unit>

Creates a DefaultScientificArray containing this list using a given AbstractScientificUnit

Creates a Value of this Decimal using a given unit

Creates a Value of this number using a given unit

@JvmName(name = "scientificArrayFromListOfDecimal")
operator fun <Quantity : PhysicalQuantity, Unit : ScientificUnit<Quantity>, NumberType : Number, Array : ScientificArray<NumberType, Quantity, Unit>> List<Decimal>.invoke(unit: Unit, factory: (List<Decimal>, Unit) -> Array): Array

Creates an Array containing this list of Decimal using a given unit

@JvmName(name = "scientificArrayFromListOfNumber")
operator fun <Quantity : PhysicalQuantity, Unit : ScientificUnit<Quantity>, NumberType : Number, Array : ScientificArray<NumberType, Quantity, Unit>> List<Number>.invoke(unit: Unit, factory: (List<Decimal>, Unit) -> Array): Array

Creates an Array containing this list using a given unit

Link copied to clipboard

Maps all the values of a ScientificArray into a DefaultScientificArray using a transformation method

Maps all the values of a ScientificArray into a TargetArray using a transformation method

Link copied to clipboard

Creates a DefaultScientificValue equal to a ScientificValue.value decreased from this Decimal

Creates a DefaultScientificValue equal to the ScientificValue.value decreased by value

Subtracts the ScientificValue.value of two ScientificValue into a DefaultScientificValue with LeftUnit as its unit

Creates a DefaultScientificValue equal to a ScientificValue.value decreased from this Number

Creates a Value equal to a ScientificValue.value decreased from this Decimal

Creates a Value equal to the ScientificValue.value decreased by value

Subtracts the ScientificValue.value of two ScientificValue into a Value with TargetUnit as its unit

Link copied to clipboard

Creates a DefaultScientificValue equal to a ScientificValue.value increased by this Decimal

Creates a DefaultScientificArray in Unit containing all values of this ScientificArray and right

Creates a DefaultScientificValue equal to the ScientificValue.value increased by value

Creates a DefaultScientificArray in Unit by adding a ScientificArray to this ScientificValue This will convert the values right into Unit

Creates a DefaultScientificValue equal to a ScientificValue.value increased by this Number

Creates a Value equal to a ScientificValue.value increased by this Decimal

Creates a Value equal to the ScientificValue.value increased by value

Adds the ScientificValue.value of two ScientificValue into a Value with TargetUnit as its unit

Link copied to clipboard

Splits a ScientificArray into a list of DefaultScientificValue of all the values in the array

Splits a ScientificArray into a list of DefaultScientificValue in TargetUnit of all the values in the array

Splits a ScientificArray into a list of TargetValue of all the values in the array

Splits a ScientificValue of ValueUnit into a DefaultScientificValue of ValueUnit and DefaultScientificValue of RightUnit so that left and right together are equal to the original value. Splitting happens by rounding the ValueUnit down to scale and returning it and the remainder converted to RightUnit.

Splits a ScientificValue of ValueUnit into a DefaultScientificValue of LeftUnit and DefaultScientificValue of RightUnit so that left and right together are equal to the original value. Splitting happens by converting the ValueUnit to LeftUnit and then rounding down to scale and returning it and the remainder converted to RightUnit.

Splits a ScientificValue of ValueUnit into a LeftValue and RightValue so that left and right together are equal to the original value. Splitting happens by rounding the ValueUnit down to scale and returning it and the remainder converted to RightUnit.

Splits a ScientificValue of ValueUnit into a LeftValue and RightValue so that left and right together are equal to the original value. Splitting happens by converting the ValueUnit to LeftUnit and then rounding down to scale and returning it and the remainder converted to RightUnit.

Link copied to clipboard

Creates a DefaultScientificValue equal to a ScientificValue.value multiplied by this Decimal

Creates a DefaultScientificValue equal to the ScientificValue.value multiplied by value

Multiplies the ScientificValue.value of two ScientificValue into a DefaultScientificValue with LeftUnit as its unit

Creates a DefaultScientificValue equal to a ScientificValue.value multiplied by this Number

Creates a Value equal to a ScientificValue.value multiplied by this Decimal

Creates a Value equal to the ScientificValue.value multiplied by value

Multiplies the ScientificValue.value of two ScientificValue into a Value with TargetUnit as its unit

Link copied to clipboard

Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale.

Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree.

Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree, UnitFour and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree and so on.

Breaks up a ScientificValue of Quantity into its components in UnitOne, UnitTwo, UnitThree, UnitFour, UnitFive and executes the given action with these components. A value is broken up into its components by converting the value to to UnitOne and splitting into UnitTwo using scale, then splitting the remainder into UnitThree and so on.