Autodoc formatting

This commit is contained in:
wiredfool 2014-07-12 09:52:04 -07:00
parent 5d3f834385
commit b6b36543ce

View File

@ -15,19 +15,19 @@ LUT_SIZE = 1 << 9
class LutBuilder: class LutBuilder:
"""A class for building a MorphLut from a descriptive language """A class for building a MorphLut from a descriptive language
The input patterns is a list of a strings sequences like these: The input patterns is a list of a strings sequences like these::
4:(... 4:(...
.1. .1.
111)->1 111)->1
(whitespaces including linebreaks are ignored). The option 4 (whitespaces including linebreaks are ignored). The option 4
describes a series of symmetry operations (in this case a describes a series of symmetry operations (in this case a
4-rotation), the pattern is described by: 4-rotation), the pattern is described by:
. or X - Ignore - . or X - Ignore
1 - Pixel is on - 1 - Pixel is on
0 - Pixel is off - 0 - Pixel is off
The result of the operation is described after "->" string. The result of the operation is described after "->" string.
@ -35,15 +35,16 @@ class LutBuilder:
returned if no other match is found. returned if no other match is found.
Operations: Operations:
4 - 4 way rotation
N - Negate
1 - Dummy op for no other operation (an op must always be given)
M - Mirroring
Example: - 4 - 4 way rotation
- N - Negate
- 1 - Dummy op for no other operation (an op must always be given)
- M - Mirroring
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"]) Example::
lut = lb.build_lut()
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
lut = lb.build_lut()
""" """
def __init__(self, patterns=None, op_name=None): def __init__(self, patterns=None, op_name=None):