muEC::COMP::Compo2Mat – a planar representation of a composition

The muEC::COMP::Compo2Mat function gives the diagram of a composition (i.e. a skew diagram of width 1, also called a ribbon), in the cartesian plane.

A composition is a list of strictly positive integers.

The following option is allowed: alphabet=l where l is a list of 1 to 3 components, math filling the skew diagram, math the inner diagram and math the outside.

→ Examples

Call:

muEC::COMP::Compo2Mat(compo, <alphabet = l>)

Parameters:

compo

any list denoting a composition

Related Functions:

muEC::COMP::ListCompo, muEC::TYP::IsCompo

Example 1:

muEC::COMP::Compo2Mat( [4,2,1,5] );

math

print(Unquoted,

      muEC::COMP::Compo2Mat( [4,2,1,5], alphabet=["#",".",""] ) ):

+-                           -+

|  #, #, #, #, #,  ,  ,  ,    |

|                             |

|  ., ., ., ., #,  ,  ,  ,    |

|                             |

|  ., ., ., ., #, #,  ,  ,    |

|                             |

|  ., ., ., ., ., #, #, #, #  |

+-                           -+