ILNumerics Ultimate VS

ILMathonesT Method (Int64, StorageOrders)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Creates a square matrix of 1-valued elements.

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public static RetArray<T> ones<T>(
	long rows_columns,
	StorageOrders order = StorageOrders.ColumnMajor
)
where T : struct, new(), IConvertible

Parameters

rows_columns
Type: SystemInt64
Length of dimension #0 and dimension #1 (the number of rows and columns).
order (Optional)
Type: ILNumericsStorageOrders
[Optional] The storage order for the new array. Default: ColumnMajor.

Type Parameters

T
Element type.

Return Value

Type: RetArrayT
New ILNumerics array initialized with 1s.
Exceptions

ExceptionCondition
ArgumentExceptionif T is not supported. Use one of the predefined, scalar value types (Double, float, int, ...), complex or fcomplex.
Remarks

This creates a square matrix with the same number of rows and columns. The elements are ordered in ColumnMajor order.

This function always creates a matrix, hence the array returned will always have two dimensions. Use vector``1(UMP, UMP, UMP, UMP) or array``1(UMP, Int64, StorageOrders) for creating arrays with less than two dimension if your setting of ArrayStyle allows it.

Supported element types are all predefined, scalar numeric value types.

[ILNumerics Computing Engine]

See Also

Reference

MathInternal.zeros``1(Int64, Int64, StorageOrders)
MathInternal.array``1(UMP, Int64, StorageOrders)
MathInternal.vector``1(UMP, UMP, UMP, UMP, UMP, UMP, UMP, UMP, UMP, UMP)
MathInternal.ones``1(Int64, Int64, StorageOrders)
MathInternal.empty``1(Int64, Int64, StorageOrders)

Other Resources