Zilde: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Miraheze>Marshall
No edit summary
m (8 revisions imported: Migrate from miraheze)
(No difference)

Revision as of 14:48, 20 November 2019

Zilde () or Zero-tilde (which the common name is a portmanteau of), is the empty numeric vector. It is the shape of any scalar, although its own shape is ,0. This is because, as a vector, it has exactly one axis, and this axis has length 0. Zilde is equivalent to ⍳0 and ⍴0 and 0⍴0. Being numeric, Zilde's prototype is 0.

Zilde is notable for being an APL glyph which represents an array rather than a primitive function or primitive operator. In most APLs it is the only array literal which is produced using its own token rather than being part of a family of array literals like numeric literals, strings, or system constants (an exception is SHARP APL's nil (), which is the same as ⊂⍬).

It should be noted that the empty numeric vector () is distinct from the empty character vector ('') even though they have the same shape and the same elements:

      ∧/⍬=''
1
      ⍬≡''
0

This is because ⍬='' itself returns an empty numeric vector, and reducing an empty vector with the Logical And function () yields the identity element of Logical And, which is 1. However, match takes empty array prototypes into account as well as shapes and elements, so it indicates that the arrays are different.


APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector