Condividi tramite


Funzione IsSquareArray

Nome completo: Std.Arrays.IsSquareArray

function IsSquareArray<'T>(array : 'T[][]) : Bool

Sommario

Restituisce un valore che indica se una matrice bidimensionale ha una forma quadrata

Parametri di tipo

'T

Tipo di ogni elemento di array.

Immissione

array

Matrice tridimensionale di elementi.

Esempio

IsSquareArray([[1, 2], [3, 4]]);         // true
IsSquareArray([[1, 2, 3], [4, 5, 6]]);   // false
IsSquareArray([[1, 2], [3, 4], [5, 6]]); // false

Prodotto

true se la matrice è quadrata, false in caso contrario.

Vedere anche

  • Microsoft.Quantum.Arrays.IsRectangularArray