Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "array/promotion-rules/docs/types/index.d"

Index

Interfaces

Type aliases

Functions

Type aliases

PromotionRule

PromotionRule: DataType | number

Promotion rule.

Functions

Export assignment promotionRules

  • Returns the array data type with the smallest size and closest "kind" to which array data types can be safely cast.

    Parameters

    Returns PromotionRule

    promotion rule

    Example

    var dt = promotionRules( 'float32', 'uint32' );
    // returns 'float64'

    Example

    var dt = promotionRules( 'float32', 'foo' );
    // returns null
  • Returns the array data type with the smallest size and closest "kind" to which array data types can be safely cast.

    Parameters

    • dtype1: string

      array data type

    • dtype2: string

      array data type

    Returns null

    promotion rule

    Example

    var dt = promotionRules( 'float32', 'foo' );
    // returns null

    Example

    var dt = promotionRules( 'bar', 'float32' );
    // returns null

    Example

    var dt = promotionRules( 'bar', 'foo' );
    // returns null
  • Returns a type promotion table displaying array data types with the smallest size and closest "kind" to which array data types can be safely cast.

    Returns Table

    promotion rule table

    Example

    var table = promotionRules();
    // returns {...}