magic1.6-1 package

Create and Investigate Magic Squares

adiag

Binds arrays corner-to-corner

allsubhypercubes

Subhypercubes of magic hypercubes

allsums

Row, column, and two diagonal sums of arrays

apad

Pad arrays

apl

Replacements for APL functions take and drop

aplus

Generalized array addition

arev

Reverses some dimensions; a generalization of rev

arot

Rotates an array about two specified dimensions

arow

Generalized row and col

as.standard

Standard form for magic squares

cilleruelo

A class of multiplicative magic squares due to Cilleruelo and Luca

circulant

Circulant matrices of any order

diag.off

Extracts broken diagonals

do.index

Apply a function to array element indices

eq

Comparison of two magic squares

fnsd

First non-singleton dimension

force.integer

Integerize array elements

hadamard

Hadamard matrices

hudson

Pandiagonal magic squares due to Hudson

is.magic

Various tests for the magicness of a square

is.magichypercube

magic hypercubes

is.ok

does a vector have the sum required to be a row or column of a magic s...

is.square.palindromic

Is a square matrix square palindromic?

latin

Random latin squares

lozenge

Conway's lozenge algorithm for magic squares

magic-package

tools:::Rd_package_title("magic")

magic.2np1

Magic squares of odd order

magic.4n

Magic squares of order 4n

magic.4np2

Magic squares of order 4n+2

magic.8

Regular magic squares of order 8

magic.constant

Magic constant of a magic square or hypercube

magic.prime

Magic squares prime order

magic.product

Product of two magic squares

magic

Creates magic squares

magiccube.2np1

Magic cubes of order 2n+1

magichypercube.4n

Magic hypercubes of order 4n

magicplot

Joins consecutive numbers of a magic square.

minmax

are all elements of a vector identical?

notmagic.2n

An unmagic square

nqueens

N queens problem

panmagic.4

Panmagic squares of order 4

panmagic.6npm1

Panmagic squares of order 4n, 6n+1 and 6n-1

panmagic.8

Panmagic squares of order 8

process

Force index arrays into range

recurse

Recursively apply a permutation

sam

Sparse antimagic squares

shift

Shift origin of arrays and vectors

strachey

Strachey's algorithm for magic squares

subsums

Sums of submatrices

transf

Frenicle's equivalent magic squares

A collection of functions for the manipulation and analysis of arbitrarily dimensioned arrays. The original motivation for the package was the development of efficient, vectorized algorithms for the creation and investigation of magic squares and high-dimensional magic hypercubes.

  • Maintainer: Robin K. S. Hankin
  • License: GPL-2
  • Last published: 2022-11-16