%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% $Id: CombinatorialClassWith2DBoxedRepresentation.tex,v 1.1.1.2 2004/10/16 15:15:34 nthiery Exp $
% File:		lib/DOMAINS/CATEGORY/DOC/CombinatorialClassWith2DBoxedRepresentation.tex
% Authors:	Nicolas M. Thiéry <nthiery@users.sourceforge.net>
% Purpose:	Documentation for the category Cat::CombinatorialClassWith2DBoxedRepresentation
% Created:	Sat Nov 22 23:16:30 2003
% License:	LGPL
% Project:	MuPAD-Combinat, http://mupad-combinat.sf.net
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Mhelppage}{CombinatorialClassWith2DBoxedRepresentation}{Nicolas M. Thiéry}
  [ImplState=stable,TestState=stable,DocState=stable]
%\Mproofread{...}{...}{...}

\begin{MInfo}
  \eng{the category of combinatorial classes with a 2D boxed-style
    representation}
  \de{}
\end{MInfo}

\begin{MIntro}
  \eng{\Mthis{} represents the category of combinatorial classes with
    a 2D boxed-style representation.}
  \de{}
\end{MIntro}

\begin{MCatConst}
  \MCall{}
\end{MCatConst}

\begin{MCategories}
  \Mup{Cat::CombinatorialClass}
\end{MCategories}

\begin{MDetails}
  \eng{A \Mthis{} is a \Mup[Cat::CombinatorialClass]{combinatorial
      class} whose objects can be represented graphically using 2D
    arrays of boxes.}

  \eng{The purpose of this category is mostly technical: it factorizes
    most of the pretty printing code of such combinatorial classes.}
\end{MDetails}

\MRelatedDomains{combinat::partitions, combinat::skewPartitions,
  combinat::tableaux, combinat::skewTableaux, combinat::ribbons,
  combinat::ribbonsTableaux, combinat::integerMatrices}

\begin{MMethodDetails}{toArray}
  \infoEng{array representing the 2d structure of an object.}
  \infoDe{}
  \call{\Mtype{dom} x}
  
  \eng{Returns an array representing the 2d structure of the object x.}
  
  \eng{If the array contains an element at position (row,col), then a
    box is to be drawn at this position with the element inside.
    Strings are drawn unquoted; in particular, you may use "" to get
    empty boxes.}
  
  \eng{Uninitialized entries in the array are ignored. Hence, it is
    not a problem if the array is larger than strictly required.  In
    particular, an empty object can safely be represented by an 1x1
    array to work around the fact that 0x0 arrays are not allowed in
    \mupad.}
\end{MMethodDetails}

\begin{MExample}{ex-basic}
  \eng{Many of the combinatorial classes in the \Mup{combinat} library
    have a 2D-boxed style representation. Typical examples include
    \Mup[combinat,partitions]{integer partitions}}:
  \begin{Mexin}
combinat::partitions::printPretty([5, 3, 1])
  \end{Mexin}
  \begin{Mexout}
                     +---+
                     |   |
                     +---+---+---+
                     |   |   |   |
                     +---+---+---+---+---+
                     |   |   |   |   |   |
                     +---+---+---+---+---+
  \end{Mexout}
  \eng{\Mup[combinat,tableaux]{Young tableaux}:}
  \begin{Mexin}
combinat::tableaux([[6], [2, 4], [1, 2, 5]])
  \end{Mexin}
  \begin{Mexout}
                         +---+
                         | 6 |
                         +---+---+
                         | 2 | 4 |
                         +---+---+---+
                         | 1 | 2 | 5 |
                         +---+---+---+
  \end{Mexout}
  \eng{\Mup[combinat,ribbonsTableaux]{ribbons tableaux}:}
  \begin{Mexin}
combinat::ribbonsTableaux([[3], [0, 0], [2, 0, 0, 2], [1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0]])
  \end{Mexin}
  \begin{Mexout}
                   +---+
                   | 3 |
                   +   +---+
                   | 3   3 |
                   +---+---+---+---+
                   | 2   2   2 | 2 |
                   +---+---+---+   +---+
                   | 1 | 1   1 | 2   2 |
                   +   +---+   +---+---+---+
                   | 1   1 | 1 | 1   1   1 |
                   +---+---+---+---+---+---+
  \end{Mexout}
  \eng{\Mup[combinat,integerMatrices]{integer matrices}:}
  \begin{Mexin}
combinat::integerMatrices::printPretty([[1, 2, 3], [0, 1, 1], [2, 1, 0]])
  \end{Mexin}
  \begin{Mexout}
                         +---+---+---+
                         | 1 | 2 | 3 |
                         +---+---+---+
                         | 0 | 1 | 1 |
                         +---+---+---+
                         | 2 | 1 | 0 |
                         +---+---+---+
  \end{Mexout}
  \eng{polyominoes, mazes, and so on.}
\end{MExample}

\begin{MChanges}
  \version{3.1}
  \eng[New category]{\Mthis{} is a new category} %
\end{MChanges}

\end{Mhelppage}
