as.standard {magic} | R Documentation |
Transforms a magic square into Frenicle's standard form.
as.standard(m) is.standard(m)
m |
Magic square to be tested or transformed |
as.standard()
transforms a magic square into Frenicle's standard
form. The four numbers at each of the four corners are determined.
First, the square is rotated so the smallest of the four is at the upper
left. Then, element [1,2]
is compared with element[2,1]
and, if it is larger, the transpose is taken.
Thus all eight rotated and transposed versions of a magic square have the same standard form.
The square returned by magic()
is in standard form.
is.standard()
returns TRUE
if the magic square is in
standard form. This function checks for neither magicness nor normality
(use is.magic
and is.normal
for this).
Robin K. S. Hankin
is.standard(magic.2np1(4)) as.standard(magic.4n(3))