Skip to content

Commit

Permalink
Updated Makefile for combinatoric cheatsheet.
Browse files Browse the repository at this point in the history
  • Loading branch information
hargup committed Apr 23, 2014
1 parent bdb8dff commit 978e36c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
7 changes: 6 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,18 @@ linkcheck:
livehtml:
livereload -b _build/html

cheatsheet: _build/cheatsheet/cheatsheet.pdf
cheatsheet: _build/cheatsheet/cheatsheet.pdf _build/cheatsheet/combinatoric_cheatsheet.pdf

_build/cheatsheet/cheatsheet.pdf: cheatsheet/cheatsheet.tex
mkdir -p _build/cheatsheet
pdflatex -output-directory=_build/cheatsheet cheatsheet/cheatsheet.tex
pdflatex -output-directory=_build/cheatsheet cheatsheet/cheatsheet.tex

_build/cheatsheet/cheatsheet.pdf: cheatsheet/combinatoric_cheatsheet.tex
mkdir -p _build/cheatsheet
pdflatex -output-directory=_build/cheatsheet cheatsheet/combinatoric_cheatsheet.tex
pdflatex -output-directory=_build/cheatsheet cheatsheet/combinatoric_cheatsheet.tex

texinfo:
mkdir -p _build/texinfo
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo
Expand Down
58 changes: 29 additions & 29 deletions doc/cheatsheet/combinatoric_cheatsheet.tex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

% Turn off header and footer
\pagestyle{empty}


% Redefine section commands to use less space
\makeatletter
Expand Down Expand Up @@ -97,7 +97,7 @@
\Large{\textbf{Combinatoric CheatSheet \\ Sympy.org}} \\
\end{center}
\section{Partition}
\verb!Path: from sympy.combinatorics.partitions!\\
\verb!Path: from sympy.combinatorics.partitions!\\
\subsection{Methods}
\verb!random_integer_partition(n, seed=None)! \\
Generates a random integer partition summing to n as a list of reverse-sorted integers
Expand All @@ -110,8 +110,8 @@ \subsection{Methods}
\verb!RGS_enum(m)! \\
computes the total number of restricted growth
strings possible for a superset of size \verb!m!


\verb!RGS_unrank(rank, m)! \\
Gives the unranked restricted growth string for a given superset size

Expand All @@ -132,20 +132,20 @@ \subsection{Subclass \texttt{Partition}}
\verb!sort_key(order=None)! & Return a canonical key that can be used for sorting.
\end{tabular}

dump : \\
Used at the very beginning of a document:
\verb!\documentclass{!\textit{class}\verb!}!. Use
\verb!\begin{document}! to start contents and \verb!\end{document}! to
end the document.
\\end dump.
%dump : \\
%Used at the very beginning of a document:
%\verb!\documentclass{!\textit{class}\verb!}!. Use
%\verb!\begin{document}! to start contents and \verb!\end{document}! to
%end the document.
%\\end dump.

\subsection{Subclass \texttt{IntegerPartition}}
\subsection{Subclass \texttt{IntegerPartition}}
This class represents an integer partition.
\newlength{\MyLen}
\settowidth{\MyLen}{\texttt{letterpaper}/\texttt{a4paper} \ }
\begin{tabular}{@{}p{\the\MyLen}%
@{}p{\linewidth-\the\MyLen}@{}}
\verb!as_dict()! & Return the partition as a dictionary whose keys are the
\verb!as_dict()! & Return the partition as a dictionary whose keys are the
partition integers and the values are the multiplicity of that integer \\
\verb!as_ferrers(char='#')! & Prints the ferrer diagram of a partition\\
\verb!conjugate! &Computes the conjugate partition of itself\\
Expand All @@ -154,7 +154,7 @@ \subsection{Subclass \texttt{IntegerPartition}}
\end{tabular}

\section{Permutation}
Path \verb!sympy.combinatorics.permutations.Permutation!\\
Path \verb!sympy.combinatorics.permutations.Permutation!\\
\subsection{Methods}
\verb!array_form! \\
This is used to convert from cyclic notation to the canonical notation
Expand Down Expand Up @@ -196,7 +196,7 @@ \subsection{Methods}


