DiffSharp


Util Module

Namespace: DiffSharp

Assembly: DiffSharp.Core.dll


Types and nested modules

Type/Module Description
GlobalNestingLevel
NestingLevel
Random
Shape (Type)
Array
Shape (Module)

Functions and values

Function or value Description
allEqual items
Full Usage:
allEqual items Parameter Types:
  • items : seq<'a>

Return Type: bool
Signature: items: seq<'a> -> bool
Parameter Types:
  • items : seq<'a>
Return Type: bool
array3D data
Full Usage:
array3D data Parameter Types:
  • data : seq<'a>

Return Type: 'c [,,]
Signature: data: seq<'a> -> 'c [,,]

Create a non-jagged 3D array from jagged data


Parameter Types:
  • data : seq<'a>
Return Type: 'c [,,]
array4D data
Full Usage:
array4D data Parameter Types:
  • data : seq<'a>

Return Type: 'd [,,,]
Signature: data: seq<'a> -> 'd [,,,]

Create a non-jagged 4D array from jagged data


Parameter Types:
  • data : seq<'a>
Return Type: 'd [,,,]
arrayND shape f
Full Usage:
arrayND shape f Parameter Types:
  • shape : Shape
  • f : int [] -> 'e

Return Type: obj
Signature: shape: Shape -> f: (int [] -> 'e) -> obj
Parameter Types:
  • shape : Shape
  • f : int [] -> 'e
Return Type: obj
boundsToLocation bounds
Full Usage:
boundsToLocation bounds Parameter Types:
  • bounds : int [,]

Return Type: int []
Signature: bounds: int [,] -> int []
Parameter Types:
  • bounds : int [,]
Return Type: int []
boundsToShape bounds
Full Usage:
boundsToShape bounds Parameter Types:
  • bounds : int [,]

Return Type: int []
Signature: bounds: int [,] -> int []
Parameter Types:
  • bounds : int [,]
Return Type: int []
checkValidIndex shape index
Full Usage:
checkValidIndex shape index Parameter Types:
  • shape : Shape
  • index : int []

Signature: shape: Shape -> index: int [] -> unit
Parameter Types:
  • shape : Shape
  • index : int []
copyKeys dictionary
Full Usage:
copyKeys dictionary Parameter Types:
  • dictionary : Dictionary<'a, 'b>

Return Type: 'a []
Signature: dictionary: Dictionary<'a, 'b> -> 'a []
Parameter Types:
  • dictionary : Dictionary<'a, 'b>
Return Type: 'a []
copyValues dictionary
Full Usage:
copyValues dictionary Parameter Types:
  • dictionary : Dictionary<'a, 'b>

Return Type: 'b []
Signature: dictionary: Dictionary<'a, 'b> -> 'b []
Parameter Types:
  • dictionary : Dictionary<'a, 'b>
Return Type: 'b []
cumulativeSum a
Full Usage:
cumulativeSum a Parameter Types:
  • a : ^a []

Return Type: ^b []
Signature: a: ^a [] -> ^b []
Parameter Types:
  • a : ^a []
Return Type: ^b []
dataOfValues ofFloat32 ofFloat64 ofInt8 ofInt16 ofInt32 ofInt64 ofBool ofByte value
Full Usage:
dataOfValues ofFloat32 ofFloat64 ofInt8 ofInt16 ofInt32 ofInt64 ofBool ofByte value Parameter Types:
  • ofFloat32 : float32 -> ^T
  • ofFloat64 : double -> ^T
  • ofInt8 : int8 -> ^T
  • ofInt16 : int16 -> ^T
  • ofInt32 : int32 -> ^T
  • ofInt64 : int64 -> ^T
  • ofBool : bool -> ^T
  • ofByte : byte -> ^T
  • value : obj

Return Type: ^T [] * int []
Signature: ofFloat32: (float32 -> ^T) -> ofFloat64: (double -> ^T) -> ofInt8: (int8 -> ^T) -> ofInt16: (int16 -> ^T) -> ofInt32: (int32 -> ^T) -> ofInt64: (int64 -> ^T) -> ofBool: (bool -> ^T) -> ofByte: (byte -> ^T) -> value: obj -> ^T [] * int []
Parameter Types:
  • ofFloat32 : float32 -> ^T
  • ofFloat64 : double -> ^T
  • ofInt8 : int8 -> ^T
  • ofInt16 : int16 -> ^T
  • ofInt32 : int32 -> ^T
  • ofInt64 : int64 -> ^T
  • ofBool : bool -> ^T
  • ofByte : byte -> ^T
  • value : obj
Return Type: ^T [] * int []
dataOfValuesForBool value
Full Usage:
dataOfValuesForBool value Parameter Types:
  • value : obj

Return Type: bool [] * int []
Signature: value: obj -> bool [] * int []
Parameter Types:
  • value : obj
Return Type: bool [] * int []
dataOfValuesForByte value
Full Usage:
dataOfValuesForByte value Parameter Types:
  • value : obj

Return Type: byte [] * int []
Signature: value: obj -> byte [] * int []
Parameter Types:
  • value : obj
Return Type: byte [] * int []
dataOfValuesForFloat32 value
Full Usage:
dataOfValuesForFloat32 value Parameter Types:
  • value : obj

Return Type: float32 [] * int []
Signature: value: obj -> float32 [] * int []
Parameter Types:
  • value : obj
Return Type: float32 [] * int []
dataOfValuesForFloat64 value
Full Usage:
dataOfValuesForFloat64 value Parameter Types:
  • value : obj

Return Type: double [] * int []
Signature: value: obj -> double [] * int []
Parameter Types:
  • value : obj
Return Type: double [] * int []
dataOfValuesForInt16 value
Full Usage:
dataOfValuesForInt16 value Parameter Types:
  • value : obj

Return Type: int16 [] * int []
Signature: value: obj -> int16 [] * int []
Parameter Types:
  • value : obj
Return Type: int16 [] * int []
dataOfValuesForInt32 value
Full Usage:
dataOfValuesForInt32 value Parameter Types:
  • value : obj

Return Type: int32 [] * int []
Signature: value: obj -> int32 [] * int []
Parameter Types:
  • value : obj
Return Type: int32 [] * int []
dataOfValuesForInt64 value
Full Usage:
dataOfValuesForInt64 value Parameter Types:
  • value : obj

Return Type: int64 [] * int []
Signature: value: obj -> int64 [] * int []
Parameter Types:
  • value : obj
Return Type: int64 [] * int []
dataOfValuesForInt8 value
Full Usage:
dataOfValuesForInt8 value Parameter Types:
  • value : obj

Return Type: int8 [] * int []
Signature: value: obj -> int8 [] * int []
Parameter Types:
  • value : obj
Return Type: int8 [] * int []
dilatedCoordinates coordinates dilations
Full Usage:
dilatedCoordinates coordinates dilations Parameter Types:
  • coordinates : int []
  • dilations : int []

Return Type: int []
Signature: coordinates: int [] -> dilations: int [] -> int []
Parameter Types:
  • coordinates : int []
  • dilations : int []
Return Type: int []
download url localFileName
Full Usage:
download url localFileName Parameter Types:
  • url : string
  • localFileName : string

Signature: url: string -> localFileName: string -> unit
Parameter Types:
  • url : string
  • localFileName : string
duplicates l
Full Usage:
duplicates l Parameter Types:
  • l : seq<'a>

Return Type: 'a list
Signature: l: seq<'a> -> 'a list
Parameter Types:
  • l : seq<'a>
Return Type: 'a list
flatIndexToIndex shape flatIndex
Full Usage:
flatIndexToIndex shape flatIndex Parameter Types:
  • shape : Shape
  • flatIndex : int

Return Type: int []
Signature: shape: Shape -> flatIndex: int -> int []
Parameter Types:
  • shape : Shape
  • flatIndex : int
Return Type: int []
formatType ty
Full Usage:
formatType ty Parameter Types:
  • ty : Type

Return Type: string
Signature: ty: Type -> string
Parameter Types:
  • ty : Type
Return Type: string
getUniqueCounts values sorted
Full Usage:
getUniqueCounts values sorted Parameter Types:
  • values : 'a []
  • sorted : bool

Return Type: 'a [] * int []
Signature: values: 'a [] -> sorted: bool -> 'a [] * int []
Parameter Types:
  • values : 'a []
  • sorted : bool
Return Type: 'a [] * int []
hasDuplicates l
Full Usage:
hasDuplicates l Parameter Types:
  • l : seq<'a>

Return Type: bool
Signature: l: seq<'a> -> bool
Parameter Types:
  • l : seq<'a>
Return Type: bool
indentNewLines str numSpaces
Full Usage:
indentNewLines str numSpaces Parameter Types:
  • str : String
  • numSpaces : int

Return Type: string
Signature: str: String -> numSpaces: int -> string
Parameter Types:
  • str : String
  • numSpaces : int
Return Type: string
indexToFlatIndex shape index
Full Usage:
indexToFlatIndex shape index Parameter Types:
  • shape : Shape
  • index : int []

Return Type: int
Signature: shape: Shape -> index: int [] -> int
Parameter Types:
  • shape : Shape
  • index : int []
Return Type: int
loadBinary fileName
Full Usage:
loadBinary fileName Parameter Types:
  • fileName : string

Return Type: 'a
Signature: fileName: string -> 'a
Parameter Types:
  • fileName : string
Return Type: 'a
log10Val
Full Usage:
log10Val
Return Type: float<MeasureOne>
Signature: float<MeasureOne>
Return Type: float<MeasureOne>
logSqrt2Pi
Full Usage:
logSqrt2Pi
Return Type: float<MeasureOne>
Signature: float<MeasureOne>
Return Type: float<MeasureOne>
maxIndex seq
Full Usage:
maxIndex seq Parameter Types:
  • seq : seq<'a>

Return Type: int
Signature: seq: seq<'a> -> int
Parameter Types:
  • seq : seq<'a>
Return Type: int
memoize fn
Full Usage:
memoize fn Parameter Types:
  • fn : 'a -> 'b

Return Type: 'a -> 'b
Signature: fn: ('a -> 'b) -> 'a -> 'b
Parameter Types:
  • fn : 'a -> 'b
Return Type: 'a -> 'b
minIndex seq
Full Usage:
minIndex seq Parameter Types:
  • seq : seq<'a>

Return Type: int
Signature: seq: seq<'a> -> int
Parameter Types:
  • seq : seq<'a>
Return Type: int
mirrorCoordinates coordinates shape mirrorDims
Full Usage:
mirrorCoordinates coordinates shape mirrorDims Parameter Types:
  • coordinates : int []
  • shape : Shape
  • mirrorDims : int []

Return Type: int []
Signature: coordinates: int [] -> shape: Shape -> mirrorDims: int [] -> int []
Parameter Types:
  • coordinates : int []
  • shape : Shape
  • mirrorDims : int []
Return Type: int []
notNull value
Full Usage:
notNull value Parameter Types:
  • value : 'a

Return Type: bool
Signature: value: 'a -> bool
Parameter Types:
  • value : 'a
Return Type: bool
saveBinary object fileName
Full Usage:
saveBinary object fileName Parameter Types:
  • object : 'a
  • fileName : string

Signature: object: 'a -> fileName: string -> unit
Parameter Types:
  • object : 'a
  • fileName : string
shapeLength shape
Full Usage:
shapeLength shape Parameter Types:
  • shape : Shape

Return Type: int
Signature: shape: Shape -> int
Parameter Types:
  • shape : Shape
Return Type: int
shuffledIndices length
Full Usage:
shuffledIndices length Parameter Types:
  • length : int

Return Type: int -> int
Signature: length: int -> int -> int
Parameter Types:
  • length : int
Return Type: int -> int
stringPad s width
Full Usage:
stringPad s width Parameter Types:
  • s : string
  • width : int

Return Type: string
Signature: s: string -> width: int -> string
Parameter Types:
  • s : string
  • width : int
Return Type: string
stringPadAs s1 s2
Full Usage:
stringPadAs s1 s2 Parameter Types:
  • s1 : string
  • s2 : string

Return Type: string
Signature: s1: string -> s2: string -> string
Parameter Types:
  • s1 : string
  • s2 : string
Return Type: string
toInt a
Full Usage:
toInt a Parameter Types:
  • a : 'a

Return Type: int
Signature: a: 'a -> int
Parameter Types:
  • a : 'a
Return Type: int
tryFlatArrayAndShape value
Full Usage:
tryFlatArrayAndShape value Parameter Types:
  • value : obj

Return Type: ('T [] * int []) option
Signature: value: obj -> ('T [] * int []) option
Parameter Types:
  • value : obj
Return Type: ('T [] * int []) option