\verb!from_sequence(i, key=None)!\\
Return the permutation needed to obtain \verb!i! from the sorted elements of \verb!i!.
Return the permutation needed to obtain \verb!i! from the sorted elements of \verb!i!.
If custom sorting is desired, a key can be given.

\verb!full_cyclic_form!\\
Expand Down Expand Up @@ -246,8 +246,8 @@ \subsection{Methods}
\verb!is_Singleton!\\
Checks to see if the permutation contains only one number and
is thus the only possible permutation of this set of numbers.


\verb!is_even!\\
Checks if a permutation is even.

Expand All @@ -257,7 +257,7 @@ \subsection{Methods}


\verb!josephus(m, n, s=1)!\\
Return as a permutation the shuffling of range(\verb!n!) using the Josephus scheme
Return as a permutation the shuffling of range(\verb!n!) using the Josephus scheme
in which every \verb!m!-th item is selected until all have been chosen.


Expand Down Expand Up @@ -302,12 +302,12 @@ \subsection{Methods}


\verb!rank(i=None)!\\
Returns the lexicographic rank of the permutation
Returns the lexicographic rank of the permutation
(default) or the \verb!i!th ranked permutation of self.


\verb!rank_nonlex(inv_perm=None)!\\
This is a linear time ranking algorithm
This is a linear time ranking algorithm
that does not enforce lexicographic order.


Expand All @@ -316,7 +316,7 @@ \subsection{Methods}


\verb!static rmul(*args)!\\
Return product of Permutations $[a, b, c, ...]$ as the Permutation whose $i$th value is $a(b(c(i)))$.
Return product of Permutations $[a, b, c, \dots]$ as the Permutation whose $i$th value is $a(b(c(i)))$.


\verb!runs()!\\
Expand Down Expand Up @@ -689,7 +689,7 @@ \subsection{Methods}
\verb!static edges(*runs)!\\
Return a list of edges and the number of nodes from the given
runs that connect nodes in an integer-labelled tree.

\verb!next(delta=1)!\\
Generates the Prufer sequence that is delta beyond the current one.

Expand Down Expand Up @@ -815,7 +815,7 @@ \subsection{Methods}


\verb!subset_indices(subset, superset)!\\
Return indices of subset in superset in a list;
Return indices of subset in superset in a list;
the list is empty if all elements of \verb!subset! are not in \verb!superset!.


Expand Down Expand Up @@ -844,10 +844,10 @@ \subsection{Methods}
\section{Gray Code}
Path: \verb!sympy.combinatorics.graycode.GrayCode!
A Gray code is essentially a Hamiltonian walk on a n-dimensional
cube with edge length of one. The vertices of the cube are
represented by vectors whose values are binary.
The Hamilton walk visits each vertex exactly once.
cube with edge length of one. The vertices of the cube are
represented by vectors whose values are binary.
The Hamilton walk visits each vertex exactly once.

\subsection{Methods}

\verb!current!\\
Expand Down Expand Up @@ -883,7 +883,7 @@ \subsection{Methods}


\verb!unrank(n, rank)!\\
Unranks an n-bit sized Gray code of rank k.
Unranks an n-bit sized Gray code of rank k.
This method exists so that a derivative GrayCode class can define its own code of a given rank.


Expand Down Expand Up @@ -944,7 +944,7 @@ \section{Utilities}

\subsection{Methods}
\verb!_base_ordering(base, degree)!\\
Order $\{0,1,...,n?1\}$ so that base points come first and in order
Order $\{0,1,\dots,n\}$ so that base points come first and in order


\verb!_check_cycles_alt_sym(perm)!\\
Expand All @@ -956,7 +956,7 @@ \subsection{Methods}
Distribute the group elements \verb!gens! by membership in basic stabilizers.


\verb!_handle_precomputed_bsgs(base, strong_gens,!\\
\verb!_handle_precomputed_bsgs(base, strong_gens,!\\
\verb!transversals=None, basic_orbits=None,!\\
\verb!strong_gens_distr=None)!\\
Calculate BSGS-related structures from those present.
Expand Down

0 comments on commit 978e36c

Please sign in to comment.