diff --git a/book_kr/Makefile b/book_kr/Makefile new file mode 100644 index 0000000..a4f841b --- /dev/null +++ b/book_kr/Makefile @@ -0,0 +1,92 @@ +LATEX = latex + +DVIPS = dvips + +PDFFLAGS = -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress \ + -dCompressPages=true -dUseFlateCompression=true \ + -dEmbedAllFonts=true -dSubsetFonts=true -dMaxSubsetPct=100 + + +%.dvi: %.tex + $(LATEX) $< + +%.ps: %.dvi + $(DVIPS) -o $@ $< + +%.pdf: %.ps + ps2pdf $(PDFFLAGS) $< + +all: book.tex + pdflatex book + makeindex book.idx + pdflatex book + mv book.pdf thinkpython2.pdf + +hevea: book.tex header.html footer.html + # replace the pdfs with eps + sed s/.pdf/.eps/g book.tex > thinkpython2.tex + latex thinkpython2 + rm -rf html + mkdir html + hevea -fix -O -e latexonly htmlonly thinkpython2 +# the following greps are a kludge to prevent imagen from seeing +# the definitions in latexonly, and to avoid headers on the images + grep -v latexonly thinkpython2.image.tex > a; mv a thinkpython2.image.tex + sed s/\\\\usepackage{fancyhdr}// < thinkpython2.image.tex > a; mv a thinkpython2.image.tex + imagen -png thinkpython2 + hacha thinkpython2.html + cp up.png next.png back.png html + mv index.html thinkpython2.css thinkpython2*.html thinkpython2*.png *motif.gif html + +DEST = /home/downey/public_html/greent/thinkpython2 + +epub: + cd html; ebook-convert index.html thinkpython2.epub + +distrib: + rm -rf dist + mkdir dist dist/tex dist/tex/figs + rsync -a thinkpython2.pdf html dist + rsync -a dist/* $(DEST) + chmod -R o+r $(DEST)/* + cd $(DEST)/..; sh back + +# UPDATE THE PATHS BELOW BEFORE RUNNING PLASTEX + +plastex: + # Before running plastex, we need the current directory in PYTHONPATH + # export PYTHONPATH=$PYTHONPATH:. + python Filist.py book.tex > book.plastex + rm -rf /home/downey/thinkpython2/trunk/book + plastex --renderer=DocBook --theme=book --image-resolution=300 --filename=book.xml book.plastex + rm -rf /home/downey/thinkpython2/trunk/book/.svn + +plastest: + # Before running plastex, we need the current directory in PYTHONPATH + # export PYTHONPATH=$PYTHONPATH:. + python Filist.py test.tex > test.plastex + rm -rf /home/downey/thinkpython2/trunk/test + plastex --renderer=DocBook --theme=test --filename=test.xml test.plastex + rm -rf /home/downey/thinkpython2/trunk/test/.svn + +xxe: + xmlcopyeditor ~/ThinkPython2/book/book/book.xml & + +lint: + xmllint -noout book/book.xml + +OREILLY = atlas + +oreilly: + rsync -a book.tex $(OREILLY) + rsync -a book/ $(OREILLY) + rsync -a figs/* $(OREILLY)/figs + cd $(OREILLY); git add . + cd $(OREILLY); git commit -m "Automated check in." + cd $(OREILLY); git push + +clean: + rm -f *~ *.aux *.log *.dvi *.idx *.ilg *.ind *.toc + + + diff --git a/book_kr/README.md b/book_kr/README.md new file mode 100644 index 0000000..7204b02 --- /dev/null +++ b/book_kr/README.md @@ -0,0 +1,6 @@ +ThinkPython Korean Translation +=========== + +LaTeX source, code examples, and exercise solutions for Think Python, 2nd edition, by Allen Downey. + +Translated by Seongjin Lee diff --git a/book_kr/auto/book.el b/book_kr/auto/book.el new file mode 100644 index 0000000..d634b5d --- /dev/null +++ b/book_kr/auto/book.el @@ -0,0 +1,1216 @@ +(TeX-add-style-hook "book" + (lambda () + (LaTeX-add-index-entries + "GNU Free Documentation License" + "Free Documentation License, GNU" + "Elkner, Jeff" + "Olin College" + "Meyers, Chris" + "Creative Commons" + "contributors" + "problem solving" + "program" + "running Python" + "Python!running" + "Python in a browser" + "PythonAnywhere" + "Python 2" + "interpreter" + "prompt" + "Hello, World" + "quotation mark" + "print statement" + "statement!print" + "function" + "print function" + "operator!arithmetic" + "arithmetic operator" + "bitwise operator" + "operator!bitwise" + "value" + "type" + "string" + "integer" + "floating-point" + "class" + "string type" + "type!str" + "int type" + "type!int" + "float type" + "type!float" + "sequence" + "formal language" + "natural language" + "language!formal" + "language!natural" + "syntax" + "token" + "structure" + "parse" + "ambiguity" + "redundancy" + "literalness" + "poetry" + "prose" + "debugging" + "bug" + "debugging!emotional response" + "emotional debugging" + "high-level language" + "low-level language" + "portability" + "interpret" + "operator" + "error message" + "calculator" + "running pace" + "variable" + "assignment statement" + "statement!assignment" + "state diagram" + "diagram!state" + "underscore character" + "keyword" + "expression" + "evaluate" + "statement" + "execute" + "interactive mode" + "script" + "script mode" + "order of operations" + "PEMDAS" + "string!operation" + "operator!string" + "concatenation" + "commutativity" + "comment" + "syntax error" + "error!syntax" + "runtime error" + "error!runtime" + "exception" + "safe language" + "language!safe" + "semantic error" + "error!semantic" + "assignment" + "operand" + "semantics" + "function call" + "parentheses!argument in" + "argument" + "return value" + "conversion!type" + "type conversion" + "int function" + "function!int" + "float function" + "function!float" + "str function" + "function!str" + "math function" + "function, math" + "module" + "module object" + "dot notation" + "log function" + "function!log" + "sine function" + "radian" + "trigonometric function" + "function, trigonometric" + "pi" + "sqrt function" + "function!sqrt" + "composition" + "SyntaxError" + "exception!SyntaxError" + "function definition" + "definition!function" + "def keyword" + "keyword!def" + "parentheses!empty" + "header" + "body" + "indentation" + "colon" + "ellipses" + "function type" + "type!function" + "use before def" + "flow of execution" + "parameter" + "function parameter" + "function argument" + "parentheses!parameters in" + "programmer-defined function" + "function!programmer defined" + "local variable" + "variable!local" + "NameError" + "exception!NameError" + "stack diagram" + "function frame" + "frame" + "diagram!stack" + "main" + "traceback" + "fruitful function" + "void function" + "function, fruitful" + "function, void" + "None special value" + "special value!None" + "NoneType type" + "type!NoneType" + "function, reasons for" + "experimental debugging" + "debugging!experimental" + "Holmes, Sherlock" + "Doyle, Arthur Conan" + "Linux" + "import statement" + "statement!import" + "len function" + "function!len" + "function object" + "object!function" + "grid" + "repetition" + "for loop" + "loop!for" + "statement!for" + "loop" + "polygon function" + "function!polygon" + "circle function" + "function!circle" + "arc function" + "function!arc" + "encapsulation" + "generalization" + "keyword argument" + "argument!keyword" + "interface" + "refactoring" + "development plan!encapsulation and generalization" + "docstring" + "triple-quoted string" + "string!triple-quoted" + "multiline string" + "string!multiline" + "precondition" + "postcondition" + "method" + "development plan" + "flower" + "pie" + "alphabet" + "turtle typewriter" + "typewriter, turtle" + "spiral" + "Archimedian spiral" + "floor division" + "floating-point division" + "division!floor" + "division!floating-point" + "modulus operator" + "operator!modulus" + "divisibility" + "boolean expression" + "expression!boolean" + "logical operator" + "operator!logical" + "True special value" + "False special value" + "special value!True" + "special value!False" + "bool type" + "type!bool" + "relational operator" + "operator!relational" + "and operator" + "or operator" + "not operator" + "operator!and" + "operator!or" + "operator!not" + "conditional statement" + "statement!conditional" + "if statement" + "statement!if" + "conditional execution" + "condition" + "compound statement" + "statement!compound" + "pass statement" + "statement!pass" + "alternative execution" + "else keyword" + "keyword!else" + "branch" + "chained conditional" + "conditional!chained" + "elif keyword" + "keyword!elif" + "nested conditional" + "conditional!nested" + "recursion" + "function!recursive" + "return statement" + "statement!return" + "base case" + "recursion!base case" + "infinite recursion" + "recursion!infinite" + "exception!RuntimeError" + "RuntimeError" + "keyboard input" + "input function" + "function!input" + "newline" + "ValueError" + "exception!ValueError" + "whitespace" + "exception!OverflowError" + "OverflowError" + "Fermat's Last Theorem" + "triangle" + "TurtleWorld" + "Koch curve" + "temporary variable" + "variable!temporary" + "dead code" + "abs function" + "function!abs" + "compare function" + "function!compare" + "development plan!incremental" + "testing!incremental development" + "Pythagorean theorem" + "testing!knowing the answer" + "sqrt" + "scaffolding" + "hypotenuse" + "function composition" + "boolean function" + "Turing complete language" + "language!Turing complete" + "Turing, Alan" + "Turing Thesis" + "vorpal" + "circular definition" + "definition!circular" + "factorial function" + "function!factorial" + "recursive definition" + "leap of faith" + "testing!leap of faith" + "fibonacci function" + "function!fibonacci" + "type checking" + "error checking" + "gamma function" + "isinstance function" + "function!isinstance" + "guardian pattern" + "pattern!guardian" + "incremental development" + "Ackermann function" + "function!ack" + "palindrome" + "greatest common divisor (GCD)" + "GCD (greatest common divisor)" + "reassignment" + "equality and assignment" + "update" + "variable!updating" + "initialization (before update)" + "increment" + "decrement" + "statement!while" + "while loop" + "loop!while" + "iteration" + "infinite loop" + "loop!infinite" + "Collatz conjecture" + "break statement" + "statement!break" + "square root" + "Newton's method" + "epsilon" + "algorithm" + "addition with carrying" + "carrying, addition with" + "subtraction!with borrowing" + "borrowing, subtraction with" + "debugging!by bisection" + "bisection, debugging by" + "initialization!variable" + "algorithm!square root" + "eval function" + "function!eval" + "Ramanujan, Srinivasa" + "character" + "bracket operator" + "operator!bracket" + "index" + "index!starting at zero" + "zero, index + starting at" + "exception!TypeError" + "TypeError" + "exception!IndexError" + "IndexError" + "index!negative" + "negative index" + "traversal" + "loop!traversal" + "abecedarian" + "McCloskey, Robert" + "slice operator" + "operator!slice" + "index!slice" + "string!slice" + "slice!string" + "copy!slice" + "slice!copy" + "mutability" + "immutability" + "string!immutable" + "object" + "item" + "item assignment" + "assignment!item" + "find function" + "function!find" + "search pattern" + "pattern!search" + "counter" + "counting and looping" + "looping and counting" + "looping!with strings" + "string!method" + "invocation" + "optional argument" + "argument!optional" + "in operator" + "operator!in" + "boolean operator" + "operator!boolean" + "string!comparison" + "comparison!string" + "slice" + "empty string" + "string method" + "method!string" + "count method" + "method!count" + "step size" + "letter rotation" + "rotation, letter" + "Moby Project" + "crosswords" + "open function" + "function!open" + "plain text" + "text!plain" + "object!file" + "file object" + "readline method" + "method!readline" + "strip method" + "method!strip" + "lipogram" + "reduction to a + previously solved problem" + "development plan!reduction" + "looping!with indices" + "index!looping with" + "reduction to a previously solved problem" + "testing!is hard" + "program testing" + "special case" + "testing!and absence of bugs" + "Dijkstra, Edsger" + "Car Talk" + "Puzzler" + "double letters" + "odometer" + "list" + "type!list" + "element" + "nested list" + "list!nested" + "empty list" + "list!empty" + "list!element" + "access" + "zero, index starting at" + "list!index" + "list!membership" + "membership!list" + "list!traversal" + "traversal!list" + "item update" + "update!item" + "list!operation" + "concatenation!list" + "list!concatenation" + "repetition!list" + "list!repetition" + "list!slice" + "slice!list" + "list!copy" + "slice!update" + "update!slice" + "list!method" + "method, list" + "append method" + "method!append" + "extend method" + "method!extend" + "sort method" + "method!sort" + "void method" + "method!void" + "update operator" + "operator!update" + "assignment!augmented" + "augmented assignment" + "accumulator!sum" + "reduce pattern" + "pattern!reduce" + "accumulator!list" + "map pattern" + "pattern!map" + "filter pattern" + "pattern!filter" + "element deletion" + "deletion, element of list" + "pop method" + "method!pop" + "del operator" + "operator!del" + "remove method" + "method!remove" + "list!function" + "function!list" + "split method" + "method!split" + "delimiter" + "join method" + "method!join" + "string!empty" + "aliasing" + "is operator" + "operator!is" + "equivalence" + "identity" + "reference!aliasing" + "reference" + "list!as argument" + "argument!list" + "aliasing!copying to avoid" + "copy!to avoid aliasing" + "sorted!function" + "function!sorted" + "accumulator" + "equivalent" + "identical" + "cumulative sum" + "anagram" + "duplicate" + "uniqueness" + "birthday paradox" + "random module" + "module!random" + "randint function" + "function!randint" + "method append" + "time module" + "module!time" + "membership!bisection search" + "bisection search" + "search, bisection" + "membership!binary search" + "binary search" + "search, binary" + "bisect module" + "module!bisect" + "reverse word pair" + "interlocking words" + "dictionary" + "type!dict" + "key" + "key-value pair" + "dict function" + "function!dict" + "squiggly bracket" + "bracket!squiggly" + "exception!KeyError" + "KeyError" + "membership!dictionary" + "values method" + "method!values" + "implementation" + "histogram" + "frequency" + "get method" + "method!get" + "dictionary!looping with" + "looping!with dictionaries" + "dictionary!lookup" + "dictionary!reverse lookup" + "lookup, dictionary" + "reverse lookup, dictionary" + "search" + "raise statement" + "statement!raise" + "exception!LookupError" + "LookupError" + "invert dictionary" + "dictionary!invert" + "singleton" + "hash function" + "hashable" + "call graph" + "memo" + "global variable" + "variable!global" + "flag" + "global statement" + "statement!global" + "declaration" + "update!global variable" + "global variable!update" + "UnboundLocalError" + "exception!UnboundLocalError" + "sanity check" + "consistency check" + "pretty print" + "pprint module" + "module!pprint" + "mapping" + "item!dictionary" + "hashtable" + "lookup" + "reverse lookup" + "diagram!call graph" + "set membership" + "membership!set" + "setdefault method" + "method!setdefault" + "rotation!letters" + "homophone" + "reducible word" + "word, reducible" + "tuple" + "type!tuple" + "parentheses!tuples in" + "tuple!singleton" + "tuple function" + "function!tuple" + "tuple!slice" + "slice!tuple" + "comparison!tuple" + "tuple!comparison" + "tuple!assignment" + "assignment!tuple" + "swap pattern" + "pattern!swap" + "email address" + "value!tuple" + "return value!tuple" + "function, tuple as return value" + "divmod" + "tuple assignment" + "max function" + "function!max" + "min function" + "function!min" + "variable-length argument tuple" + "argument!variable-length tuple" + "gather" + "parameter!gather" + "argument!gather" + "scatter" + "argument scatter" + "sum function" + "function!sum" + "zip function" + "function!zip" + "iterator" + "list!of tuples" + "enumerate function" + "function!enumerate" + "object!enumerate" + "enumerate object" + "items method" + "method!items" + "dictionary!initialize" + "zip function!use with dict" + "update method" + "method!update" + "traverse!dictionary" + "dictionary!traversal" + "tuple!as key in dictionary" + "tuple!in brackets" + "sorted function" + "reversed function" + "function!reversed" + "data structure" + "shape error" + "error!shape" + "structshape module" + "module!structshape" + "zip object" + "object!zip" + "shape" + "letter + frequency" + "frequency!letter" + "anagram set" + "set!anagram" + "Scrabble" + "bingo" + "metathesis" + "definition!recursive" + "string module" + "module!string" + "replace method" + "method!replace" + "translate method" + "method!translate" + "Project Gutenberg" + "word frequency" + "frequency!word" + "random number" + "number, random" + "deterministic" + "pseudorandom" + "random function" + "function!random" + "choice function" + "function!choice" + "histogram!random choice" + "histogram!word frequencies" + "Austin, Jane" + "accumulator!histogram" + "update!histogram" + "optional parameter" + "parameter!optional" + "default value" + "value!default" + "override" + "dictionary!subtraction" + "subtraction!dictionary" + "set" + "type!set" + "Markov analysis" + "prefix" + "suffix" + "random text" + "text!random" + "mash-up" + "benchmarking" + "profile module" + "module!profile" + "typographical error" + "random walk programming" + "development plan!random walk programming" + "rubber duck debugging" + "debugging!rubber duck" + "Zipf's law" + "logarithm" + "matplotlib" + "file" + "type!file" + "persistence" + "pickle module" + "module!pickle" + "file!reading and writing" + "close method" + "method!close" + "format operator" + "operator!format" + "format string" + "format sequence" + "filename" + "path" + "directory" + "folder" + "os module" + "module!os" + "getcwd function" + "function!getcwd" + "working directory" + "directory!working" + "relative path" + "path!relative" + "absolute path" + "path!absolute" + "exists function" + "function!exists" + "walk, directory" + "directory!walk" + "exception!IOError" + "IOError" + "file!permission" + "permission, file" + "exception, catching" + "try statement" + "statement!try" + "database" + "dbm + module" + "module!dbm" + "database object" + "object!database" + "update!database" + "bytes object" + "object!bytes" + "dictionary methods!dbm module" + "pickling" + "shelve module" + "module!shelve" + "shell" + "pipe" + "ls (Unix command)" + "Unix command!ls" + "popen function" + "function!popen" + "read method" + "method!read" + "md5" + "checksum" + "module, writing" + "word count" + "object!module" + "name built-in variable" + "module!reload" + "reload function" + "function!reload" + "repr function" + "function!repr" + "string representation" + "end of line character" + "text file" + "catch" + "pipe object" + "object!pipe" + "MP3" + "MD5 algorithm" + "algorithm!MD5" + "md5sum" + "diff" + "object-oriented programming" + "programmer-defined type" + "type!programmer-defined" + "point, mathematical" + "representation" + "object!class" + "class definition" + "definition!class" + "Point class" + "class!Point" + "class object" + "instance" + "instantiation" + "hexadecimal" + "instance attribute" + "attribute!instance" + "object diagram" + "diagram!object" + "instance!as argument" + "Rectangle class" + "class!Rectangle" + "embedded object" + "object!embedded" + "instance!as return value" + "object!mutable" + "copying objects" + "object!copying" + "copy module" + "module!copy" + "embedded object!copying" + "shallow copy" + "copy!shallow" + "deep copy" + "copy!deep" + "deepcopy function" + "function!deepcopy" + "exception!AttributeError" + "AttributeError" + "type function" + "function!type" + "hasattr function" + "function!hasattr" + "attribute" + "instantiate" + "Time class" + "class!Time" + "prototype and patch" + "development plan!prototype and patch" + "pure function" + "function type!pure" + "Monty Python and the Holy Grail" + "modifier" + "function type!modifier" + "functional programming style" + "planned development" + "development plan!designed" + "sexagesimal" + "subtraction with borrowing" + "invariant" + "assert statement" + "statement!assert" + "designed development" + "datetime module" + "module!datetime" + "birthday" + "Double Day" + "object!printing" + "function syntax" + "method syntax" + "subject" + "self (parameter name)" + "parameter!self" + "metaphor, method invocation" + "positional argument" + "argument!positional" + "other (parameter name)" + "parameter!other" + "init method" + "method!init" + "str method@\\_\\_str\\_\\_ method" + "method!\\_\\_str\\_\\_" + "add method" + "method!add" + "operator overloading" + "type-based dispatch" + "dispatch, type-based" + "radd method" + "method!radd" + "dispatch!type-based" + "polymorphism" + "attribute!initializing" + "dict attribute@\\_\\_dict\\_\\_ attribute" + "attribute!\\_\\_dict\\_\\_" + "traversal!dictionary" + "getattr function" + "function!getattr" + "maintainable" + "object-oriented design" + "object-oriented language" + "overloading" + "operator!overloading" + "information hiding" + "default value!avoiding mutable" + "mutable object, as default value" + "worst bug" + "bug!worst" + "Kangaroo class" + "class!Kangaroo" + "deck" + "card, playing" + "poker" + "rank" + "suit" + "encode" + "encrypt" + "map to" + "Card class" + "class!Card" + "class attribute" + "attribute!class" + "cmp method@\\_\\_cmp\\_\\_ method" + "method!\\_\\_cmp\\_\\_" + "list!of objects" + "deck, playing cards" + "loop!nested" + "Deck class" + "class!Deck" + "accumulator!string" + "string!accumulator" + "veneer" + "shuffle function" + "function!shuffle" + "inheritance" + "parentheses!parent class in" + "parent class" + "class!parent" + "Hand class" + "class!Hand" + "child class" + "class!child" + "IS-A relationship" + "HAS-A relationship" + "class diagram" + "diagram!class" + "multiplicity (in class diagram)" + "mro method" + "method!mro" + "method resolution order" + "Liskov substitution principle" + "development plan!data encapsulation" + "data encapsulation" + "conditional expression" + "expression!conditional" + "NaN" + "factorial" + "list comprehension" + "loop variable" + "generator expression" + "expression!generator" + "generator object" + "object!generator" + "StopIteration" + "exception!StopIteration" + "sum" + "any" + "built-in function!any" + "all" + "dictionary subtraction" + "object!set" + "set subtraction" + "subset" + "Counter" + "object!Counter" + "multiset" + "collections" + "module!collections" + "defaultdict" + "object!defaultdict" + "factory function" + "setdefault" + "namedtuple" + "object!namedtuple" + "factory" + "conditional" + "hanging" + "loop!condition" + "dir function" + "function!dir" + "debugger (pdb)" + "pdb (Python debugger)" + "testing!minimal test case" + "test case, minimal" + "model, mental" + "mental model" + "expression!big and hairy" + "big, hairy expression" + "precedence" + "frustration" + "rage" + "debugging!superstition" + "superstitious debugging" + "analysis of algorithms" + "Obama, Barack" + "Schmidt, Eric" + "bubble sort" + "radix sort" + "comparing algorithms" + "machine model" + "worst case" + "average case" + "order of growth" + "leading term" + "exponent" + "leading coefficient" + "crossover point" + "big-oh notation" + "linear growth" + "quadratic growth" + "badness" + "logarithmic growth" + "exponential growth" + "analysis of primitives" + "indexing" + "string methods" + "tuple methods" + "string concatenation" + "join@{\\tt join}" + "list methods" + "sorting" + "dictionary methods" + "comparison sort" + "stable sort" + "linear search" + "in@{\\tt in} operator" + "LinearMap@{\\tt LinearMap}" + "KeyError@{\\tt KeyError}" + "red-black tree" + "BetterMap@{\\tt BetterMap}" + "bounded" + "HashMap" + "rehashing" + "constant time" + "average cost" + "geometric resizing" + "Big-Oh notation" + "linear" + "quadratic") + (LaTeX-add-environments + "exercise") + (LaTeX-add-labels + "#1" + "hello" + "variables" + "fig.state2" + "funcchap" + "functionchap" + "parameters" + "stackdiagram" + "fig.stack" + "turtlechap" + "turtle" + "repetition" + "refactoring" + "docstring" + "fig.flowers" + "fig.pies" + "conditional.execution" + "alternative.execution" + "recursion" + "recursive.stack" + "fig.stack2" + "whitespace" + "fig.koch" + "fruitchap" + "incremental.development" + "boolean" + "more.recursion" + "fig.stack3" + "one.more.example" + "guardian" + "factdebug" + "ackermann" + "palindrome" + "fig.assign2" + "update" + "squareroot" + "bisectbug" + "strings" + "for" + "slice" + "fig.banana" + "find" + "counter" + "optional" + "inboth" + "fig.state4" + "isreverse" + "exrotate" + "wordplay" + "wordlist" + "search" + "sequence" + "mutable" + "fig.liststate" + "filter" + "equivalence" + "fig.list1" + "fig.list2" + "fig.list3" + "list.arguments" + "fig.stack5" + "cumulative" + "anagram" + "duplicate" + "wordlist1" + "bisection" + "histogram" + "raise" + "invert" + "fig.dict1" + "memoize" + "fig.fibonacci" + "wordlist2" + "setdefault" + "exrotatepairs" + "tuplechap" + "tuple.assignment" + "gather" + "dictuple" + "fig.tuple1" + "fig.dict2" + "anagrams" + "analysis" + "dictsub" + "randomwords" + "randhist" + "markov" + "paths" + "catch" + "modules" + "checksum" + "clobjects" + "point" + "attributes" + "fig.point" + "rectangles" + "fig.rectangle" + "copying" + "fig.rectangle2" + "hasattr" + "time" + "isafter" + "fig.time" + "increment" + "prototype" + "operator.overloading" + "polymorphism" + "kangaroo" + "class.attribute" + "fig.card1" + "comparecard" + "printdeck" + "class.diagram" + "fig.class1" + "poker" + "sets" + "algorithms" + "hashtable" + "fig.hash") + (TeX-add-symbols + '("Anchor" 1) + "thetitle" + "theversion" + "thedate" + "anchorcnt" + "mymapsto") + (TeX-run-style-hooks + "localdef" + "kotex" + "hyperref" + "bookmarks" + "appendix" + "upquote" + "hevea" + "setspace" + "makeidx" + "exercise" + "amsthm" + "amsmath" + "graphicx" + "fancyhdr" + "url" + "mathpazo" + "textcomp" + "" + "fontenc" + "T1" + "geometry" + "vmarginratio=1:1" + "hmarginratio=3:2" + "height=8.5in" + "width=5.5in" + "latex2e" + "bk10" + "10pt" + "latexonly"))) + diff --git a/book_kr/back.png b/book_kr/back.png new file mode 100644 index 0000000..9c88472 Binary files /dev/null and b/book_kr/back.png differ diff --git a/book_kr/book.tex b/book_kr/book.tex new file mode 100644 index 0000000..5480dc6 --- /dev/null +++ b/book_kr/book.tex @@ -0,0 +1,16917 @@ +% LaTeX source for ``Think Python: How to Think Like a Computer Scientist'' +% Copyright (c) 2015 Allen B. Downey. + +% License: Creative Commons Attribution-NonCommercial 3.0 Unported License. +% http://creativecommons.org/licenses/by-nc/3.0/ +% + +%\documentclass[10pt,b5paper]{book} +\documentclass[10pt]{book} +\usepackage[width=5.5in,height=8.5in,hmarginratio=3:2,vmarginratio=1:1]{geometry} + +% for some of these packages, you might have to install +% texlive-latex-extra (in Ubuntu) + +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{mathpazo} +\usepackage{url} +\usepackage{fancyhdr} +\usepackage{graphicx} +\usepackage{amsmath} +\usepackage{amsthm} +%\usepackage{amssymb} +\usepackage{exercise} % texlive-latex-extra +\usepackage{makeidx} +\usepackage{setspace} +\usepackage{hevea} +\usepackage{upquote} +\usepackage{appendix} +\usepackage[bookmarks]{hyperref} +\usepackage{kotex} + +\title{Think Python} +\author{Allen B. Downey} +\newcommand{\thetitle}{Think Python: How to Think Like a Computer Scientistn} +\newcommand{\theversion}{2nd Edition, Version 2.2.20} +\newcommand{\thedate}{} + +% these styles get translated in CSS for the HTML version +\newstyle{a:link}{color:black;} +\newstyle{p+p}{margin-top:1em;margin-bottom:1em} +\newstyle{img}{border:0px} + +% change the arrows +\setlinkstext + {\imgsrc[ALT="Previous"]{back.png}} + {\imgsrc[ALT="Up"]{up.png}} + {\imgsrc[ALT="Next"]{next.png}} + +\makeindex + +\newif\ifplastex +\plastexfalse + +\begin{document} + +\frontmatter + +% PLASTEX ONLY +\ifplastex + \usepackage{localdef} + \maketitle + +\newcount\anchorcnt +\newcommand*{\Anchor}[1]{% + \@bsphack% + \Hy@GlobalStepCount\anchorcnt% + \edef\@currentHref{anchor.\the\anchorcnt}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \M@gettitle{}\label{#1}% + \@esphack% +} + + +\else +% skip the following for plastex + +%\newtheorem{exercise}{Exercise}[chapter] +\newtheorem{exercise}{문제}[chapter] + +% LATEXONLY + +\input{latexonly} + +\begin{latexonly} + +\renewcommand{\blankpage}{\thispagestyle{empty} \quad \newpage} + +%\blankpage +%\blankpage + +% TITLE PAGES FOR LATEX VERSION + +%-half title-------------------------------------------------- +\thispagestyle{empty} + +\begin{flushright} +\vspace*{2.0in} + +\begin{spacing}{3} +{\huge Think Python}\\ +{\Large How to Think Like a Computer Scientist} +\end{spacing} + +\vspace{0.25in} + +\theversion + +\thedate + +\vfill + +\end{flushright} + +%--verso------------------------------------------------------ + +\blankpage +\blankpage +%\clearemptydoublepage +%\pagebreak +%\thispagestyle{empty} +%\vspace*{6in} + +%--title page-------------------------------------------------- +\pagebreak +\thispagestyle{empty} + +\begin{flushright} +\vspace*{2.0in} + +\begin{spacing}{3} +{\huge Think Python}\\ +{\Large How to Think Like a Computer Scientist} +\end{spacing} + +\vspace{0.25in} + +\theversion + +\thedate + +\vspace{1in} + + +{\Large +Allen Downey\\ +} + + +\vspace{0.5in} + +{\Large Green Tea Press} + +{\small Needham, Massachusetts} + +%\includegraphics[width=1in]{figs/logo1.pdf} +\vfill + +\end{flushright} + + +%--copyright-------------------------------------------------- +\pagebreak +\thispagestyle{empty} + +{\small +Copyright \copyright ~2015 Allen Downey. + + +\vspace{0.2in} + +\begin{flushleft} +Green Tea Press \\ +9 Washburn Ave \\ +Needham MA 02492 +\end{flushleft} + +Permission is granted to copy, distribute, and/or modify this document +under the terms of the Creative Commons Attribution-NonCommercial 3.0 Unported +License, which is available at \url{http://creativecommons.org/licenses/by-nc/3.0/}. + +The original form of this book is \LaTeX\ source code. Compiling this +\LaTeX\ source has the effect of generating a device-independent +representation of a textbook, which can be converted to other formats +and printed. + +The \LaTeX\ source for this book is available from +\url{http://www.thinkpython2.com} + +\vspace{0.2in} + +} % end small + +\end{latexonly} + + +% HTMLONLY + +\begin{htmlonly} + +% TITLE PAGE FOR HTML VERSION + +{\Large \thetitle} + +{\large Allen B. Downey} + +\theversion + +\thedate + +\setcounter{chapter}{-1} + +\end{htmlonly} + +\fi +% END OF THE PART WE SKIP FOR PLASTEX + + +\chapter{Preface} + +\section*{The strange history of this book} + +In January 1999 I was preparing to teach an introductory programming +class in Java. I had taught it three times and I was getting +frustrated. The failure rate in the class was too high and, even for +students who succeeded, the overall level of achievement was too low. + +One of the problems I saw was the books. +They were too big, with too much unnecessary detail about Java, and +not enough high-level guidance about how to program. And they all +suffered from the trap door effect: they would start out easy, +proceed gradually, and then somewhere around Chapter 5 the bottom would +fall out. The students would get too much new material, too fast, +and I would spend the rest of the semester picking up the pieces. + +Two weeks before the first day of classes, I decided to write my +own book. My goals were: + +\begin{itemize} + +\item Keep it short. It is better for students to read 10 pages +than not read 50 pages. + +\item Be careful with vocabulary. I tried to minimize jargon +and define each term at first use. + +\item Build gradually. To avoid trap doors, I took the most difficult +topics and split them into a series of small steps. + +\item Focus on programming, not the programming language. I included +the minimum useful subset of Java and left out the rest. + +\end{itemize} + +I needed a title, so on a whim I chose {\em How to Think Like +a Computer Scientist}. + +My first version was rough, but it worked. Students did the reading, +and they understood enough that I could spend class time on the hard +topics, the interesting topics and (most important) letting the +students practice. + +I released the book under the GNU Free Documentation License, +which allows users to copy, modify, and distribute the book. +\index{GNU Free Documentation License} +\index{Free Documentation License, GNU} + +What happened next is the cool part. Jeff Elkner, a high school +teacher in Virginia, adopted my book and translated it into +Python. He sent me a copy of his translation, and I had the +unusual experience of learning Python by reading my own book. +As Green Tea Press, I published the first Python version in 2001. +\index{Elkner, Jeff} + +In 2003 I started teaching at Olin College and I got to teach +Python for the first time. The contrast with Java was striking. +Students struggled less, learned more, worked on more interesting +projects, and generally had a lot more fun. +\index{Olin College} + +Since then I've continued to develop the book, +correcting errors, improving some of the examples and +adding material, especially exercises. + +The result is this book, now with the less grandiose title +{\em Think Python}. Some of the changes are: + +\begin{itemize} + +\item I added a section about debugging at the end of each chapter. + These sections present general techniques for finding and avoiding + bugs, and warnings about Python pitfalls. + +\item I added more exercises, ranging from short tests of + understanding to a few substantial projects. Most exercises + include a link to my solution. + +\item I added a series of case studies---longer examples with + exercises, solutions, and discussion. + +\item I expanded the discussion of program development plans + and basic design patterns. + +\item I added appendices about debugging and analysis of algorithms. + +\end{itemize} + +The second edition of {\em Think Python} has these new features: + +\begin{itemize} + +\item The book and all supporting code have been updated to Python 3. + +\item I added a few sections, and more details on the web, to help +beginners get started running Python in a browser, so you don't have +to deal with installing Python until you want to. + +\item For Chapter~\ref{turtle} I switched from my own turtle graphics + package, called Swampy, to a more standard Python module, {\tt + turtle}, which is easier to install and more powerful. + +\item I added a new chapter called ``The Goodies'', which introduces +some additional Python features that are not strictly necessary, but +sometimes handy. + +\end{itemize} + +I hope you enjoy working with this book, and that it helps +you learn to program and think like +a computer scientist, at least a little bit. + + +Allen B. Downey \\ + +Olin College \\ + + +\section*{Acknowledgments} + +Many thanks to Jeff Elkner, who +translated my Java book into Python, which got this project +started and introduced me to what has turned out to be my +favorite language. +\index{Elkner, Jeff} + +Thanks also to Chris Meyers, who contributed several sections +to {\em How to Think Like a Computer Scientist}. +\index{Meyers, Chris} + +Thanks to the Free Software Foundation for developing +the GNU Free Documentation License, which helped make +my collaboration with Jeff and Chris possible, and Creative +Commons for the license I am using now. +\index{GNU Free Documentation License} +\index{Free Documentation License, GNU} +\index{Creative Commons} + +Thanks to the editors at Lulu who worked on +{\em How to Think Like a Computer Scientist}. + +Thanks to the editors at O'Reilly Media who worked on +{\em Think Python}. + +Thanks to all the students who worked with earlier +versions of this book and all the contributors (listed +below) who sent in corrections and suggestions. + + +\section*{Contributor List} + +\index{contributors} +More than 100 sharp-eyed and thoughtful readers have sent in +suggestions and corrections over the past few years. Their +contributions, and enthusiasm for this project, have been a +huge help. + +If you have a suggestion or correction, please send email to +{\tt feedback@thinkpython.com}. If I make a change based on your +feedback, I will add you to the contributor list +(unless you ask to be omitted). + +If you include at least part of the sentence the +error appears in, that makes it easy for me to search. Page and +section numbers are fine, too, but not quite as easy to work with. +Thanks! + +\begin{itemize} + +\small +\item Lloyd Hugh Allen sent in a correction to Section 8.4. + +\item Yvon Boulianne sent in a correction of a semantic error in +Chapter 5. + +\item Fred Bremmer submitted a correction in Section 2.1. + +\item Jonah Cohen wrote the Perl scripts to convert the +LaTeX source for this book into beautiful HTML. + +\item Michael Conlon sent in a grammar correction in Chapter 2 +and an improvement in style in Chapter 1, and he initiated discussion +on the technical aspects of interpreters. + +\item Benoit Girard sent in a +correction to a humorous mistake in Section 5.6. + +\item Courtney Gleason and Katherine Smith wrote {\tt horsebet.py}, +which was used as a case study in an earlier version of the book. Their +program can now be found on the website. + +\item Lee Harr submitted more corrections than we have room to list +here, and indeed he should be listed as one of the principal editors +of the text. + +\item James Kaylin is a student using the text. He has submitted +numerous corrections. + +\item David Kershaw fixed the broken {\tt catTwice} function in Section +3.10. + +\item Eddie Lam has sent in numerous corrections to Chapters +1, 2, and 3. +He also fixed the Makefile so that it creates an index the first time it is +run and helped us set up a versioning scheme. + +\item Man-Yong Lee sent in a correction to the example code in +Section 2.4. + +\item David Mayo pointed out that the word ``unconsciously" +in Chapter 1 needed +to be changed to ``subconsciously". + +\item Chris McAloon sent in several corrections to Sections 3.9 and +3.10. + +\item Matthew J. Moelter has been a long-time contributor who sent +in numerous corrections and suggestions to the book. + +\item Simon Dicon Montford reported a missing function definition and +several typos in Chapter 3. He also found errors in the {\tt increment} +function in Chapter 13. + +\item John Ouzts corrected the definition of ``return value" +in Chapter 3. + +\item Kevin Parks sent in valuable comments and suggestions as to how +to improve the distribution of the book. + +\item David Pool sent in a typo in the glossary of Chapter 1, as well +as kind words of encouragement. + +\item Michael Schmitt sent in a correction to the chapter on files +and exceptions. + +\item Robin Shaw pointed out an error in Section 13.1, where the +printTime function was used in an example without being defined. + +\item Paul Sleigh found an error in Chapter 7 and a bug in Jonah Cohen's +Perl script that generates HTML from LaTeX. + +\item Craig T. Snydal is testing the text in a course at Drew +University. He has contributed several valuable suggestions and corrections. + +\item Ian Thomas and his students are using the text in a programming +course. They are the first ones to test the chapters in the latter half +of the book, and they have made numerous corrections and suggestions. + +\item Keith Verheyden sent in a correction in Chapter 3. + +\item Peter Winstanley let us know about a longstanding error in +our Latin in Chapter 3. + +\item Chris Wrobel made corrections to the code in the chapter on +file I/O and exceptions. + +\item Moshe Zadka has made invaluable contributions to this project. +In addition to writing the first draft of the chapter on Dictionaries, he +provided continual guidance in the early stages of the book. + +\item Christoph Zwerschke sent several corrections and +pedagogic suggestions, and explained the difference between {\em gleich} +and {\em selbe}. + +\item James Mayer sent us a whole slew of spelling and +typographical errors, including two in the contributor list. + +\item Hayden McAfee caught a potentially confusing inconsistency +between two examples. + +\item Angel Arnal is part of an international team of translators +working on the Spanish version of the text. He has also found several +errors in the English version. + +\item Tauhidul Hoque and Lex Berezhny created the illustrations +in Chapter 1 and improved many of the other illustrations. + +\item Dr. Michele Alzetta caught an error in Chapter 8 and sent +some interesting pedagogic comments and suggestions about Fibonacci +and Old Maid. + +\item Andy Mitchell caught a typo in Chapter 1 and a broken example +in Chapter 2. + +\item Kalin Harvey suggested a clarification in Chapter 7 and +caught some typos. + +\item Christopher P. Smith caught several typos and helped us +update the book for Python 2.2. + +\item David Hutchins caught a typo in the Foreword. + +\item Gregor Lingl is teaching Python at a high school in Vienna, +Austria. He is working on a German translation of the book, +and he caught a couple of bad errors in Chapter 5. + +\item Julie Peters caught a typo in the Preface. + +\item Florin Oprina sent in an improvement in {\tt makeTime}, +a correction in {\tt printTime}, and a nice typo. + +\item D.~J.~Webre suggested a clarification in Chapter 3. + +\item Ken found a fistful of errors in Chapters 8, 9 and 11. + +\item Ivo Wever caught a typo in Chapter 5 and suggested a clarification +in Chapter 3. + +\item Curtis Yanko suggested a clarification in Chapter 2. + +\item Ben Logan sent in a number of typos and problems with translating +the book into HTML. + +\item Jason Armstrong saw the missing word in Chapter 2. + +\item Louis Cordier noticed a spot in Chapter 16 where the code +didn't match the text. + +\item Brian Cain suggested several clarifications in Chapters 2 and 3. + +\item Rob Black sent in a passel of corrections, including some +changes for Python 2.2. + +\item Jean-Philippe Rey at Ecole Centrale +Paris sent a number of patches, including some updates for Python 2.2 +and other thoughtful improvements. + +\item Jason Mader at George Washington University made a number +of useful suggestions and corrections. + +\item Jan Gundtofte-Bruun reminded us that ``a error'' is an error. + +\item Abel David and Alexis Dinno reminded us that the plural of +``matrix'' is ``matrices'', not ``matrixes''. This error was in the +book for years, but two readers with the same initials reported it on +the same day. Weird. + +\item Charles Thayer encouraged us to get rid of the semi-colons +we had put at the ends of some statements and to clean up our +use of ``argument'' and ``parameter''. + +\item Roger Sperberg pointed out a twisted piece of logic in Chapter 3. + +\item Sam Bull pointed out a confusing paragraph in Chapter 2. + +\item Andrew Cheung pointed out two instances of ``use before def''. + +\item C. Corey Capel spotted the missing word in the Third Theorem +of Debugging and a typo in Chapter 4. + +\item Alessandra helped clear up some Turtle confusion. + +\item Wim Champagne found a brain-o in a dictionary example. + +\item Douglas Wright pointed out a problem with floor division in +{\tt arc}. + +\item Jared Spindor found some jetsam at the end of a sentence. + +\item Lin Peiheng sent a number of very helpful suggestions. + +\item Ray Hagtvedt sent in two errors and a not-quite-error. + +\item Torsten H\"{u}bsch pointed out an inconsistency in Swampy. + +\item Inga Petuhhov corrected an example in Chapter 14. + +\item Arne Babenhauserheide sent several helpful corrections. + +\item Mark E. Casida is is good at spotting repeated words. + +\item Scott Tyler filled in a that was missing. And then sent in +a heap of corrections. + +\item Gordon Shephard sent in several corrections, all in separate +emails. + +\item Andrew Turner {\tt spot}ted an error in Chapter 8. + +\item Adam Hobart fixed a problem with floor division in {\tt arc}. + +\item Daryl Hammond and Sarah Zimmerman pointed out that I served +up {\tt math.pi} too early. And Zim spotted a typo. + +\item George Sass found a bug in a Debugging section. + +\item Brian Bingham suggested Exercise~\ref{exrotatepairs}. + +\item Leah Engelbert-Fenton pointed out that I used {\tt tuple} +as a variable name, contrary to my own advice. And then found +a bunch of typos and a ``use before def''. + +\item Joe Funke spotted a typo. + +\item Chao-chao Chen found an inconsistency in the Fibonacci example. + +\item Jeff Paine knows the difference between space and spam. + +\item Lubos Pintes sent in a typo. + +\item Gregg Lind and Abigail Heithoff suggested Exercise~\ref{checksum}. + +\item Max Hailperin has sent in a number of corrections and + suggestions. Max is one of the authors of the extraordinary {\em + Concrete Abstractions}, which you might want to read when you are + done with this book. + +\item Chotipat Pornavalai found an error in an error message. + +\item Stanislaw Antol sent a list of very helpful suggestions. + +\item Eric Pashman sent a number of corrections for Chapters 4--11. + +\item Miguel Azevedo found some typos. + +\item Jianhua Liu sent in a long list of corrections. + +\item Nick King found a missing word. + +\item Martin Zuther sent a long list of suggestions. + +\item Adam Zimmerman found an inconsistency in my instance +of an ``instance'' and several other errors. + +\item Ratnakar Tiwari suggested a footnote explaining degenerate +triangles. + +\item Anurag Goel suggested another solution for \verb"is_abecedarian" +and sent some additional corrections. And he knows how to +spell Jane Austen. + +\item Kelli Kratzer spotted one of the typos. + +\item Mark Griffiths pointed out a confusing example in Chapter 3. + +\item Roydan Ongie found an error in my Newton's method. + +\item Patryk Wolowiec helped me with a problem in the HTML version. + +\item Mark Chonofsky told me about a new keyword in Python 3. + +\item Russell Coleman helped me with my geometry. + +\item Nam Nguyen found a typo and pointed out that I used the Decorator +pattern but didn't mention it by name. + +\item St\'{e}phane Morin sent in several corrections and suggestions. + +\item Paul Stoop corrected a typo in \verb+uses_only+. + +\item Eric Bronner pointed out a confusion in the discussion of the +order of operations. + +\item Alexandros Gezerlis set a new standard for the number and +quality of suggestions he submitted. We are deeply grateful! + +\item Gray Thomas knows his right from his left. + +\item Giovanni Escobar Sosa sent a long list of corrections and +suggestions. + +\item Daniel Neilson corrected an error about the order of operations. + +\item Will McGinnis pointed out that {\tt polyline} was defined +differently in two places. + +\item Frank Hecker pointed out an exercise that was under-specified, and +some broken links. + +\item Animesh B helped me clean up a confusing example. + +\item Martin Caspersen found two round-off errors. + +\item Gregor Ulm sent several corrections and suggestions. + +\item Dimitrios Tsirigkas suggested I clarify an exercise. + +\item Carlos Tafur sent a page of corrections and suggestions. + +\item Martin Nordsletten found a bug in an exercise solution. + +\item Sven Hoexter pointed out that a variable named {\tt input} +shadows a build-in function. + +\item Stephen Gregory pointed out the problem with {\tt cmp} +in Python 3. + +\item Ishwar Bhat corrected my statement of Fermat's last theorem. + +\item Andrea Zanella translated the book into Italian, and sent a +number of corrections along the way. + +\item Many, many thanks to Melissa Lewis and Luciano Ramalho for + excellent comments and suggestions on the second edition. + +\item Thanks to Harry Percival from PythonAnywhere for his help +getting people started running Python in a browser. + +\item Xavier Van Aubel made several useful corrections in the second +edition. + +\item William Murray corrected my definition of floor division. + +% ENDCONTRIB + +In addition, people who spotted typos or made corrections include +Czeslaw Czapla, +Richard Fursa, Brian McGhie, Lokesh Kumar Makani, Matthew Shultz, Viet +Le, Victor Simeone, Lars O.D. Christensen, Swarup Sahoo, Alix Etienne, +Kuang He, Wei Huang, Karen Barber, and Eric Ransom. + + + + +\end{itemize} + +\normalsize +\clearemptydoublepage + +% TABLE OF CONTENTS +\begin{latexonly} + +\tableofcontents + +\clearemptydoublepage + +\end{latexonly} + +% START THE BOOK +\mainmatter + +\chapter{프로그래밍의 정도} +%The way of the program + +이 책의 목적은 컴퓨터 과학자처럼 생각하는 방법을 알려주는 것이다. 그 +과정에는 수학과 공학 그리고 자연 과학의 몇 가지 대표적인 요소들을 +통합한다. 수학자들처럼 컴퓨터 과학자들도 아이디어(구체적으로는 +연산들)를 표현하기 위해 형식을 갖춘 언어를 사용한다. 공학자들처럼 +무엇인가를 설계하고 요소들을 조립하여 시스템을 만들기도 하며 대안들을 +평가하여 타협점을 찾는다. 과학자들처럼 복잡한 시스템들의 동작을 +관찰하고 가설을 세워서 예측치를 실험한다. \index{problem solving} + + +컴퓨터 과학자에게 있어서 가장 중요한 기술은 {\bf 문제 해결}이다. 문제 +해결이라는 것은 문제를 정의한 후 해답을 찾기 위해 창의적으로 생각하여 +얻은 해답을 정확하고 명료하게 표현하는 것이다. 나중에 알게 되겠지만, +프로그래밍을 배우는 과정은 문제 해결 능력을 키우는 최고의 기회이다. +그래서, 이 장의 제목을 ``프로그래밍의 정도''라 지었다. + + +어떤 수준에서는 프로그래밍을 배우게 될 것이다. 그 자체로도 매우 유용한 +기술이다. 또 다른 수준에서는 프로그래밍이 수단이 될 것이다. 계속 +따라오다 보면 프로그래밍이 수단이 된다는 것이 명확해질 것이다. + + +\section{프로그램이란 무엇인가?} +%What is a program? + +{\bf 프로그램}이란 명령들의 순서로서 어떤 방식으로 연산할지 +정한다. 연산은 수식을 풀어내는 것이나 다항식의 해를 구하는 것처럼 +수학적일 수도 있지만 문서의 어떤 글을 찾거나 교체한다거나 이미지 처리나 +동영상을 재생하는 것처럼 상징적인 연산일 수도 있다. \index{program} + + +세부적인 것은 언어마다 다르겠지만 몇 가지 기본적인 명령들은 거의 모든 +언어에 나타난다: + + +\begin{description} +\item[입력(input):] 키보드나 파일, 네트워크나 다른 장치로부터 데이터를 + 받는다. +\item[출력(output):] 데이터를 화면에 표시하거나 파일에 저장 또는 + 네트워크로 전송 등을 한다. +\item[계산(math):] 덧셈과 곱셉과 같은 기본적인 수학적 연산을 한다. +\item[조건부 실행(conditional execution):] 조건을 확인하여 적절한 + 코드를 실행한다. +\item[반복(repetition):] 대체적으로 약간의 변형을 포함하는 어떤 행동을 + 반복적으로 수행한다. +\end{description} + +믿거나 말거나, 지금 열거한 내용이 거의 전부이다. 지금까지 사용했었던 +모든 프로그램이 얼마나 복잡하든 이러한 명령들로 이루어져있다. 그렇기 +때문에 프로그래밍이란 것은 크고 복잡한 어떤 작업을 이런 기본 명령들로 +동작 가능한 단위들로 작게 자르는 일이라고 보면 된다. + + + +\section{Python 실행하기} +%Running Python} + +Python을 시작하는데 있어서 도전거리 중의 하나는 Python과 관련 +소프트웨어를 컴퓨터에 설치해야 할 수도 있다는 것이다. 현재 사용하는 +운영체제와 익숙하다면, 특히 명령줄 기반의 인터페이스와 익숙하다면, Python을 설치하는데 전혀 어려움이 없을 것이다. 하지만, 초보자라면 시스템 관리와 프로그래밍을 동시에 배워야 한다는 것이 고통스러울 수 있다. +\index{running Python} +\index{Python!running} + +이 문제를 해결하기 위해서 Python을 브라우저에서 시작하기를 추천한다. 나중에는 Python과 익숙해졌을 즈음에 컴퓨터에 Python을 설치하는 것을 권하도록 하겠다. +\index{Python in a browser} + +Python을 실행할 수 있는 여러 웹 페이지들이 있다. 이미 자주 사용해왔던 사이트가 있다면 그것을 사용해도 된다. 만약 없었다면 PhythonAnywher라는 곳을 추천한다. 이 URL(\url{http://tinyurl.com/thinkpython2e})에 시작하기 위한 상세한 정보를 설명해 놓았다. +\index{PythonAnywhere} + +Python에는 두 개의 버전이 있다. Python 2와 Python 3 이다. 둘은 매우 유사하여 하나를 배우면 다른 하나로 이동하는 것은 쉽다. 사실 초보자 입장에서는 별반 차이가 없다. 이 책은 Phython 3로 작성되어 있지만, Python 2에 대하여 메모를 남겨 놓기는 했다. +\index{Python 2} + +Pthon {\bf 인터프리터(interpreter)}는 Python 코드를 읽고 실행하는 +프로그램이다. 환경에 따라 인터프리터를 아이콘을 클릭하거나 명령줄에 +{\tt phtyon}을 입력해서 시작할 수도 있다. 시작하면 다음과 같은 출력을 +보게 될 것이다. +\index{interpreter} + +\begin{verbatim} +Python 3.4.0 (default, Jun 19 2015, 14:20:21) +[GCC 4.8.2] on linux +Type "help", "copyright", "credits" or "license" for more information. +>>> +\end{verbatim} +% +처음 세 줄은 인터프리터에 대한 정보와 사용 중인 운영체제를 나타내기 +때문에 환경에 따라 다르게 나타날 수 있다. 하지만, 버전은 확인해야 +한다. 이 예제에서는 {\tt 3.4.0}으로 되어 있고, 3으로 시작한다. 즉, +Python 3을 실행 중이라는 것을 뜻한다. 만약 2로 시작한다면 (예상한 +것처럼) Python 2를 실행중이다. + +마지막 줄은 {\bf 프롬프트(prompt)}로서 인터프리터가 코드를 입력받을 +준비가 되었다는 것을 뜻한다. 코드 한 줄을 쓰고 엔터를 치면 +인터프리터가 결과를 보여준다. +\index{prompt} + +\begin{verbatim} +>>> 1 + 1 +2 +\end{verbatim} +% +이제 시작할 준비가 되었다. 이제부터는 Python 인터프리터를 시작하는 +방법과 코드를 실행하는 방법을 안다고 가정하겠다. + + +\section{최초의 프로그램} +\label{hello} +\index{Hello, World} + +전통적으로 새로운 언어를 사용하여 작성하는 최초의 프로그램을 ``Hello, +World!''라고 부른다. ``Hello, World!''라고 표시하는 것이 전부인 프로그램이기 때문이다. Python으로 만든 이 프로그램은 다음과 같다. + + +\begin{verbatim} +>>> print('Hello, World!') +\end{verbatim} +% +이것은 {\bf print 문}의 예제이다. 실제 종이 인쇄하는 것이 아니고 +화면에 결과를 표시한다. 이 경우에는 결과는 다음의 단어들이다. + +\begin{verbatim} +Hello, World! +\end{verbatim} +% +프로그램에 사용된 따옴표가 표시될 글씨의 시작과 끝을 나타내며 결과에는 +표시되지 않는다. +\index{quotation mark} +\index{print statement} +\index{statement!print} + +괄호는 {\tt print}가 함수라는 것을 나타낸다. 함수에 대해서는 +\ref{funcchap} 장에서 다룰 것이다. +\index{function} \index{print function} + +Python 2에서는 \texttt{print}문은 함수가 아니라서 괄호를 사용하지 +않는다는 것이 약간 다르다. +\index{Python 2} + +\begin{verbatim} +>>> print 'Hello, World!' +\end{verbatim} +% +이러한 차이는 차차 이해하게 될 것이다. 하지만 이 정도만 알아도 +시작하는데는 충분하다. + + +\section{Arithmetic operators} +\index{operator!arithmetic} +\index{arithmetic operator} + +``Hello, World'' 다음으로 해 볼 것은 산수이다. Python은 덧셈과 곱셉의 +연산을 나타내는 특수한 기호들을 {\bf 연산자(operators)}를 제공한다. + +{\tt +}와 {\tt -} 그리고 {\tt *} 연산자는 덧셈과 뺄셈 그리고 곱셉을 +나타낸다. 다음의 예제를 살펴보자. + +\begin{verbatim} +>>> 40 + 2 +42 +>>> 43 - 1 +42 +>>> 6 * 7 +42 +\end{verbatim} +% +{\tt /} 연산자로 나눗셈을 할 수 있다. + +\begin{verbatim} +>>> 84 / 2 +42.0 +\end{verbatim} +% +이 계산의 결과가 왜 {\tt 42}이 아니고 {\tt 42.0}인지 궁금할 +것이다. 그것에 대해서는 다음 절에서 설명하도록 하겠다. + +마지막으로 {\tt **} 연산자는 거듭제곱을 계산할 때 사용된다. 그 수를 +지수로 사용한다. + +\begin{verbatim} +>>> 6**2 + 6 +42 +\end{verbatim} +% +어떤 언어들에서는 \verb"^"가 거듭제곱 연산에 사용되기도 하지만 +Python에서는 그 기호는 비트단위의 연산자인 \texttt{XOR}을 +나타낸다. 비트단위 연산자들이 익숙하지 않다면 연산 결과에 놀라워할 +것이다. + +\begin{verbatim} +>>> 6 ^ 2 +4 +\end{verbatim} +% +이 책에서는 비트단위 연산자들에 대해서는 다루지 않겠지만, 더 알고 +싶다면 \url{http://wiki.python.org/moin/BitwiseOperators}에서 읽을 수 +있다. +\index{bitwise operator} +\index{operator!bitwise} + + +\section{값과 형} +%Values and types +\index{value} +\index{type} +\index{string} + +{\bf 값(value)}은 프로그램이 다루는 글자와 숫자와 같은 기본적인 것 중 +하나이다. 지금까지 본 것 중에는 {\tt 2}, {\tt 42.0} 그리고 +\verb"'Hello, World!'"가 있다. + +이 값들은 서로 다른 {\bf 형(type)}에 속한다: {\tt 2}은 {\bf + 정수(integer)}형, {\tt 42.0}은 {\bf 부동 소수점(floating-point)}형의 +숫자이다. \verb"'Hello, World!'"는 {\bf 문자열(string)}형으로 불리는데 +마치 글자들이 줄에 매달린 듯하기 때문이다. +\index{integer} +\index{floating-point} + +만약에 값이 어떤 형인지 알고 싶다면, 인터프리터가 알려줄 수 있다: + +\begin{verbatim} +>>> type(2) + +>>> type(42.0) + +>>> type('Hello, World!') + +\end{verbatim} +% +이 결과들을 보면 ``클래스(class)''라는 단어가 종류 또는 범주를 나타내는 +의미로 사용되고 있음을 알 수 있다. 형이라는 것은 값의 종류이다. +\index{class} + +놀랍지않게도, 정수는 {\tt int} 형에 속해있고 문자열은 {\tt str}에 +속했으며 부동 소수점은 {\tt float}에 속해 있다. +\index{type} +\index{string type} +\index{type!str} +\index{int type} +\index{type!int} +\index{float type} +\index{type!float} + +그러면 \verb"'2'"나 \verb"'42.0'"과 같은 값들은 어떤 형을 갖을까? +숫자처럼 보이지만 따옴표 안에 있기 때문에 문자열 형에 속한다. +\index{quotation mark} + +\begin{verbatim} +>>> type('2') + +>>> type('42.0') + +\end{verbatim} +% +확인한 것처럼 문자열이다. + +매우 큰 정수를 입력할 때 {\tt 1,000,000}처럼 숫자 사이에 쉼표를 넣고 싶은 유혹이 일 수도 있다. 이와 같은 표현은 유효한 {\em 정수}형은 아니기는 하지만, Python에서 유효한 표현이기는 하다: + +\begin{verbatim} +>>> 1,000,000 +(1, 0, 0) +\end{verbatim} +% +이 결과는 우리가 기대한 것이 전혀 아니다! Python은 {\tt 1,000,000}을 +쉼표로 구분된 수열로 해석한다. 이와 같은 수열에 대해서는 +이후에 더 자세히 살펴보도록 하겠다. +\index{sequence} + +%This is the first example we have seen of a semantic error: the code +%runs without producing an error message, but it doesn't do the +%``right'' thing. +%\index{semantic error} +%\index{error!semantic} +%\index{error message} +% TODO: use this as an example of a semantic error later + + + +\section{형식 언어 그리고 자연어} +%Formal and natural languages +\index{formal language} +\index{natural language} +\index{language!formal} +\index{language!natural} + +{\bf 자연어(Natural language)}는 사람들이 말하는 영어, 스페인어와 +프랑스어와 같은 언어이다. 사람들에 의해 설계된 것은 아니지만(사람들이 +언어에 대해 체계를 정립하기는하였지만) 언어는 자연적으로 발달되었다. + +{\bf 형식 언어(Formal language)}는 특정 응용처를 위해서 사람들이 설계한 +것이다. 예를 들어 수학자들이 사용하는 표기법이 형식 언어의 일종으로 +숫자와 기호들의 관계를 나타내기에 좋다. 화학자들은 형식언어를 사용하여 +분자들의 화학 구조를 나타낸다. 그리고 가장 중요한 것은: + +\begin{quote} +{\bf 프로그래밍 언어는 연산을 표현하기 위해 설계된 형식 언어이다. } +\end{quote} + +형식 언어는 문장의 구조를 결정하는 엄격한 {\bf 문법(syntax)} 규칙을 갖고 있다. +예를 들어 수학에서 $3 + 3 = 6$이라는 문장은 올바른 문법으로 작성되었지만 $3 + = 3 \$ 6$은 그렇지 않다. 화학에서는 $H_2O$는 문법적으로 올바른 식이지만 $_2Zz$은 아니다. +\index{syntax} + +문법 규칙은 {\bf 토큰(token)}과 구조의 두 형태를 갖고 있다. 토큰은 +언어의 기본적인 구성 요소로서 단어나 숫자 그리고 화학에서의 원소들과 +같은 것이다. $3 += 3 \$ 6$라는 식에서의 문제점은 \( \$ \)이 (최소한 +내가 알기로는) 수학에서 유효한 토큰은 아니라는 것이다. 유사하게 +$_2Zz$도 유효하지 않다. $Zz$를 약어로 갖는 원소가 없기 때문이다. +\index{token} +\index{structure} + +두 번째 종류의 문법 규칙은 토큰들을 결합하는 것과 관련이 있다. $3 += +3$는 규칙에 어긋난다. 이 식에서 $+$와 $=$이 유효한 토큰이기는 하지만 +연이어서 두 개를 사용할 수가 없다. 화학 식에서도 마찬가지로 아래 첨자는 +이름 뒤에 나타나지 그 앞에 나타나지 않는다. + +이 문장은 @ 구조적으로 잘 정의되었z만 유효하지 않은 t*ken이 +사용되었다. 이 문장의 토큰은 모두 유효하지만 갖고 있다 구조를 잘못된. + +모국어로 문장을 읽거나 형식 언어로 문장을 읽을 때에는 그 구조를 +파악해야 한다(자연어를 파악하는 과정은 무의식적으로 일어나기는 한다). +프로그래밍에서 구조를 파악하는 과정을 {\bf 파싱(parsing)}이라고 +부른다. +\index{parse} + +형식 언어와 자연어 사이에는 토큰과 구조 그리고 문법과 같은 많은 공통적 기능들이 있지만 차이점도 분명하다: +\index{ambiguity} +\index{redundancy} +\index{literalness} + +\begin{description} + +\item[모호성(ambiguity):] 자연어는 모호하기 때문에 맥락과 다른 정보들을 + 통해 이해를 한다. 형식 언어의 경우 거의 또는 완전하게 그 모호성의 + 없애도록 설계되었기 때문에 문맥과 상관없이 유일한 의미를 갖고 있다. + +\item[중복성(redundancy):] 자연어가 갖고 있는 모호성을 없애고 오해를 + 줄이기 위해서 엄청난 중복성을 허용하고 있다. 그 결과로 인해 + 장황해지기 쉽다. 형식 언어는 훨씬 간결하다. + +\item[직역성(literalness):] 자연어는 숙어와 은유적 표현으로 + 넘쳐난다. ``The penny doppred(돈 떨어졌다)''라고 말을 하면 실제 뜻은 + 돈에 관한 것도 아니고 실제로 무언가가 떨어지는 것도 아니다(이 숙어는 + 뜻은 `이제야 알아 들었다'는 것이다). 형식 언어에서는 말하는 그대로가 + 의도한 뜻한다. + +\end{description} + +자라면서 자연어를 구사하였기 때문에 형식 언어에 익숙해지는데 많은 시간이 걸리곤 한다. 자연어와 형식 언어간의 차이는 시와 산문 간의 차이와도 유사하다. + \index{poetry} \index{prose} + +\begin{description} + +\item[시:] 사용되는 단어의 소리도 그 단어의 의미만큼 중요하며, 시 전체 + 봐야만 어떤 감정적 반응을 하거나 또는 영향을 느낄 수가 있다. + 애매모호한 표현이 흔할 뿐만 아니라 의도된 것일 때도 있다. + +\item[산문:] 단어가 갖고 있는 의미가 좀 더 중요하다. 그렇기 때문에 + 구조에 의미가 더 많이 담겨 있다. 산문은 시보다는 분석하기에 더 + 쉽기는 하지만 모호할 때가 많다. + +\item[프로그램:] 컴퓨터 프로그램의 의미는 모호하지 않아며 문자적으로 + 이해할 수 있어서 구조와 토큰을 분석하는 것만으로 모든 것을 이해할 수 + 있다. + +\end{description} + +형식 언어는 자연어보다 좀 더 난해해서 읽는데 오래 걸린다. 또한, 구조가 +중요하기 때문에 위에서 아래로 왼쪽에서 오른쪽으로 읽는 것이 늘 최선의 +방식은 아니다. 대신에 프로그램을 상상의 공간에서 분석하고 토큰은 +구별해 내고 구조를 해석하는 방법을 익혀야 한다. 마지막으로 세부사항이 +중요하다. 철자나 구두점의 표기를 잘못하는 것과 같은 작은 실수를 +자연어에서는 지나쳐도 문제가 되지 않았겠지만 형식 언어에서는 큰 차이를 +만들어 낸다. + + +\section{디버깅} +%Debugging +\index{debugging} + +프로그래머들은 실수를 한다. 황당하게도 프로그래밍 오류를 {\bf + 버그(bug)}라고 부르고 그것들을 해결하는 과정을 {\bf + 디버깅(debugging)}이라고 부른다. +\index{debugging} +\index{bug} + +프로그래밍과 특히 디버깅 때문에 감정이 격해질 수가 있다. 매우 어려운 +버그로 고생을 하고 있다면 화가나거나 무기력해지기도 또는 당혹스러워질 +수도 있다. + +사람들이 컴퓨터를 대할 때 아주 자연스럽게 컴퓨터가 마치 사람인양 +대한다는 결과들이 있다. 잘 동작한다면 한 팀원으로 여기기도 하고 +외고집스럽고 무례할 정도로 말을 안듯는다면 그런 사람을 대하는 것과 +동일하게 대한다고 한다(Reeves와 Nass, {\it The Media Equation: How + People Treat Computers, Television, and New Media Like Real People + and Places}). +\index{debugging!emotional response} +\index{emotional debugging} + +이와 같은 경우에 대응하는 방법들을 미리 생각해 놓는 것이 이후에 그런 +일들을 당했을 때 대처하기가 쉬워진다. 한 가지 방법은 컴퓨터를 마치 +일정한 능력을, 예를 들어 속도와 정확도, 갖고 있지만 공감 능력과 전체를 +보는 시각이 전혀 없는 직원이라고 생각하면 된다. + +당신이 할 일은 좋은 관리자가 되는 것이다: 직원의 장점을 파악하고 단점을 +완화시켜주는 것이다. 그 후에 할 일은 문제 해결 과정에서 말 안듣는 +컴퓨터와 감정적 씨름을 하는 대신 작업을 효율적으로 처리할 수 있는 +방법들을 찾아야 한다. + +디버깅 방법을 배우는 것은 좌절스러운 경험이 될 수 있겠지만, 이 기술은 +프로그래밍 외에도 여러 방면에서 적용할 수 있는 매우 가치 있는 +기술이기도 하다. 각 장의 끝에 있는 절에는 디버깅에 대한 조언이 적혀 +있다. 도움이 되길 바란다! + + +\section{용어 해설} + +\begin{description} + +\item[문제 해결(Problem solving):] 문제를 정의하고 해법을 찾고 표현하는 과정. +\index{problem solving} + +\item[고수준 언어(high-level language):] Python과 같은 언어로 사람이 + 읽고 쓰기 쉽게 설계된 언어. +\index{high-level language} + +\item[저수준 언어(low-level language):] 컴퓨터가 실행시키기 쉽게 설계된 + 프로그램 언어로서 ``기계어'' 또는 ``어셈블리어''라고도 불림. +\index{low-level language} + +\item[이식성(portatiblity):] 한 종류의 컴퓨터 이상에서 프로그램이 실행 가능한 성질. +\index{portability} + +\item[해석 프로그램(인터프리터/interpreter):] 프로그램을 읽고 실행시키는 프로그램. +\index{interpret} + +\item[프롬프트(prompt):] 사용자로부터 입력을 받을 준비가 되었다는 것을 + 알려주기 위한 인터프리터가 표시하는 글자들. +\index{prompt} + +\item[프로그램(program):] 연산을 지정해놓은 명령어들의 집합. +\index{program} + +\item[print 문(print statment):] Python 인터프리터가 화면에 어떤 값을 + 표시하도록 하는 명령어. +\index{print statement} +\index{statement!print} + +\item[연산자(operator):] 덧셈, 곱셉, 또는 문자열 연결과 같은 간단한 + 연산을 뜻하는 특수 기호 +\index{operator} + +\item[값(value):] 프로그램이 조작하는 숫자나 문자열 데이터의 기본 단위 중 하나 +\index{value} + +\item[형(type):] 값들의 분류. 정수({\tt int}형), 부동-소수점 숫자({\tt + float}형)과 문자열({\tt str}형)이 우리가 지금까지 살펴본 데이터의 + 형이다. +\index{type} + +\item[정수(integer):] 자연수를 나타내는 데이터 형이다. +\index{integer} + +\item[부동 소수점(floating-point):] 분수 부분을 표현하는 숫자들. +\index{floating-point} + +\item[문자열(string):] 연속된 글자들을 표현하는 데이터 형. +\index{string} + +\item[자연어(natural language):] 사람들이 말하는 자연적으로 발전한 모든 언어. +\index{natural language} + +\item[형식 언어(formal language):] 수학적 개념을 표현하기 위해서나 + 컴퓨터 프로그램을 표현하기 위한 언어처럼 사람들이 특정 목적을 갖고 + 설계한 모든 언어. 모든 프로그래밍 언어는 형식 언어이다. +\index{formal language} + +\item[토큰(token):] 자연어의 단어와 대응되는 개념으로 프로그램의 문법적 + 구조를 이루는 기본적인 요소 +\index{token} + +\item[문법(syntax):] 프로그램의 구조를 결정하는 규칙 +\index{syntax} + +\item[구문 해석(파싱, parse):] 프로그램을 조사하여 문법적 구조를 분석하는 것 +\index{parse} + +\item[버그(bug):] 프로그램에 있는 오류 +\index{bug} + +\item[디버깅(debugging):] 버그를 찾아 고치는 과정 +\index{debugging} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + + 이 책을 컴퓨터 앞에서 읽는 것을 권한다. 예제들을 만날 때마다 시도 + 해볼 수 있기 때문이다. + +새로운 기능을 실험할 때에는 실수를 많이 할 수록 좋다. 예를 들어 +``Hello, world!'' 프로그램에서 둘 중의 하나의 따옴표를 입력하지 않으면 +어떤 일이 생길까? 둘 다 입력하지 않으면 어떻게 될까? {\tt print}를 +잘못 입력하면 어떻게 될까? \index{error message} + +이런 류의 실험은 읽은 내용을 오랫동안 기억에 남게 할뿐만 아니라 각 오류 +메시지가 어떤 의미를 갖는지 알 수 있기 때문에 프로그래밍할 때에도 +도움이 되나. 지금 의도적으로 실수를 만들어 내는 것이 나중에 우연히 +실수를 범하는 것보다 낫다. + +\begin{enumerate} + +\item \texttt{print}문에서 괄호 중 하나 또는 둘 다 입력하지 않으면 어떻게 될까? + +\item 문자열을 출력한다고 했을 때 따옴표 중 하나 또는 둘 다 입력하지 + 않으면 어떻게 될까? + +\item 음수를 표현하기 위해 {\tt -2}처럼 빼기 부호를 사용할 수 + 있다. 예를 들어 {\tt 2++2}처럼 더하기 부호를 숫자 앞에 넣은 경우에는 + 어떻게 될까? + +\item 수학에서는 {\tt 02}처럼 숫자 앞에 있는 0들이 있어도 괜찮다. Python에서 동일한 방식으로 입력한다면 어떻게 될까? + +\item 두 값을 입력할 때에 사이에 연산자가 없는 경우는 어떻게 될까? + +\end{enumerate} + +\end{exercise} + + + +\begin{exercise} + +Python 인터프리터를 실행시키고 계산기처럼 사용해보자. + +\begin{enumerate} + +\item 42분 42초는 모두 몇 초일까? + +\item 10 킬로미터는 몇 마일일까? 참고로 1.61 킬로미터가 1 마일이다. + +\item 10 킬로미터를 42분 42초만에 달렸다면 평균 보폭언 얼마나 + 될까(마일당 시간을 분과 초로 표시)? 평균 속도는 시간당 마일로 + 표기하면 몇인가? +\index{calculator} +\index{running pace} + +\end{enumerate} + +\end{exercise} + + + + +\chapter{변수와 수식 그리고 문장} +%Variables, expressions and statements + + +프로그래밍 언어의 가장 강력한 기능 중 하나는 {\bf 변수(variable)}가 +조작 가능하다는 것이다. 변수는 값에 부여하는 이름이다. +\index{variable} + + +\section{할당문} +%Assignment statements +\label{variables} +\index{assignment statement} +\index{statement!assignment} + +{\bf 할당문(assignment statement)}은 새로운 변수를 생성하고 값을 부여한다. + +\begin{verbatim} +>>> message = 'And now for something completely different' +>>> n = 17 +>>> pi = 3.141592653589793 +\end{verbatim} +% +이 예제에서는 세 개의 변수에 값을 할당했다. 첫 번째는 {\tt + message}라는 이름의 변수에 문자열을 할당하였다. 두 번째는 {\tt n}에 +정수 {\tt 17}을 부여하였고 세 번째에는 $\pi$의 값을 {\tt pi}라는 변수에 +할당하였다. +\index{state diagram} +\index{diagram!state} + +종이에 변수를 표현하는 방법은 이름과 값을 적고 화살표를 이름에서 값으로 +향하게 그리면 된다. 이와 같은 그림을 {\bf 상태도(state diagram)}이라 +부른다. 각 변수의 상태를 나타내기 때문이다(변수 마음 상태로 +생각해보자) +%수정필요 (think of it as the variable's state of mind). +그림~\ref{fig.state2}는 방금의 예제의 상태도를 보여준다. + + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/state2.pdf}} +\caption{상태도.} +\label{fig.state2} +\end{figure} + + + +\section{변수명} +%Variable names +\index{variable} + +일반적으로 프로그래머는 변수에 의미있는 이름을 부여하며, 그 변수가 +무엇에 이용되는지 문서화하기도 한다. + +이름은 길게 만들고 싶은만큼 길게 만들 수 있다. 글자와 숫자로 이루어질 +수 있지만 숫자로 시작될 수는 없다. 대문자를 못 쓰는 것은 아니지만 +관례적으로 변수명으로는 소문자만을 쓴다. + +밑 줄 표시를, \verb"_", 이름에서 볼 수도 있다 대체적으로 +\verb"your_name"이나 \verb"airspeed_of_unladen_swallow"처럼 여러 단어로 +이루어진 이름에서 사용된다. +\index{underscore character} + +무효한 이름을 변수에 할당하게 되면 문법 오류 메시지가 뜬다: + +\begin{verbatim} +>>> 76trombones = 'big parade' +SyntaxError: invalid syntax +>>> more@ = 1000000 +SyntaxError: invalid syntax +>>> class = 'Advanced Theoretical Zymurgy' +SyntaxError: invalid syntax +\end{verbatim} +% +{\tt 76trombones}가 잘못된 이유는 숫자로 시작하기 때문이고 {\tt + more@}에서 오류가 발생한 이유는 변수명으로 쓸 수 없는 글자 {\tt @}를 +사용했기 때문이다. 그렇다면 {\tt class}에는 무슨 문제가 있는 걸까? + +{\tt class}는 Python이 정의해 놓은 {\bf 키워드(keyword)}이기 때문이다. +인터프리터는 키워드들을 사용하여 프로그램의 구조를 파악하기 때문에 +변수명으로 사용할 수 없다. +\index{keyword} + +Python 3에는 다음과 같은 키워드들이 있다: + +\begin{verbatim} +False class finally is return +None continue for lambda try +True def from nonlocal while +and del global not with +as elif if or yield +assert else import pass +break except in raise +\end{verbatim} +% +이 목록을 외울 필요는 없다. 대부분의 개발 환경은 키워드들을 다른 +색으로 표현해 준다. 이 목록에 있는 키워드 중 하나를 변수 명으 +사용하려 한다면 알 수 밖에 없다. + + +\section{수식과 문장} +%Expressions and statements + +{\bf 수식(expression)}은 값과 변수 그리고 연산자들의 +조합이다. 값으로만 이루어진 그 자체도 수식으로 인식되며 변수도 +마찬가지이다. 다음의 유효한 수식들을 살펴보자. +\index{expression} + +\begin{verbatim} +>>> 42 +42 +>>> n +17 +>>> n + 25 +42 +\end{verbatim} +% +프롬프트에 수식을 입력하면 인터프리터는 수식을 {\bf +계산(evaluate)}하여 그 안에 있는 값을 찾는다. 이 예제에서는 {\tt n}은 +17이라는 값을 갖고 있고 {\tt n + 25} 는 42라는 값을 갖고 있다. +\index{evaluate} + +{\bf 문장(statement)}은 변수를 생성한다거나 값을 표시하는 것과 같이 +결과가 있는 코드의 단위이다. +\index{statement} + +\begin{verbatim} +>>> n = 17 +>>> print(n) +\end{verbatim} +% +첫 줄은 할당문으로 {\tt n}에 값을 부여하고 있고 두 번째 줄은 {\tt + n}에 할당된 값을 출력하는 \texttt{print}문이다. + +문장을 입력하면, 인터프리터는 {\bf 실행(excute)}한다. 실행한다는 의미는 +그 문장이 뜻하는 데로 동작한다는 것이다. 일반적으로 문장에는 값이 할당되지 않는다. +\index{execute} + + +\section{스크립트 모드} +%Script mode + +지금까지 Python을 {\bf 대화식 모드(interactive mode)}로 인터프리터에 +입력한 결과를 즉시 확인할 수 있었다. 대화식 모드는 감을 잡고 +시작하기에는 유용하지만 여러 줄의 코드를 사용하기에는 불편하다. +\index{interactive mode} + +그 대안으로 {\bf 스크립트(script)}라고 부르는 파일에 코드를 저장해 놓고 인터프리터를 +{\bf 스크립트 모드(script mode)}로 동작시켜서 스크립트를 실행시키는 것이다. +통상적으로 Python 스크립트 파일의 이름은 {\tt .py}로 끝이 난다. +\index{script} +\index{script mode} + +컴퓨터에서 스크립트를 생성하고 실행시키는 방법을 안되면 이제 제대로 +시작할 준비가 되었다. 그게 아니라면 \texttt{PythonAnywere}를 다시 한 +번 사용하기를 권한다. 스크립트 모드를 실행하는 방법을 +\url{http://tinyurl.com/thinkpython2e}에 기록해 놓았다. + +Python이 두 가지 모드를 지원하기 때문에 스크립트로 저장하기 전에 대화식 +모드로 실험해볼 수 있다. 하지만 대화식 모드와 스크립트 모드간의 차이≈가 +있기 때문에 그렇게 사용하면 혼란스러울 수 있다. +\index{interactive mode} +\index{script mode} + +예를 들어 Python을 계산기로 사용하여 다음과 같이 입력하였다고 해보자. + +\begin{verbatim} +>>> miles = 26.2 +>>> miles * 1.61 +42.182 +\end{verbatim} + +첫 줄은 {\tt miles}에 값을 할당하였지만, 그 자체로는 가시적인 결과가 +보이지 않는다. 두 번째 줄은 수식이기 때문에 인터프리터가 계산하여 +결과를 표시한다. 이 결과를 보면 마라톤의 길이는 42 킬로미터 정도된다. + +이 똑같은 코드를 스크립트로 저장하여 실행시켜 보면 어떤 결과도 출력되지 +않는다. 스크립트 모드에서의 수식 그 자체로는 어떠한 가시적인 결과가 +나타나지 않는다. 사실 Python은 수식을 계산하지만 값을 출력하라는 +말을 듣기 전까지는 그 결과를 표시하지 않는다. + + +\begin{verbatim} +miles = 26.2 +print(miles * 1.61) +\end{verbatim} + +이 같은 동작이 처음에는 이해가 안될 수 있다. + +스크립트는 대체적을 연속된 문장들로 구성되어 있다. 하나 이상의 문장이 +있는 경우에 각 문장이 실행될 때마다 하나씩 결과를 나타낸다. + +예를 들어, 다음 같은 스크립를 살펴보자. + +\begin{verbatim} +print(1) +x = 2 +print(x) +\end{verbatim} +% +이 스크립트를 실행하면 다음의 결과를 얻는다. + +\begin{verbatim} +1 +2 +\end{verbatim} +% +할당문은 결과를 표시하지 않는다. + +이해를 했는지 확인해보기 위해 다음의 문장들을 Python 인터프리터에 입력하여 어떻게 동작하는지 살펴보라. + +\begin{verbatim} +5 +x = 5 +x + 1 +\end{verbatim} + +그리고 이 문장들을 스크립트로 저장하여 실행해보자. 결과가 어떻게 +되는가? 스크립트의 각 수식을 \texttt{print}문으로 변환하여 다시 +실행해보자. + + + +\section{연산의 우선순위} +%Order of operations +\index{order of operations} +\index{PEMDAS} + +어떤 수식에 하나 이상의 연산자가 있다면 연산의 순서는 {\bf 연산의 + 우선순위(order of operations)}에 의존한다. 수학 연산자의 경우 +Python은 일반적인 수학 연산자의 우선순위를 따른다. 한 가지 방법으로 +{\bf PEMDAS}라는 두문문자로 우선순위를 기억하면 쉽다. + + +\begin{itemize} + +\item {\bf P}arentheses(괄호)는 가장 높은 우선순위를 갖고 있기 때문에 + 괄호를 사용하면 원하는 데로 연산의 순서를 조작할 수가 있다. 수식에서 + 괄호는 가장 먼저 계산되기 때문에 {\tt 2 * (3-1)}은 4가 되고 {\tt + (1+1)**(5-2)}는 8이 된다. 또한 {\tt (minute * 100) / 60}라는 + 식처럼 괄호를 사용하여 계산 결과는 바꾸지 않으면서 수식을 좀 더 읽기 + 쉽게 만들 수도 있다. + +\item {\bf E}xponentiation(거듭제곱)이 그 다음으로 높은 우선 순위를 + 갖고 있다. {\tt 1 + 2**3}의 결과는 9이지 27이 아니며, {\tt 2 * + 3**2}의 결과는 36이 아니라 18이다. + + +\item {\bf M}ultiplication(곱셉)과 {\bf D}ivision(나눗셈)은 {\bf + A}ddition(덧셈)과 {\bf S}ubtraction(뺄셈)보다 더 높은 우선순위를 + 갖고 있다. {\tt 2*3-1}의 연산 결과는 4가 아니라 5이며 {\tt 6+4/2}의 + 결과는 8이지 5가 아니다. + + +\item 같은 연산 우선순위를 갖는 연산자는 왼쪽부터 오른쪽으로(거듭제곱은 예외) 계산된다. +{\tt degrees / 2 * pi}라는 식에서는 나눗셈이 먼저 계산되고 그 결과에 {\tt pi}가 곱해진다. 만약 $2 \pi$로 나누기 원한다면 괄호를 쓰거나 {\tt degrees / 2 / pi}로 식을 고치면 된다. + +\end{itemize} + + +일부러 연산 우선순위를 외우려고 엄청나게 노력할 필요는 없다. 수식이 +바로 파악이 안된다면 괄호를 써서 그 식이 당연해지도록 바꾸면 되기 때문이다. + + +\section{문자열 연산} +%String operations +\index{string!operation} +\index{operator!string} + + +일반적으로 문자열에 수학적 연산을 쓸 수 없다. 설령 문자열이 숫자처럼 +보일지라도 그렇게 쓰는 것은 불법이다. + + +\begin{verbatim} +'2'-'1' 'eggs'/'easy' 'third'*'a charm' +\end{verbatim} +% +그 규칙에는 두 가지 예외가 있다. {\tt +}와 {\tt *}이다. + + +{\tt +} 연산자는 {\bf 문자열 연결(string concatenation)}할 때 사용하는 +것으로 문자열들을 앞뒤로 붙여준다. 예를 들어 보자: +\index{concatenation} + +\begin{verbatim} +>>> first = 'throat' +>>> second = 'warbler' +>>> first + second +throatwarbler +\end{verbatim} +% +{\tt *} 연산자도 역시 문자열을 다룰 때 쓸 수 있다. {\tt *}는 반복할 때 +사용된다. 예를 들어 \verb"'Spam'*3"의 결과는 +\verb"'SpamSpamSpam'"이다. 이것을 사용할 때는 한 값이 문자열이어야 +하고 다른 값은 정수여야 한다. + +{\tt +}와 {\tt *}의 문자열에 대한 용법은 수식에서의 덧셈과 곱셉의 +용법과 연결지어 생각하면 좋다. {\tt 4*3}은 {\tt 4+4+4}와 동치이기 +때문에 \verb"'Spam'*3"의 결과로 \verb"'Spam'+'Spam'+'Spam'"과 같은 +결과를 기대할 것이고, 실제로 같은 결과를 갖고 있다. 물론, 문자열 +연결과 반복은 정수의 덧셈과 곱셉과 다른 면이 많이 있다. 정수의 덧셈의 +성질 중 문자열 연결의 성질과 다른 것을 생각해볼 수 있겠는가? +\index{commutativity} + + +\section{주석} +%Comments +\index{comment} + + +프로그램의 크기가 커지고 복잡해지게되면 읽기가 어려워진다. 형식 언어는 +난해하다고 말을 했었다. 그렇기 때문에 코드의 일부분을 보고 무슨 일을 +하는지 또는 왜 그 일을 하는지 이해하지 못할 때가 많다. + + +그렇기 때문에 프로그램에 자연어로 이 프로그램이 어떤 일을 하는지 기록해 +놓는 것은 언제나 좋은 생각이다. 이렇게 기록하는 것을 보고 {\bf + 주석(comment)}라고 부른다. 주석은 \verb"#" 기호로 시작한다. + +\begin{verbatim} +# 한 시간에 몇 퍼센트가 지났는지 계산 +percentage = (minute * 100) / 60 +\end{verbatim} +% +이 경우에는 주석이 혼자 한 줄을 다 쓰고 있다. 주석을 그 줄의 끝에 +적을 수도 있다. + +\begin{verbatim} +percentage = (minute * 100) / 60 # 시간의 퍼센트 +\end{verbatim} +% +인터프리터는 {\tt \#} 이후부터 그 줄의 끝까지의 모든 내용을 무시한다. +프로그램 실행에 전혀 영향을 주지 않는다. + +주석이 가장 빛을 발하는 순간은 코드 중에 불명확한 기능을 설명할 때이다. 코드를 읽었을 때 그 프로그램이 {\em 무엇}을 하는지는 알아 낼 수 있을 것이다. 그렇기 때문에 {\em 왜} 그 일을 하는지를 설명하는 것이 가장 유익하다. + +다음의 주석은 코드가 하는 일에 대한 중복 설명이라 불필요하다. + +\begin{verbatim} +v = 5 # assign 5 to v +\end{verbatim} +% +반면 다음의 코드는 코드에서 알아 낼 수 없는 유익한 정보를 담고 있다. + +\begin{verbatim} +v = 5 # meters/second 단위의 속도 +\end{verbatim} +% +변수 명을 잘 정하면 주석을 달아야 할 필요가 없어지지만 너무 긴 이름으로 +지으면 읽기가 어려워지기 때문에 적당한 지점에서 타협을 해야 한다. + + +\section{디버깅} +%Debugging +\index{debugging} +\index{bug} + + +프로그램에는 문법(syntax) 오류, 실행시간(runtime) 오류, 그리고 +문맥(semantic) 오류라는 세 가지 종류의 오류가 있을 수 있다. 이 셋을 +구분할 줄 아는 것은 그 오류를 추적하는데 큰 도움을 준다. + + +\begin{description} + +\item[문법(Syntax) 오류:] ``문법(Syntax)''은 프로그램의 구조와 그 + 구조에 대한 규칙을 뜻한다. 예를 들어 괄호는 두 개가 한 쌍으로 + 사용되어야 하기 때문에 {\tt (1+2)}는 유효하지만, {\tt 8)}는 {\bf문법 + 오류}로 사용할 수 없다. + \index{syntax error}\index{error!syntax} + \index{error message}\index{syntax} + + 만약 프로그램 어딘가에 문법 오류가 있다면 Python은 오류 메시지를 + 출력하고 종료하기 때문에 그 이후의 프로그램은 더 실행 할 수 없다. + 프로그래밍에 입문한지 얼마지나지 않은 몇 주 동안은 문법 오류를 + 해결하는데 대부분의 시간을 활애할 것이다. 좀 더 연륜이 쌓인다면 + 오류의 수가 더 적어 질 것이고 그런 오류를 더 빨리 찾아 낼 수 있게 된다. + + +\item[실행시간(Runtime) 오류:] 두 번째 오류는 실행시간 오류라고 + 불리는데, 그렇게 불리는 이유는 프로그램이 실행되기 전까지는 있는지 알 + 수 없기 때문이다. 이러한 오류들은 {\bf 예외(exception)}이라고 + 불리기도 한다. 예외적인(그리고 나쁜) 일이 발생했다는 것을 나타내기 + 때문이다. \index{runtime error} \index{error!runtime} + \index{exception} \index{safe language} \index{language!safe} + + 실행시간 오류는 이 책의 처음 몇 장을 다루는 동안에는 보게 되는 간단한 + 프로그램에서는 드물게 나타난다. 실제 이런 류의 오류를 만나려면 + 시간이 좀 흘러야 할 것이다. + + +\item[문맥(Semantic) 오류:] 세 번째 종류의 오류는 ``문맥(semantic)'' + 오류로서 사용된 문장들의 의미와 관련이 있다. 프로그램에 문맥 오류가 + 있다면 오류 메시지 없이 실행이 잘 되지만 그렇다고 제대로 동작하는 + 것은 아니다. 엉뚱하게 동작을 한다. 정확하게 말하자면, 프로그래머가 + 시킨 일을 그대로 한다. \index{semantic error} + \index{error!semantic} \index{error message} + + 문맥 오류를 찾아내는 것은 까다로운 일인 이유는 프로그램이 어디서 + 어떻게 잘못되었는지를 프로그램의 실행 결과를 통해 역 추적해야하기 + 때문이다. + +\end{description} + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[변수(variable):] 값을 가리키는 이름. +\index{variable} + +\item[할당(assignment):] 변수에 값을 지정하는 문장. +\index{assignment} + +\item[상태도(state diagram):] 변수와 그 변수가 가리키는 값을 표현한 그림 +\index{state diagram} + +\item[키워드(keyword):] 프로그래밍 언어에서 미리 예약해 놓은 단어로서 + 프로그램을 구문해석하는 과정에 사용된다. {\tt if}, {\tt def}와 {\tt + while}과 같은 키워드는 변수 명으로 사용할 수 없다. +\index{keyword} + +\item[피연산자(operand):] 연산자를 사용하여 계산할 때 사용되는 값 +\index{operand} + +\item[수식(expression):] 변수와 연산자 그리고 값들의 조합으로 하나의 + 결과를 나타냄. +\index{expression} + +\item[계산(evaluate):] 하나의 값을 얻기 위해 연산하여 수식을 간단화하는 것 + +\item[문장(statement):] 명령이나 어떤 동작을 뜻하는 코드의 일부분. + 지금까지는 봐왔던 문장은 할당하는 것과 \texttt{print}문이 있다. +\index{statement} + +\item[실행(execute):] 문장에 적힌 그대로를 수행 +\index{execute} + +\item[대화식 모드(interactive mode):] 프롬프트에 코드를 입력하여 + Python 인터프리터를 사용하는 방식 +\index{interactive mode} + +\item[스크립트 모드(script mode):] 스크린트 파일에 저장되어 있는 코드를 + 읽어 실행하도록 Python 인터프리터를 사용하는 방식 +\index{script mode} + +\item[스크립트(script):] 파일에 저장되어 있는 프로그램 +\index{script} + +\item[연산의 우선순위(order of operations):] 여러 개의 연산자와 + 피연산자로 이루어진 수식이 계산되는 순서를 결정하는 규칙 +\index{order of operations} + +\item[연결(concatenate):] 두 개의 피 연산자를 앞뒤로 합치는 것 +\index{concatenation} + +\item[주석(comment):] 다른 프로그래머(또는 소스 코드를 읽는 누군가)를 + 위해 프로그램에 기록되어 있는 정보. 프로그램의 실행에는 아무런 영향이 + 없음. \index{comment} + +\item[문법 오류(syntax error):] 프로그램 해석이 불가능하게 만드는 + 프로그램 내의 오류(구문해석이 불가능함) +\index{syntax error} + +\item[예외(exception):] 프로그램이 실행 중에 발견되는 오류 +\index{exception} + +\item[문맥(semantics):] 프로그램의 의미 +% The meaning of a program. +\index{semantics} + +\item[문맥 오류(semantic error):] 프로그램의 의도와 다르게 프로그램이 + 동작하게 만드는 오류 +\index{semantic error} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + + 앞 장에서 했던 조언처럼 새로운 기능을 배우면 대화식 모드에서 + 실험해보고 의도적으로 실수를 해서 무엇이 잘못되는가를 살펴봐야 한다. + +\begin{itemize} + +\item {\tt n = 42}는 유효하다는 것을 보았다. {\tt 42 = n}은 어떨까? + +\item {\tt x = y = 1 }은 유효한가? + +\item 어떤 프로그래밍 언어는 세미콜론({\tt ;})으로 문장이 끝난다. + Python의 문장의 끝을 세미콜론으로 끝을 내면 어떻게 되는가? + +\item 문장의 끝을 구두점으로 끝을 내면 어떻게 되는가? + +\item 수학에서는 $x$와 $y$의 곱을 표기 할 때 $x y$로 써도 된다. Python에서 이렇게 쓰면 어떻게 될까? + +\end{itemize} + +\end{exercise} + + +\begin{exercise} + +Python의 인터프리터를 계산기처럼 사용하여 다음 문제를 실습해보자. +\index{calculator} + +\begin{enumerate} + +\item 반지름이 $r$인 구의 부피는 $\frac{4}{3} \pi r^3$ 이다. 이때 구의 + 반지름이 5라면 부피가 어떻게 되는가? + +\item 책의 가격이 27,500원으로 책정되어 있는데, 책 방에서 40\% + 도서할인전을 하고 있다. 한 권일 때는 배송비가 2,500원인데, 추가 + 구입을 할 때마다 150원이 추가된다. 60권을 산다면 배송비를 포함한 총 + 금액이 얼마인가? + + +\item 집에서 6시52분에 나와서 1마일을 천천히 8분 15초에 달리고, 그 다음 + 3마일은 마일당 7분 12초가 걸렸다. 그리고 1마일은 처음처럼 천천히 + 달렸다. 운동을 마치고 집에 도착하면 몇 시에 아침 식사를 할 수 + 있을까? +\index{running pace} + +\end{enumerate} +\end{exercise} + + +\chapter{함수} +%Functions +\label{funcchap} + +프로그래밍이라는 문맥에서 {\bf 함수(function)}은 연산을 수행하기 위한 +일련의 문장들에 이름을 붙여 놓은 것이다. 함수를 정의할 때는 이름과 +문장들 지정해야 한다. 그 다음에 함수를 지정한 이름으로 +``호출(call)''할 수 있다 . +\index{function} + +\section{함수 호출} +%Function calls +\label{functionchap} +\index{function call} + +우리는 이미 {\bf 함수 호출(function call)}의 예를 보았다: + +\begin{verbatim} +>>> type(42) + +\end{verbatim} +% +함수의 이름은 {\tt type}이다. 괄호 안의 표현은 함수의 {\bf + 인자(argument)}라고 불린다. 이 함수의 결과로 인자의 분류를 +알려준다. +\index{parentheses!argument in} + +흔히 함수가 인자를 ``받아서(take)'' 결과를 ``리턴(return)''한다고 +말한다. 그리고 함수의 결과를 {\bf 리턴 값(return value)}이라고 +부른다. +\index{argument} +\index{return value} + +Python은 어떤 값을 한 분류에서 다른 분류로 변환하는 함수들을 제공한다. +{\tt int} 함수는 어떤 값이든 받아서 정수로 변환할 수 있으면 변환하고 +그렇지 못하는 경우는 불평을 한다. +%complain 불평 +\index{conversion!type} +\index{type conversion} +\index{int function} +\index{function!int} + +\begin{verbatim} +>>> int('32') +32 +>>> int('Hello') +ValueError: invalid literal for int(): Hello +\end{verbatim} +% +{\tt int} 함수는 부동 소수점 숫자를 정수로 변환할 수 있지만 반올림을 하지 +않는다. 소수점 부분을 잘라 버리기만 한다. + +\begin{verbatim} +>>> int(3.99999) +3 +>>> int(-2.3) +-2 +\end{verbatim} +% +{\tt float} 함수는 정수와 문자열을 부동 소수점 숫자로 변환한다. +\index{float function} +\index{function!float} + +\begin{verbatim} +>>> float(32) +32.0 +>>> float('3.14159') +3.14159 +\end{verbatim} +% +마지막으로 {\tt str} 함수는 인자를 문자열로 변환한다. +\index{str function} +\index{function!str} + +\begin{verbatim} +>>> str(32) +'32' +>>> str(3.14159) +'3.14159' +\end{verbatim} +% + +\section{수학 함수} +%Math functions +\index{math function} +\index{function, math} + +Python은 대부분의 익숙한 수학 함수들을 포함하는 수학 모듈을 갖고 있다. +{\bf 모듈(module)}은 관련된 함수들을 모아 놓은 파일이다. +\index{module} +\index{module object} + +모듈에 포함된 함수를 사용하기 전에 {\bf import 문}으로 읽어들여야 한다. + +\begin{verbatim} +>>> import math +\end{verbatim} +% +이 문장은 \texttt{math}라고 불리는 {\bf 모듈 객체(module object)}를 +생성한다. 모듈 객체를 표시하도록 하면 객체에 관한 정볼르 얻을 수 +있다. + + +\begin{verbatim} +>>> math + +\end{verbatim} +% +모듈 객체는 모듈에 정의된 함수들과 변수들을 포함하고 있다. 모듈에 +포함된 함수를 사용하고 싶으면 모듈과 사용하기 원하는 함수의 이름을 +구두점(닷, dot)으로 구분하여 지정해야 한다. 이와 같은 형식을 {\bf 닷 + 표기법(dot notation)}이라고 부른다. +\index{dot notation} + +\begin{verbatim} +>>> ratio = signal_power / noise_power +>>> decibels = 10 * math.log10(ratio) + +>>> radians = 0.7 +>>> height = math.sin(radians) +\end{verbatim} +% +첫 예제에서는 \verb"math.log10"을 사용하여 \verb"signal_power" 와 +\verb"noise_power"의 변수가 정의되어 있다고 가정했을 때의 신호대잡음비를 +데시벨로 변환한다. 수학 모듈은 밑 수를 {\tt e}로 하는 {\tt log}도 제공한다. +\index{log function} +\index{function!log} +\index{sine function} +\index{radian} +\index{trigonometric function} +\index{function, trigonometric} + +두 번째 예제에서는 {\tt radians} 변수에 대한 사인 값을 계산한다. {\tt + sin}, {\tt cos} 그리고 {\tt tan}와 같은 삼각함수와 관련된 함수들의 +인자 값은 이 예제에서 사용한 변수 명처럼 라디안을 쓴다. 도를 +라디안으로 변환하려면 180으로 나누고 $\pi$로 곱하면 된다. + + +\begin{verbatim} +>>> degrees = 45 +>>> radians = degrees / 180.0 * math.pi +>>> math.sin(radians) +0.707106781187 +\end{verbatim} +% +{\tt math.pi}라고 쓰면 {\tt pi} 변수를 수학 모듈에서 가져온다. 이 값은 +소수점 15자리까지 정확한 근사값이다. +\index{pi} + +삼각함수 식에 따라 45도의 사인 값은 2분의 루트 2이기 때문에 예제의 +결과가 맞는지 비교해 볼 수 있다. +\index{sqrt function} +\index{function!sqrt} + +\begin{verbatim} +>>> math.sqrt(2) / 2.0 +0.707106781187 +\end{verbatim} +% + +\section{구성} +%Composition +\index{composition} + +지금까지 변수와 수식 그리고 문장이라는 프로그램의 요소들을 독립적으로만 +다루었기 때문에 구성 요소들을 화합하여 쓰는 것에 대해서는 다루지 +않았다. + +프로그래밍 언어의 가장 유익한 기능 중 하나는 작은 단위의 필요한 +부분들을 모아서 {\bf 구성(compose)}할 수 있다는 것이다. 예를 들면, +함수의 인자로 산술 연산자들을 포함하는 어떤 수식이라도 다 받을 수 있다. + + +\begin{verbatim} +x = math.sin(degrees / 360.0 * 2 * math.pi) +\end{verbatim} +% +함수 호출도 할 수 있다. + +\begin{verbatim} +x = math.exp(math.log(x+1)) +\end{verbatim} +% +거의 모든 곳에 값을 넣을 수 있으며 임의의 수식을 쓸 수 있다. 단, 한 +가지 예외가 있다. 할당문의 왼쪽에는 변수의 이름이 있어야 한다. +왼쪽에 다른 어떤 수식이라도 오면 문법 오류가 발생한다 (이것에 +대한 예외 상황을 이후에 살펴 보자). + + +\begin{verbatim} +>>> minutes = hours * 60 # 맞음 +>>> hours * 60 = minutes # 틀림! +SyntaxError: can't assign to operator +\end{verbatim} +% +\index{SyntaxError} +\index{exception!SyntaxError} + + +\section{새로운 함수의 추가} +%Adding new functions + +지금까지는 Python이 제공하는 함수들만 사용했었는데, 새로운 함수도 추가 +할 수 있다. {\bf 함수 정의(function definition)}로 새로운 함수에 +이름을 부여하고 그 함수를 호출했을 때 실행될 일련의 문장들을 지정할 수 +있다. +\index{function} +\index{function definition} +\index{definition!function} + +여기 그 예가 있다. + +\begin{verbatim} +def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") +\end{verbatim} +% +{\tt def}라는 키워드가 함수 정의를 표시한다. 이 함수의 이름은 +\verb"print_lyrics"이다. 함수 이름에 대한 규칙은 변수명에 대한 규칙과 +똑같다. 글자와 숫자 그리고 밑줄 표시는 사용 가능하지만 숫자가 첫 +글자로 오면 안된다. 키워드로 예약되어 있는 단어들은 함수명으로 쓸 수 +없으며 변수와 함수를 동일한 이름으로 짓는 것은 피해야 한다. +\index{def keyword} +\index{keyword!def} +\index{argument} + +함수명 다음에 빈 괄호를 사용한 것은 이 함수가 아무런 인자도 사용하지 +않는다는 것을 뜻한다. +\index{parentheses!empty} +\index{header} +\index{body} +\index{indentation} +\index{colon} + +함수 정의의 첫 줄을 {\bf 헤더(header)}라고 부르고 그 나머지 부분을 +{\bf 내용(바디, body)}라고 부른다. 헤더의 끝은 콜론이고 내용은 +들여쓰기를 해야 한다. 관례적으로 항상 4개의 공백으로 들여쓰기를 한다. +내용에는 몇 개의 문장이든 포함될 수 있다. +%body 내용 + + +\texttt{print}문에 문자열은 큰따옴표로 싸여있다. 작은 따옴표나 +큰따옴표나 동일하다. 대부분의 사람들은 작은 따옴표를 사용하지만, +예외적으로 작은 따옴표(아포스트로피 또는 생략 기호)가 문자열 중에 +포함된 경우에만 큰따옴표를 사용한다. + +모든 인용부호(작은 따옴표와 큰따옴표)는 대체적으로 키보드의 엔터 키 +옆에 있는 ``반듯한 인용부호''를 사용해야 한다. 이 문장에서 쓰고 있는 +``휘어진 인용부호''는 Python에서 쓸 수 없다. + +대화식 모드에서 함수 정의를 입력하면 인터프리터는 함수의 내용 부분에 +점({\tt ...})을 표시하여 정의가 끝나지 않았다는 것을 표시한다. +\index{ellipses} + +\begin{verbatim} +>>> def print_lyrics(): +... print("I'm a lumberjack, and I'm okay.") +... print("I sleep all night and I work all day.") +... +\end{verbatim} +% +함수의 정의를 끝내려면 빈 줄을 입력하면 된다. 이렇게 정의된 함수 객체는 +\verb"function"으로 분류된다. +\index{function type} +\index{type!function} + +\begin{verbatim} +>>> print(print_lyrics) + +>>> type(print_lyrics) + +\end{verbatim} +% +새로운 함수를 호출하는 문법은 내장된 함수들을 호출하는 방식과 똑같다. + +\begin{verbatim} +>>> print_lyrics() +I'm a lumberjack, and I'm okay. +I sleep all night and I work all day. +\end{verbatim} +% +이렇게 정의된 함수는 다른 함수 내에서 사용될 수 있다. 예를 들어 방금 +출력한 후렴구를 반복적으로 호출하도록 \verb"repeat_lyrics"라는 함수를 +작성해 보자 + + +\begin{verbatim} +def repeat_lyrics(): + print_lyrics() + print_lyrics() +\end{verbatim} +% +그리고 \verb"repeat_lyrics"을 호출해보자. + +\begin{verbatim} +>>> repeat_lyrics() +I'm a lumberjack, and I'm okay. +I sleep all night and I work all day. +I'm a lumberjack, and I'm okay. +I sleep all night and I work all day. +\end{verbatim} +% +실제 노래가 이렇게 흘러가지는 않는다. + + +\section{정의와 활용} +%Definitions and uses +\index{function definition} + +이전 절에서 사용한 코드를 다시 가져와 보자. 전체 코드는 다음과 같다. + +\begin{verbatim} +def print_lyrics(): + print("I'm a lumberjack, and I'm okay.") + print("I sleep all night and I work all day.") + +def repeat_lyrics(): + print_lyrics() + print_lyrics() + +repeat_lyrics() +\end{verbatim} +% +이 프로그램은 \verb"print_lyrics" 와 \verb"repeat_lyrics"라는 두 개의 +함수를 정의하고 있다. 함수 정의는 다른 문장처럼 실행되지만, 실행의 +결과로 함수 객체만 생성이 된다. 실제 함수 정의의 내용은 그 함수가 +호출되기 전까지는 실행되지 않으며 함수 정의 자체는 어떠한 결과도 출력하지 않는다. +\index{use before def} + +예상한 것처럼, 함수를 생성한 후에야 함수를 실행할 수 있다. 다시 +말하면, 함수가 호출되기 이전에 함수가 정의되어야 한다. + +연습을 해보자. 두 번쨰 함수의 마지막 줄을 이 프로그램의 가장 처음으로 +옮겨보자. 프로그램을 실행해서 함수 정의보다 먼저 함수 호출 문장이 +나타나면 어떤 오류 메시지를 출력하는지 보자. + +함수 호출 문장을 원상복귀 한 후, 이번에는 \verb"repeat_lyrics" +다음에 \verb"print_lyrics"를 배치해보자. 이 상태로 프로그램을 +실행시키면 어떻게 되나? + + + +\section{실행의 흐름} +%Flow of execution +\index{flow of execution} + +함수를 정의한 후에 사용되도록 만들려면 어떤 순서로 문장들이 +실행되는지를 알아야 한다. 이를 {\bf 실행의 흐름(flow of + execution)}이라고 부른다. + + +실행의 순서는 언제 프로그램의 첫 문장부터 시작된다. 가장 위에서부터 +밑까지 문장은 한 번에 하나씩 실행된다. + +함수 정의는 프로그램의 실행의 흐름을 변경시키지 않지만 함수 정의 내의 +문장들은 해당 함수가 호출되기 이전에는 실행되지 않는다는 것을 기억해야 +한다. + +함수 호출은 실행 흐름의 우회로와 같다. 다음 문장을 실행시키는 대신 +함수의 내용으로 이동하여 그 안의 문장들을 실행시킨 후 이전에 멈췄던 +부분부터 실행한다. + +매우 간단하게 들리겠지만, 함수가 또 다른 함수를 호출 할 수 있다는 것을 +되새겨 보면 그렇지 않다는 것을 깨달을 것이다. 함수의 중간에서 다른 +함수의 문장들을 호출할 수 있다. 그러는 중에 또 다른 함수를 호출할 수도 +있다! + +다행스러운 것은, Python은 현재 실행 중이던 위치를 파악하는 것에 +능숙하다. 함수의 실행이 완료되면 호출했던 함수에서 마지막 실행 중이던 +위치를 찾아 계속 진행할 수 있다. 마침내 프로그램의 끝에 도달하면 +종료한다. + +정리하면, 프로그램을 읽을 때에는 프로그램의 처음부터 한 줄 씩 읽으려 할 +필요가 없다. 오히려 실행의 흐름을 따르는 것이 이해하기 더 쉬울 수 있다. + + +\section{매개 변수와 인자값} +%Parameters and arguments +\label{parameters} +\index{parameter} +\index{function parameter} +\index{argument} +\index{function argument} + +어떤 함수들은 인자를 사용한다는 것을 보았다. 예를 들어 {\tt + math.sin}을 쓸 때 숫자를 인자로 입력했었다. 어떤 함수는 하나 이상의 +인자를 받기도 한다. {\tt math.pow}는 밑수와 지수라는 두 개의 인자를 +받는다. + +함수 내에서는 전달 받은 인자를 {\bf 매개 변수(파라미터, parameter)}라는 +변수로 할당된다. 인자를 받는 어떤 함수의 정의를 살펴보자. +\index{parentheses!parameters in} + +\begin{verbatim} +def print_twice(bruce): + print(bruce) + print(bruce) +\end{verbatim} +% +이 함수는 전달 받은 인자를 {\tt bruce}라는 매개 변수로 할당한다. +함수가 호출되면 그 매개 변수가 무엇이든 간에 두 번 출력하고 있다. + +다음의 함수는 출력 가능한 모든 값에 쓸 수 있다. + +\begin{verbatim} +>>> print_twice('Spam') +Spam +Spam +>>> print_twice(42) +42 +42 +>>> print_twice(math.pi) +3.14159265359 +3.14159265359 +\end{verbatim} +% +내장된 함수들에 적용되었던 구성에 관한 규칙들은 프로그래머가 정의한 +함수들에도 똑같이 적용된다. 그러므로, \verb"print_twice"의 인자 +값으로 어떤 수식이라도 쓸 수 있다. +\index{composition} +\index{programmer-defined function} +\index{function!programmer defined} + +\begin{verbatim} +>>> print_twice('Spam '*4) +Spam Spam Spam Spam +Spam Spam Spam Spam +>>> print_twice(math.cos(math.pi)) +-1.0 +-1.0 +\end{verbatim} +% +함수가 호출되기 전에 인자 값을 계산한다. 예에서 사용한 \verb"'Spam'*4"와 +{\tt math.cos(math.pi)}라는 수식은 한 번씩 계산된다. +\index{argument} + +변수 역시도 인자로 사용할 수 있다. + +\begin{verbatim} +>>> michael = 'Eric, the half a bee.' +>>> print_twice(michael) +Eric, the half a bee. +Eric, the half a bee. +\end{verbatim} +% +인자로 전달한 ({\tt michael})이라는 병수명은 함수를 정의할 때 사용한 +매개 변수({\tt bruce})와는 아무런 관계가 없다. 호출되기 전 코드(호출자, caller) 어떤 +값이었든 상관없다. \verb"print_twice" 함수 내에서는 {\tt bruce}라 +부른다. +%caller 호출자 + + +\section{변수와 매개 변수의 지역성} +%Variables and parameters are local +\index{local variable} +\index{variable!local} + +함수 내에서 변수를 생성하면 {\bf 지역 또는 로컬(local)} 변수라고 +부른다. 함수 내에서만 존재하기 때문이다. 예를 들어 보자. +\index{parentheses!parameters in} + +\begin{verbatim} +def cat_twice(part1, part2): + cat = part1 + part2 + print_twice(cat) +\end{verbatim} +% +이 함수는 두 개의 인자를 받아서 연결하고, 그 결과를 두 번 출력한다. 이 +함수 정의를 쓰는 예를 살펴 보자. +\index{concatenation} + +\begin{verbatim} +>>> line1 = 'Bing tiddle ' +>>> line2 = 'tiddle bang.' +>>> cat_twice(line1, line2) +Bing tiddle tiddle bang. +Bing tiddle tiddle bang. +\end{verbatim} +% +\verb"cat_twice" 가 종료하면 함수 내에서 사용되었던 변수 {\tt cat}은 +없어진다. 출력해보려고 하면 예외처리 된다. +\index{NameError} +\index{exception!NameError} + +\begin{verbatim} +>>> print(cat) +NameError: name 'cat' is not defined +\end{verbatim} +% +매개 변수도 지역에서만 정의된다. 예를 들어 \verb"print_twice" 밖에서는 +{\tt bruce}라는 것은 존재하지 않는다. +\index{parameter} + + +\section{스택 상태도} +%Stack diagrams +\label{stackdiagram} +\index{stack diagram} +\index{function frame} +\index{frame} + +각 변수의 사용 범위 파악에 {\bf 스택 상태도(stack diagram)}을 그려보는 +것이 도움이 된다. 상태도와 유사하게 스택 상태도는 각 변수의 값을 +나타낸다. 추가적으로 각 변수가 어떤 함수에 포함되는지도 나타낸다. +\index{stack diagram} +\index{diagram!stack} + +각 함수는 {\bf 프레임(frame)}이라는 단위로 구분된다. 여기서 프레임은 +하나의 상자로 함수의 이름이 곁에 적혀 있고 상자 내부에는 변수와 매개 +변수가 적혀 있다. 앞서 본 예제의 스택 상태도는 +그림~\ref{fig.stack}에 나타나 있다. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/stack.pdf}} +\caption{스택 상태도.} +\label{fig.stack} +\end{figure} + +어떤 함수가 어떤 함수를 호출 했는지를 알아 볼 수 있도록 프레임들이 +스택에 정리되어 있다. 이 예제에서는 \verb"print_twice" 함수는 +\verb"cat_twice" 함수에 의해 호출되었으며 \verb"cat_twice" 함수는 +\verb"__main__"에 의해 호출이 되었다. \verb"__main__"라는 함수는 +최상위 프레임에게 부여하는 특별한 이름이다. 함수 밖에서 생성된 변수는 +\verb"__main__" 함수에 속해 있다. +\index{main} + +각 매개 변수는 해당 인자가 갖고 있는 값과 똑같은 값을 갖고 있다. +그렇기 때문에 {\tt part1}가 같고 있는 값은 {\tt line1}이 갖고 있는 값고 +똑같으며, {\tt part2}가 같고 있는 값은 {\tt line2}와 동일하다. 그리고, +{\tt bruce}는 {\tt cat}과 똑같다. + +함수 호출 중에 오류가 발생하면 Python은 함수의 이름과 호출을 시도한 +함수명을 출력한다. 그리고 다시 그 함수를 호출한 상위 프레임의 함수명을 +출력한다. 이 과정을 \verb"__main__"에 도달 할 때까지 반복한다. + +예를 들어, \verb"print_twice" 내에서 {\tt cat}를 접근하려고 시도 한다면 +{\tt NameError}이라는 오류 메시지를 받을 것이다. + +\begin{verbatim} +Traceback (innermost last): + File "test.py", line 13, in __main__ + cat_twice(line1, line2) + File "test.py", line 5, in cat_twice + print_twice(cat) + File "test.py", line 9, in print_twice + print(cat) +NameError: name 'cat' is not defined +\end{verbatim} +% +이런 식으로 함수의 리스트를 보여주는 것을 {\bf 추적(트레이스백, + traceback)}이라고 부른다. 오류가 발생했을 때 어떤 프로그램 파일에서 +오류가 발생했는지 그리고 실행 중이던 함수와 오류를 일으킨 줄 번호에 대한 +정보를 보여준다. 그리고 오류를 일으킨 코드도 보여준다. +\index{traceback} + + +트레이스백의 함수의 순서는 스택 상태도에서 나타난 프레임의 순서와 +똑같다. 현재 실행 중이던 함수가 가장 아래에 표시된다. + + + +\section{열매가 있는 함수들과 비어 있는 함수} +%Fruitful functions and void functions} +\index{fruitful function} +\index{void function} +\index{function, fruitful} +\index{function, void} + +수학 함수들과 같은 우리가 사용해본 함수들은 결과를 리턴한다. 이런 +종류의 함수를 구분하는 좋은 이름이 따로 없어서 {\bf 열매가 있는 + 함수(fruitful function)}이라고 부른다. \verb"print_twice"와 같은 +류의 다른 함수들은 어떤 동작을 하지만 결과 값을 리턴하지는 않는다. +이런 류는 {\bf 비어 있는 함수(void function)}라고 부른다. + +열매가 있는 함수를 호출하면 거의 모든 경우에 리턴받은 결과를 활용하기를 +원한다. 예를 들어, 그 결과에 변수를 할당하거나 수식의 일부로 +사용하기도 한다. + +\begin{verbatim} +x = math.cos(radians) +golden = (math.sqrt(5) + 1) / 2 +\end{verbatim} +% +대화식 모드에서 함수를 호출할 때 Python은 결과를 표시한다. + +\begin{verbatim} +>>> math.sqrt(5) +2.2360679774997898 +\end{verbatim} +% +스크립트로 실행했을 때, 열매가 있는 함수를 그 자체로만 호출하면 리턴 받은 결과는 영원히 잃어버리고 만다! + +\begin{verbatim} +math.sqrt(5) +\end{verbatim} +% +이 스크립트는 루트 5를 계산하지만 결과를 저장하지도 표시하지도 않기 +때문에 그렇게 유용하지는 않다. +\index{interactive mode} +\index{script mode} + +비어 있는 함수는 화면에 무언가를 표시하거나 다른 어떤 영향이 있는 +것처럼 보이지만 리턴할 결과 값이 없다. 만약 결과 값을 변수에 +할당하려고 시도한다면 {\tt None}이라는 특수한 값을 돌려 받는다. +\index{None special value} +\index{special value!None} + +\begin{verbatim} +>>> result = print_twice('Bing') +Bing +Bing +>>> print(result) +None +\end{verbatim} +% +{\tt None}이라는 값은 \verb"'None'"이라는 문자열과 같은 것이 아니다. +그 자체가 특수한 값을 같은 또 다른 분류이다. + +\begin{verbatim} +>>> type(None) + +\end{verbatim} +% +지금까지 우리가 작성한 모든 함수들은 모두 비어 있는 함수들이었다. 이제 +앞으로 다룰 장들에서 열매가 있는 함수들을 작성하기 시작할 것이다. +\index{NoneType type} +\index{type!NoneType} + + +\section{왜 함수인가?} +%Why functions? +\index{function, reasons for} + +프로그램의 내용을 왜 함수들로 나눠야 하는지에 대한 이유가 아직은 명확하지 않을 것이다. 그럴만한 이유는 많이 있다. + +\begin{itemize} + +\item 새로운 함수를 생성하면 문장들의 묶음에 이름을 지어줄 수 있다. + 그러면 프로그램을 읽거나 디버깅하기가 쉬워진다. + +\item 함수들을 활용하면 반복적인 코드들을 제거할 수 있기 때문에 + 프로그램의 길이가 짧아진다. 나중에 반복되는 코드를 수정을 할 일이 + 생긴다면 한 곳에서만 수정을 하면 된다. + +\item 긴 프로그램을 함수들로 나누어 놓으면 한 번에 한 부분씩 디버깅을 + 할 수 있으며, 디버깅이 완료되면 제대로 동작하는 전체로 다시 모을 + 수있다. + +\item 잘 설계된 함수들은 여러 프로그램들에 유용하게 사용될 수 있다. + 하나를 잘 작성해 놓고 디버깅을 해 놓으면 다른 곳에서도 그 부분을 + 재활용할 수 있다. + +\end{itemize} + + +\section{디버깅} +%Debugging + +가장 중요한 기술 중에 하나인 디버깅 기술을 가져야 한다. 좌절스럽게 +만들 때도 있지만 디버깅은 지적으로 풍부하고 도전적고 또한 프로그래밍을 +흥미롭게 만드는 것이기도 하다. +\index{experimental debugging} +\index{debugging!experimental} + +디버깅은 어떤 면에서 탐정이 수사를 펼치는 것과 같다. 현재 발생한 +결과를 이끌어 낸 과정과 사건들을 유추할 있는 여러 단서들과 만나게 +된다. + +디버깅은 실험에 기반한 과학과도 같다. 무엇인 잘못된 것 같단 아이디어가 +떠 오르면 프로그램을 수정해보고 다시 시도 해 보면 된다. 가정이 옳다면 +수정에 대한 결과를 예측해 볼 수 있게 되고 동작하는 프로그램으로 한 걸음 +더 가까이 다가갈 수 있게 된다. 만약 가정이 틀렸다면 다른 방법을 +시도해봐야 한다. 셜록 홈즈가 말하듯이 ``불가능한 것들을 하나씩 제거한 뒤에 +남은 것이 아무리 불가능해 보일지라도 그게 사실일 것이다.''(A. 코난 도일, +{\em 4개의 서명}) +\index{Holmes, Sherlock} +\index{Doyle, Arthur Conan} + +어떤 이들에게는 프로그래밍과 디버깅은 똑같은 것이다. 그들에게 +프로그래밍이라는 것은 원하는 동작을 할 때까지 프로그램을 조금씩 +디버깅해 나가는 것이다. 동작 가능한 프로그램을 먼저 작성한 후에 조금씩 +변형을 만들어 내고 디버깅하는 것이 기본 접근 방식이다. + +예를 들어, 리눅스라는 운영체제는 지금은 수 백만 줄의 코드로 +이루어져있지만, 최초에는 리누스 토발즈가 인텔 80386 CPU를 사용하는 +간단한 프로그램으로 시작되었다. 래리 그린필드에 의하면 ``리누스의 초기 +프로젝트 중에 하나는 AAAA를 BBBB로 변환하는 프로그램을 만드는 +것이었다. 이게 나중에는 발전하여 리눅스가 되었다.'' ({\em The Linux + Users' Guide(리눅스 사용자 가이드)} 베타 1판). +\index{Linux} + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[(function):] 이름이 있는 일련의 문장들로 유용한 작업을 수행한다. + 함수는 인자를 받을 수도 안 받을 수도 있으며 실행하였을 때 결과 돌려 + 줄 수도 있고 그렇지 않을 수도 있음 +\index{function} + +\item[함수 정의(function definition):] 새로운 함수를 생성하는 문장으로 + 함수의 이름과 매개 변수들을 지정하고 그리고 문장들을 포함함 +\index{function definition} + +\item[함수 객체(function object):] 함수 정의에 의해 생성되는 값. + 함수의 이름이 함수 객체를 가리키는 변수임 + \index{function definition} + +\item[헤더(header):] 함수 정의의 첫 줄 +\index{header} + +\item[내용(바디, body):] 함수 정의 내의 일련의 문장들 +\index{body} + +\item[매개 변수(parameter):] 함수 내에서 인자로 전달된 값을 가리키는 이름 +\index{parameter} + +\item[함수 호출(function call):] 함수를 실행시키는 문장. 함수의 이름과 + 괄호로 싸여있는 인자들의 목록으로 구성되어 있음 +\index{function call} + +\item[인자(argument):] 함수가 호출되었을 때 함수에 제공되는 값. 이 + 값은 해당 함수에 매개 변수에 할당됨 +\index{argument} + +\item[지역 변수(local variable):] 함수 내에서 정의된 변수. 지역 변수는 + 정의된 함수 내에서만 사용될 수 있음 +\index{local variable} + +\item[리턴 값(return value):] 함수의 결과. 함수 호출이 수식의 일부로 + 사용되었다면 리턴 값은 수식이 사용하는 값이 됨 +\index{return value} + +\item[열매가 있는 함수(fruitful function):] 결과를 리턴하는 함수 +\index{fruitful function} + +\item[비어 있는 함수(void function):] {\tt None}을 리턴하는 함수 +\index{void function} + +\item[{\tt None}:] 비어 있는 함수가 리턴하는 특수한 값 +\index{None special value} +\index{special value!None} + +\item[모듈(module):] A file that contains a +collection of related functions and other definitions. +\index{module} + +\item[읽어들이기 문장(import statement):] 모듈 파일을 읽어서 모듈 + 객체를 생성하는 문장 +\index{import statement} +\index{statement!import} + +\item[모듈 객체(module object):] {\tt import}문으로 생성되는 값으로 + 모듈에서 정의한 값들을 사용할 수 있도록 함 +\index{module} + +\item[닷 표기법(dot notation):] 다른 모듈의 함수를 호출하는 문법으로 + 모듈의 이름과 함수의 이름을 점(닷, 구두점)으로 연결하는 표기법 +\index{dot notation} + +\item[구성(composition):] 더 큰 수식의 일부로 수식을 쓰거나 더 큰 + 문장의 일부로 문장을 작성하는 것 +\index{composition} + +\item[실행의 흐름(flow of execution):] 문장들의 실행 순서 +\index{flow of execution} + +\item[스택 상태도(stack diagram):] 함수가 사용하고 있는 스택의 상태를 + 그림으로 표기하는 방법으로 변수와 각 변수가 가리키는 값을 나타나냄 +\index{stack diagram} + +\item[프레임(frame):] 스택 상태도의 상자로 함수 호출을 나타냄. 상자는 + 지역 변수와 함수의 매개 변수를 포함함. +\index{function frame} +\index{frame} + +\item[트레이스백(추적, traceback):] 실행 중인 함수들의 목록으로 예외가 + 발생할 때 출력이 됨 +\index{traceback} + + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +\index{len function} +\index{function!len} + +\verb"right_justify"(오른쪽 정렬이라는 의미)라는 이름과 문자열 {\tt + s}를 매개 변수로 사용하는 함수를 작성하여라. 문자열 앞에 충분한 +공백을 두어서 문자열의 마지막 글자가 70번째 열에 보이도록 하라. + +\begin{verbatim} +>>> right_justify('monty') + monty +\end{verbatim} + +힌트: 문자열 연결과 반복을 사용하라. Python은 {\tt len}이라는 내장 +함수를 갖고 있다. 이 함수는 문자열의 길이를 리턴한다. +\verb"len('monty')"의 값은 5이다. + +\end{exercise} + + +\begin{exercise} +\index{function object} +\index{object!function} + +함수 객체는 값이기 때문에 변수에 할당할 수도 있고 인자로 전달할 수도 +있다. 예를 들어, \verb"do_twice"는 함수 객체를 인자로 전달 받아 두 번 +호출하는 함수이다. + +\begin{verbatim} +def do_twice(f): + f() + f() +\end{verbatim} + +다음 예제는 \verb"do_twice"를 사용하여 \verb"print_spam"라는 함수를 두 번 호출한다. + + +\begin{verbatim} +def print_spam(): + print('spam') + +do_twice(print_spam) +\end{verbatim} + +\begin{enumerate} + +\item 이 예제를 스크립트로 작성하여 제대로 동작하는지 확인해보라 + +\item \verb"do_twice"를 두 개의 인자를 받도록 수정하여라. 함수 객체와 + 값을 전달받아 해당 함수는 두 번 호출하고 값은 인자로 전달하도록 + 만들라. + +\item 이 장의 처음에 다뤘던 \verb"print_twice" 함수의 정의를 복사하여 + 스크립트에 포함시켜라 + +\item 수정한 \verb"do_twice" 함수를 사용하여 \verb"print_twice"를 두 번 + 호출하여라. 이 때, \verb"print_twice" 함수의 인자는 \verb"'spam'"을 + 사용하여라. + +\item 함수 객체와 값을 전달 받아 해당 함수를 4번 호출하고 값은 매개 + 변수로 사용하는 \verb"do_four"라는 새로운 함수를 정의하여라. 이 + 함수의 내용에는 네 개가 아니라 두 개의 문장만 있어야 한다. + +\end{enumerate} + +해답: \url{http://thinkpython2.com/code/do_four.py}. + +\end{exercise} + + + +\begin{exercise} + + 메모: 이 연습 문제는 지금까지 우리가 배운 문장들과 기능들만을 + 사용하여 해결해야 한다. + +\begin{enumerate} + +\item 아래와 같은 격자 무늬를 만드는 함수를 작성하라: +\index{grid} + +\begin{verbatim} ++ - - - - + - - - - + +| | | +| | | +| | | +| | | ++ - - - - + - - - - + +| | | +| | | +| | | +| | | ++ - - - - + - - - - + +\end{verbatim} +% +힌트: 한 줄에 하나 이상의 값을 출력하려면 값을 쉼표로 구분지으면 된다. + +\begin{verbatim} +print('+', '-') +\end{verbatim} +% +기본적으로 {\tt print}는 출력이 끝나면 다음 줄로 넘어간다. 이 같은 +동작을 수정하려면 다음과 같은 방법으로 동작을 변경할 수 있다. + +\begin{verbatim} +print('+', end=' ') +print('-') +\end{verbatim} +% +이 문장들의 결과는 \verb"'+ -'"이다. + +{\tt print}문에 인자가 없다면 현재 출력 중이던 줄을 종료하고 다음 +줄로 넘어간다. + +\item 네 개의 행과 열이 있는 격자 무늬를 그리는 함수를 작성하여라. + +\end{enumerate} + +해답: \url{http://thinkpython2.com/code/grid.py}. + +출처: 이 예제는 스티브 오우알린의 ({\em Practical C Programming, 3판}, +오라일리 출판사, 1997), 연습 문제를 기초로 하였다. + +\end{exercise} + + + + + +\chapter{사례 연구: 인터페이스 설계} +%Case study: interface design +\label{turtlechap} + +이 장은 함께 동작하는 함수들을 설계하는 과정을 사례를 들어 살펴보자. + +{\tt turtle}이라는 모듈을 소개하고자 한다. 이 모듈은 거북이 그래픽스를 +사용하여 이미지를 생성해 준다. Python을 설치하면 {\tt turtle} 모듈이 +내장되어 있지만 PythonAnywhere을 사용 중이라면 이 모듈을 사용할 수 +없다(최소한 이 글을 쓰는 중에는 불가능했다). + +Python을 컴퓨터에 설치했다면 여기의 예제들을 실행할 수 있다. 아직 설치 +안했다면 이제는 설치를 해보자. 설치하는 방법은 +\url{http://tinyurl.com/thinkpython2e}에 나와 있다. + +이 장에서 사용한 예제들의 코드는 +\url{http://thinkpython2.com/code/polygon.py} 에서 얻을 수 있다. + + +\section{Turtle 모듈} +%The turtle module +\label{turtle} + +{\tt turtle} 모듈이 포함되어 있는지 확인해보고 싶으면 Python을 +인터프리터를 열어서 다음을 입력해보자. + + +\begin{verbatim} +>>> import turtle +>>> bob = turtle.Turtle() +\end{verbatim} + +이 코드를 실행하면 거북이를 나타내는 작은 화살표가 포함된 새로운 창이 +열린다. 확인했다면 창을 닫자. + +{\tt mypolygon.py}이라는 파일을 생성해서 다음의 내용을 입력해보자. + + +\begin{verbatim} +import turtle +bob = turtle.Turtle() +print(bob) +turtle.mainloop() +\end{verbatim} +% +{\tt turtle} 모듈 (소문자 't')은 {\tt Turtle}(대문자 'T')이라는 함수를 +제공한다. 이 함수는 Turtle 객체를 생성하는데 {\tt bob} 이라는 변수에 +할당했다. {\tt bob}을 출력하면 다음의 내용이 표시된다. + +\begin{verbatim} + +\end{verbatim} +% +{\tt bob} 이라는 변수는 {\tt turtle} 모듈에 정의되어 있는 {\tt + Turtle}이라는 객체를 가리킨다. + +마지막으로 \verb"mainloop"이 하는 일은 사용자가 무언가를 하기까지 새로 +뜬 창을 대기시킨다. 지금의 경우에는 창을 닫는 것 외에는 더 할 수 있는 +일이 없기는 한다. + +\texttt{Turtle}을 생성했다면 {\bf 메소드(method)}를 호출하여 거북이를 +창에서 움직일 수 있다. 메소드는 함수와 비슷한데 사용하는 문법이 약간 +다르다. 거북이를 전진시켜 보자. + +\begin{verbatim} +bob.fd(100) +\end{verbatim} +% +{\tt fd}라는 메소드는 {\tt bob}이라는 Turtle 객체와 연결되어 있다. +메소드의 호출은 마치 요청하는 것과 같다. {\tt bob}에게 전진 요청을 하는 +것이다. + +{\tt fd}의 인자는 픽셀단위의 거리이기 때문에 디스플레이 장치에 따라 다를 수 있다. + +\texttt{Turtle} 객체에서 호출 할 수 있는 메소드는 세 가지이다. {\tt + bk}는 뒤로 가기, {\tt lk}와 {\tt rk}는 각각 왼쪽과 오른쪽으로 +회전하기 메소드이다. {\tt lk}와 {\tt rk}의 인자 값은 각도이다. + +각 \texttt{Turtle}은 펜을 갖고 있는데, 이 펜을 들거나 내려 놓을 수 +있다. 펜을 내리면 \texttt{Turtle}이 이동한 흔적을 남길 수 있다. {\tt + pu}와 {\tt pd}는 각각 펜을 들기와 펜 내리기를 뜻한다. + +직각을 그리려면 다음의 줄들을 프로그램에 추가하자(위치는 {\tt bob}을 +생성한 줄과 \verb"mainloop"를 호출하는 줄 사이에 삽입하면 된다. + +\begin{verbatim} +bob.fd(100) +bob.lt(90) +bob.fd(100) +\end{verbatim} +% +이 프로그램을 실행하면, {\tt bob}이 동쪽으로 가다가 북으로 이동하고, 그 +길에 두 개의 줄을 남긴다. + +이제 프로그램을 수정하여 정사각형을 그려 보자. 정사각형 그리기를 +성공하기 전까지는 다음으로 넘어가지 말자. + +%\newpage + +\section{간단한 반복} +%Simple repetition +\label{repetition} +\index{repetition} + +정사각형을 그리기 위해 아마도 다음과 같이 작성했을 것이다. + +\begin{verbatim} +bob.fd(100) +bob.lt(90) + +bob.fd(100) +bob.lt(90) + +bob.fd(100) +bob.lt(90) + +bob.fd(100) +\end{verbatim} +% +{\tt for}문을 쓰면 훨씬 간결하게 똑같은 일을 해 낼 수 있다. 다음의 +예제를 {\tt mypolygon.py}에 추가하고 다시 실행시켜보자. +\index{for loop} +\index{loop!for} +\index{statement!for} + +\begin{verbatim} +for i in range(4): + print('Hello!') +\end{verbatim} +% +그 결과는 다음과 같은 것이다. + +\begin{verbatim} +Hello! +Hello! +Hello! +Hello! +\end{verbatim} +% +이 예제가 {\tt for}문을 쓰는 가장 간단한 형태이다. 나중에 좀 더 +살펴보자. 지금의 예제만으로도 정사각형을 그리는 프로그램을 더 단순하게 +다시 작성할 수 있을 것이다. 성공할 때까지 시도해보자. + +여기에 {\tt for}문을 써서 정사각형을 그리는 코드가 있다. + + +\begin{verbatim} +for i in range(4): + bob.fd(100) + bob.lt(90) +\end{verbatim} +% +{\tt for}문의 문법은 함수 정의와 유사하다. 콜론으로 끝이 나는 +헤더와 들여쓰기된 내용으로 구성된다. 내용에는 문장이 몇 개라도 포함될 +수 있다. + +{\tt for}문은 {\bf 반복문(루프, loop)}이라고도 불린다. 실행의 +흐름이 내용을 한 번 다 실행하고 다시 처음으로 돌아가서 실행하기 +때문이다. 이 경우에는 내용을 4번 반복한다. +\index{loop} + +이 버전은 이전의 정사각형을 그리는 코드와 약간 다르다. 정사각형의 +마지막 면을 그리고 난 뒤에 회전을 한 번 더 하기 때문이다. 추가 회전이 +있어 시간은 더 들지만 반복문 내에서 동일한 동작을 반복하기 때문에 코드 +복잡도는 낮아 지는 장점이 있다. 반복문을 사용하는 버전은 거북이를 +처음에 시작했던 위치와 방향으로 다시 돌려놓는 기능도 한다. + +\section{연습 문제} +%Exercises + +TurtleWorld를 활용하는 연습 문제들을 풀어 보자. 재미있을 뿐만 아니라 +의미도 있다. 하나씩 해결 할 때마다 어떤 의미를 갖는지 생각해보자. + +다음 절에는 연습 문제들의 해답이 있으니 다 풀기 전까지는 해답을 보지 +말자(최소한 시도는 해보자). + + +\begin{enumerate} + +\item {\tt square}라는 이름의 함수를 작성하고 거북이를 대신할 매개 + 변수는 {\tt t}로 하자. 거북이로 정사각형을 그려보자. + + {\tt bob}을 {\tt square}의 인자로 전달하여 호출하도록 수정하고 + 프로그램을 다시 실행해보자. + + +\item {\tt square} 함수에 {\tt length}라는 매개 변수를 추가 해보자. + 정사각형의 변이 {\tt length}가 되도록 수정하고, 함수를 호출하는 + 문장도 인자를 두 개를 받도록 수정하자. 프로그램을 재실행해보라. + {\tt length}에 다양한 값을 넣어 프로그램을 실험해보자. + + +\item {\tt square} 함수를 복사해서 {\tt polygon}이라는 함수를 만들자. + 그리고 {\tt n}이라는 매개 변수를 추가한 후 함수의 내용에 면이 n인 + 다각형을 그리도록 수정하자. 힌트: 다각형의 외각은 + $360/n$도이다. + \index{polygon function} \index{function!polygon} + +\item 거북이({\tt t})와 반지름({\tt r})을 매개 변수로 하는 {\tt + circle}이라는 함수를 작성해보자. 이 때 {\tt polygon} 함수를 + 활용하여 원에 근사한 도형을 그려보자. {\tt r}의 변경해보면서 함수를 + 검사해보자. + \index{circle function} \index{function!circle} + + 힌트: {\tt length * n = 둘레}를 만족하도록 값을 정하면 된다. + +\item {\tt circle}보다 좀 더 일반적인 {\tt arc}라는 함수를 만들어 + 보자. 이 함수는 추가로 {\tt angle}이라는 매개 변수를 받는다. {\tt + angle}는 몇 도 크기의 호를 그릴지 정하는 매개 변수이다. 단위는 + 도이다. {\tt angle=360}이라면 완전한 원을 그리게 된다. +\index{arc function} +\index{function!arc} + +\end{enumerate} + + +\section{캡슐화} +%Encapsulation + +첫 번째 연습 문제에서 정사각형 그리기 코드를 함수 정의로 만들고, +거북이를 매개 변수로 하여 함수를 호출하라고 했다. 여기 그 해답이 +있다. + + +\begin{verbatim} +def square(t): + for i in range(4): + t.fd(100) + t.lt(90) + +square(bob) +\end{verbatim} +% +가장 안쪽의 문장의 {\tt fd}와 {\tt lt}는 두 번 들여쓰기가 되어 {\tt + for} 반복문 안에 있다는 것과 반복문은 함수 정의 내에 있다는 것을 +나타낸다. 그 다음 줄의 {\tt square(bob)}문은 왼쪽 끝에 있기 때문에 +{\tt for} 반복문이나 함수 정의 내에 있지 않다는 것을 뜻한다. + +함수 내의 {\tt t}는 {\tt bob}과 동일한 거북이를 가리키기 때문에 {\tt + t.lt(90)}과 {\tt bob.lt(90)}는 서로 똑같은 결과를 갖는다. 그렇다면 +매개 변수를 {\tt bob}이라 부르지 않는 이유는 무엇일까? 그 이유는 {\tt + t}라고 쓰면 {\tt bob} 외에도 다른 거북이 객체들을 받을 수 있기 +때문이다. 두 번째 거북이를 만들고 {\tt square}의 인자로 전달 할 수도 +있을 것이다. + + +\begin{verbatim} +alice = turtle.Turtle() +square(alice) +\end{verbatim} +% +함수 내에 어떤 코드를 넣는 것을 보고 {\bf 캡슐화(encapsulation)}이라고 +한다. 캡슐화의 장점 중 하나는 코드에 이름을 붙일 수가 있다는 것이다. +또 다른 장점은 코드의 재활용이다. 함수의 내용을 복사 붙이기 보다 함수 +호출이 훨씬 간결하다! +\index{encapsulation} + + +\section{일반화} +%Generalization + +그 다음 과정은 {\tt square} 함수에 매개 변수 {\tt length}를 추가하는 +것이다. 해답은 다음과 같다. + + +\begin{verbatim} +def square(t, length): + for i in range(4): + t.fd(length) + t.lt(90) + +square(bob, 100) +\end{verbatim} +% +함수에 매개 변수를 추가하는 것을 {\bf 일반화(generalization)}이라 +한다. 함수를 좀 더 범용적으로 쓸 수 있기 때문이다. 이전의 버전에서는 +\texttt{square}는 언제나 동일한 크기를 가졌지만, 이번 버전에서는 길이를 +변경할 수 있게 되었다. +\index{generalization} + +다음 과정도 마찬가지로 일반화다. 정사각형만 그리는 대신 다각형를 +그릴 수 있는 {\tt polygon}을 만드는 것이다. 해답을 살펴보자. + +\begin{verbatim} +def polygon(t, n, length): + angle = 360 / n + for i in range(n): + t.fd(length) + t.lt(angle) + +polygon(bob, 7, 70) +\end{verbatim} +% +이 예제에서는 면의 길이기 70인 정칠각형을 그렸다. + +Python 2를 사용 중이라면 정수 나눗셈으로 인해 {\tt angle}의 값이 다를 +수 있다. 간단한 해결책으로 {\tt angle = 360.0 / n}으로 계산식을 바꿀 +수 있다. 분자가 소수점이기 때문에 결과도 소수점이 된다. +\index{Python 2} + +함수가 여러 개의 숫자를 인자로 받는다면 그 값이 어떤 값이 어떤 순서로 +써야하는지 잊기 쉽다. 그런 경우에는 이름과 매개 변수를 인자 목록에 +함께 적으면 좋다. + + +\begin{verbatim} +polygon(bob, n=7, length=70) +\end{verbatim} +% +매개 변수의 이름을 ``키워드''로서 포함시켰기 때문에 {\bf 키워드 + 인자}라고 부른다({\tt while}이나 {\tt def}와 같은 Python의 키워드와 +혼돈하면 안된다.) +\index{keyword argument} +\index{argument!keyword} + + +이 문법이 프로그램을 좀 더 읽기 쉽게 만든다. 또한 인자와 매개 변수가 +함수에서 어떻게 연관있는지를 알려주기도 한다. 함수를 호출하면 인자 +값이 매개 변수에 할당된다는 것이 명확해진다. + + + +\section{인터페이스 설계} +%Interface design + +그 다음 과정은 반지름을 매개 변수 {\tt r}로 하는 {\tt circle} 함수를 +작성하는 것이다. 이 해법은 {\tt polygon} 함수를 이용해 50각형을 그린다. + +\begin{verbatim} +import math + +def circle(t, r): + circumference = 2 * math.pi * r + n = 50 + length = circumference / n + polygon(t, n, length) +\end{verbatim} +% +첫 줄은 반지름을 {\tt r}로 하는 원의 둘레를 $ 2 \pi r$로 계산한다. +{\tt math.pi}를 쓰기 때문에 {\tt math} 모듈을 불러와야 한다. +{\tt import}문은 관례적으로 항상 스크립트의 첫 줄에 적는다. + +근사한 원의 둘레는 {\tt n}개의 선으로 표현하였고, {\tt length}는 그 +선의 길이를 나타낸다. 결과적으로 {\tt polygon}은 50각형을 그려서 +반지름 {\tt r}인 원을 근사화하고 있다. + +이 해법의 한계점은 {\tt n}이 상수라는 것이다. 그렇기 때문에 매우 큰 +원을 그릴 때는 다각형의 면이 매우 길어 질 것이고 아주 작은 원이라면 +매우 짧은 선을 그리는 시간 낭비를 한다. 이를 해결하려면 {\tt n}을 매개 +변수로 받으 일반화를 해야 한다. 인터페이스가 좀 복잡해지겠지만, {\tt + circle} 함수를 부르는 사용자가 제어권을 갖도록 한다. +\index{interface} + +{\bf 인터페이스(interface)}는 함수를 어떻게 쓸 수 있는지 알려주는 +요약이다. 어떤 매개 변수가 있고, 함수가 무엇을 하는지 그리고 어떤 +결과를 리턴하는지 알려준다. 인터페이스가 ``단순하면'' 불필요한 세부 +내용을 신경 쓰지 않고 원하는 것을 얻을 수 있다. + +이 예제에서는 그리려는 원의 크기를 정하기 위해 {\tt r}이 인터페이스에 +포함되어 있다. {\tt n}은 원이 어떻게 표현되어야 하는가에 대한 정보를 +담고 있기 때문에 적절하지는 않다. + +인터페이스를 복잡하게 만드는 대신 {\tt n}의 값을 둘레 {\tt + circumference}에 비례하도록 적절하게 정하는게 더 낫다. + + + +\begin{verbatim} +def circle(t, r): + circumference = 2 * math.pi * r + n = int(circumference / 3) + 3 + length = circumference / n + polygon(t, n, length) +\end{verbatim} +% +원을 이루는 선의 개수를 {\tt circumference/3}에 가까운 정수로 바꿨다. +한 선의 길이가 대략 3이 되도록 하였다. 원처럼 보일 수 있도록 충분히 +작고 효율적일 만큼 충분히 크며 어떤 원에도 무난한 길이이다. + + +그리고 삼격형보다 작은 다각형은 만들지 않도록 {\tt n}에 3을 더했다. + + +\section{리팩터링} +%Refactoring +\label{refactoring} +\index{refactoring} + +{\tt circle} 함수를 작성할 때 {\tt polygon} 함수를 재사용할 수 있었던 +이유는 다각형으로 원을 근사화할 수 있기 때문이다. {\tt arc}의 경우는 +{\tt polygon}나 {\tt circle}를 그대로 가져다 쓸 수 없다. + +대안으로 {\tt polygon}의 사본에서 시작해서 {\tt arc}로 내용을 변형하는 +방법이 있다. 그 결과는 다음과 같다. + +\begin{verbatim} +def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = angle / n + + for i in range(n): + t.fd(step_length) + t.lt(step_angle) +\end{verbatim} +% +이 함수의 하반부는 {\tt polygon}과 유사하게 생겼다. 그렇지만, {\tt + polygon}의 인터페이스를 변형하기 전에는 쓸 수가 없다. 각도가 {\tt + polygon} 함수의 세 번째 인자가 되도록 인터페이스를 수정할 수 있을 +것이다. 그렇게 되면 {\tt polygon}이라는 이름은 부적절 해진다! 대신 +변형된 이 함수의 이름을 {\tt 폴리라인(polyline)}이라 부르자. + +\begin{verbatim} +def polyline(t, n, length, angle): + for i in range(n): + t.fd(length) + t.lt(angle) +\end{verbatim} +% +이제 {\tt polygon}와 {\tt arc}가 {\tt polyline}를 사용하도록 변형해보자. + +\begin{verbatim} +def polygon(t, n, length): + angle = 360.0 / n + polyline(t, n, length, angle) + +def arc(t, r, angle): + arc_length = 2 * math.pi * r * angle / 360 + n = int(arc_length / 3) + 1 + step_length = arc_length / n + step_angle = float(angle) / n + polyline(t, n, step_length, step_angle) +\end{verbatim} +% +이제 {\tt arc}를 쓰도록 {\tt circle}를 수정할 수 있다. + +\begin{verbatim} +def circle(t, r): + arc(t, r, 360) +\end{verbatim} +% +인터페이스를 개선하고 코드의 재사용을 높이기 위한 프로그램의 재배치 +과정을 {\bf 리팩터링(refactoring)}이라 부른다. 지금의 경우, {\tt + arc}와 {\tt polygon}에 유사한 코드 부분이 있었기 때문에 {\tt + polyline}으로 ``공통 부분을 분리''했다. +\index{refactoring} + +미리 계획하여 {\tt polyline}을 작성했더라면 리팩터링 과정이 필요 없었을 +것이다. 하지만, 대체적으로 프로젝트 초반부에는 모든 인터페이스를 +설계하기에는 정보가 충분하지 않다. 코딩을 시작하면 그제야 문제에 대해 +좀 더 이해하게 된다. 때로는 리팩터링이 무언가를 배웠다는 것을 +반증해주기도 한다. + + +\section{개발 계획} +%A development plan +\index{development plan!encapsulation and generalization} + +{\bf 개발 계획}은 프로그램을 만드는 과정이다. 이 사례 연구에서 사용한 +``캡슐화와 일반화''도 프로그램 개발 과정의 일부다. 우리가 사용한 +과정을 정리해보자. + +\begin{enumerate} + +\item 함수 정의가 없는 작은 프로그램으로부터 시작한다. + +\item 동작하는 프로그램을 만들고 나면 서로 상관있는 코드들을 구분한다. + 그 코드를 함수로 캡슐화하고 이름을 붙있다. + +\item 함수에 적절한 매개 변수를 추가해서 일반화를 한다. + +\item 동작하는 함수가 될 때까지 과정 1에서 3을 반복한다. 재입력(그리고 + 디버깅)을 하지 않도록 동작하는 코드는 복사 붙이기 한다. + +\item 리팩터링을 통해 프로그램을 개선할 수 있는지 검토한다. 예를 + 들어, 유사한 코드가 여기 저기에 보이면 일반화된 함수로 리팩터링할 수 + 있는지 생각해본다. + +\end{enumerate} + +이 과정에는 몇 가지 단점이 있다. 그 대안들은 이후에 살펴볼 것이다. +그래도 이 방법은 프로그램을 함수로 나누는 어떻게 나눌지 개발 전에 미리 +알 수 없는 경우라면 충분히 의미있다. 개발하면서 설계도 같이 할 수 있기 +때문이다. + + +\section{설명 문자열} +%docstring +\label{docstring} +\index{docstring} + +함수의 시작 부분에 인터페이스를 설명하는 글을 {\bf 설명 + 문자열(docstring)}이라 한다(doc은 documentation의 약어이다. 예를 +살펴보자. + +\begin{verbatim} +def polyline(t, n, length, angle): + """Draws n line segments with the given length and + angle (in degrees) between them. t is a turtle. + """ + for i in range(n): + t.fd(length) + t.lt(angle) +\end{verbatim} +% +관례상 모든 설명 문자열은 멀티라인 문자열이라고도 불리는 세 개의 +큰따옴표로 싸여있다. 세 개의 큰따옴표는 여러 줄에 걸친 문자열을 +표현하는데 사용된다. +\index{quotation mark} +\index{triple-quoted string} +\index{string!triple-quoted} +\index{multiline string} +\index{string!multiline} + +이 함수를 사용하는데 간결하기는 하지만 꼭 필요한 정보를 포함하고 있다. +설명 문자열은 함수가 어떤 일을 하는지 요약한다(상세 동작 설명은 +제외한다). 매개 변수가 함수의 동작에 미치는 영향과 각 매개 변수는 어떤 +데이터 형을 갖는지를 설명한다(당연한 경우는 제외한다). + +이런 문서를 남기는 것은 인터페이스 설계에 있어 중요한 부분이다. 잘 +설계된 인터페이스라면 간단히 설명할 수 있어야 한다. 어떤 함수를 +설명하는데 애를 먹는다면 인터페이스에 개선의 여지가 있다는 말이다. + + +\section{디버깅} +%Debugging +\index{debugging} +\index{interface} + +인터페이스는 함수와 그 함수를 호출한 함수간의 계약과 같다. 호출한 +함수는 특정 매개 변수를 전달할 것을 그리고 함수는 그에 맞는 작업을 +한다는 것을 약속한다. + +예를 들면, {\tt polyline}은 거북이 객체 {\tt t}, 정수 {\tt n}, 양수 +{\tt length}, 각도를 나타나는 숫자 {\tt angle}이라는 네 개의 인자가 +필요하다. + +이러한 요구사항을 {\bf 사전 조건(precondition)}이라고 부른다. 함수 +실행 전에 기본적인 조건이 참이어야 하기 때문이다. 반대로 말하면, +함수의 끝에 있는 조건을 {\bf 사후 조건(postcondition)}이라 부른다. +사후 조건은 의도된 함수의 결과와 (예, 원을 이루는 선 그리기), 의도하지 +않은 부차적 동작의 결과(거북이를 이동한다거나 다른 변경들)를 포함한다. +\index{precondition} +\index{postcondition} + +사전 조건를 잘 지정하는 것은 호출하는 함수의 책임이다. 호출하는 함수가 +(문서화를 잘했는데도 불구하고) 전제 조건의 값을 제대로 지정하지 못하면 +함수는 정확하게 동작하지 않는다. 함수에 문제가 있어서가 아니라 +호출하는 함수에 버그가 있어서 잘못된 결과를 얻은 것이다. + +사전 조건이 충족되었더라도 사후 조건이 아니라면 버그는 함수에 있다. +명료한 사전/사후 조건은 디버깅하는데 도움이 된다. + + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[메소드(method):] 객체에 속해 있는 함수로 호출하기 위해 닷표기법을 + 사용함 +\index{method} + +\item[반복문(루프, loop):] 반복적으로 실행되는 프로그램의 한 부분 +\index{loop} + +\item[캡슐화(encapsulation):] 일련의 문장들을 함수 정의로 변환하는 과정 +\index{encapsulation} + +\item[일반화(generalization):] 불필요하게 구체적인(특정 숫자와 같은) + 것을 좀 더 일반적인(변수나 매개 변수) 것으로 교체하는 과정 +\index{generalization} + +\item[키워드 인자(keyword argument):] 매개 변수 명을 ``키워드''로 + 인자에 포함하는 것 +\index{keyword argument} +\index{argument!keyword} + +\item[인터페이스(interface):] 함수의 사용법에 대한 설명으로 이름과 + 인자에 대한 설명 그리고 리턴 값을 포함함 +\index{interface} + +\item[리팩터링(refactoring):] 동작하는 프로그램의 함수의 인터페이스와 + 코드를 개선하는 과정 +\index{refactoring} + +\item[개발 계획(development plan):] 프로그램을 작성하는 과정 +\index{development plan} + +\item[설명 문자열(docstring):] 함수 정의의 시작 부분에 작성된 함수의 + 인터페이스에 대한 설명 +\index{docstring} + +\item[사전 조건(precondition):] 호출한 함수가 해당 함수를 실행하기 전에 + 만족해야 할 조건 +\index{precondition} + +\item[사후 조건(postcondition):] 함수가 종료하기 전에 만족시켜야 할 요구 사항 +\index{precondition} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +이 장의 코드를 다음의 주소에서 다운 받자. +\url{http://thinkpython2.com/code/polygon.py}. + +\begin{enumerate} + +\item {\tt circle(bob, radius)}가 실행 중일 때 프로그램의 스택 상태도를 + 그려라. 손으로 계산하거나 {\tt print}문을 코드에 넣어도 된다. +\index{stack diagram} + +\item \ref{refactoring}절의 {\tt arc}는 아주 정확한 것은 아니다. 원의 + 선형 근사치는 언제나 원 밖에 존재하기 때문이다. 그 결과로 거북이는 + 정확한 위치에서 몇 픽셀씩 벗어나게 된다. 여기에 나와 있는 해법은 그 + 에러를 줄일 수 있는 방법을 제시한다. 코드를 읽어보고 이해가 가는지 + 보라. 그림을 그리면 어떻게 동작하는지 알 수 있을 것이다. + +\end{enumerate} + +\end{exercise} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/flowers.pdf}} +\caption{거북이 꽃.} +\label{fig.flowers} +\end{figure} + +\begin{exercise} +\index{flower} + +일반 함수들을 작성해서 그림~\ref{fig.flowers}의 꽃을 그려보라. + + +해법: \url{http://thinkpython2.com/code/flower.py}, +필요한 것 \url{http://thinkpython2.com/code/polygon.py}. + +\end{exercise} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/pies.pdf}} +\caption{거북이 파이.} +\label{fig.pies} +\end{figure} + + +\begin{exercise} +\index{pie} + +그림~\ref{fig.pies}를 그릴 수 있는 일반 함수들을 작성하라. + + +해법: \url{http://thinkpython2.com/code/pie.py}. + +\end{exercise} + +\begin{exercise} +\index{alphabet} +\index{turtle typewriter} +\index{typewriter, turtle} + +영문 철자는 수직과 수평 선 그리고 몇 개의 곡선의 기본 요소들로 구성되어 +있다. 이 기본 요소들을 최소한으로 사용하여 그릴 수 있는 철자를 +설계해보라. 그리고, 그 철자들을 그리는 함수를 작성하라. + +\verb"draw_a"와 \verb"draw_b"같은 식으로 각 철자마다 함수를 만들어서 +{\tt letters.py} 안에 저장하라. +\url{http://thinkpython2.com/code/typewriter.py}에 ``거북이 +타자기(turtle typewriter)''를 다운로드 받아 코드를 시험해볼 수 있다. + +\url{http://thinkpython2.com/code/letters.py}에 다운로드 받을 수 +있다. \url{http://thinkpython2.com/code/polygon.py}도 필요할 것이다. + + +\end{exercise} + +\begin{exercise} + + \url{http://en.wikipedia.org/wiki/Spiral}에서 나선에 대해 읽은 후 + 아르케메데스의 나선(또는 그와 유사한 나선)을 그리는 프로그램을 작성해 + 보라. 해답은 \url{http://thinkpython2.com/code/spiral.py}. +\index{spiral} +\index{Archimedian spiral} + +\end{exercise} + + +\chapter{조건문과 재귀문} +%Conditionals and recursion +프로그램의 상태에 따라 다른 코드를 실행하는 {\tt if}문이 이 장의 핵심 +주제이다. 그 전에 내림 나눗셈 연산자와 나머지 연산자를 살펴보자. + + +\section{내림 나눗셈과 나머지 연산자} +%Floor division and modulus + +%{\ +{\bf 내림 나눗셈} 연산자 \verb"//"는 두 수를 나누어 얻은 결과 값의 정수 +값을 취한다. 예를 들어, 105분 길이의 영화가 있다고 했을 때 몇 시간 +짜리 영화인지 궁금할 때가 있다. 이런 경우 일반 나눗셈을 사용하면 +부동소수점 값을 얻는다. + +\begin{verbatim} +>>> minutes = 105 +>>> minutes / 60 +1.75 +\end{verbatim} + +하지만, 일반적으로 시간을 소수점으로 표현하지 않는다. 내림 나눗셈은 +소수점 부분을 버리고 정수부분만 리턴한다. + + +\begin{verbatim} +>>> minutes = 105 +>>> hours = minutes // 60 +>>> hours +1 +\end{verbatim} + +나머지를 원하면 60분에서 계산된 시간 값을 제외한 나머지 분을 빼면 된다. + +\begin{verbatim} +>>> remainder = minutes - hours * 60 +>>> remainder +45 +\end{verbatim} + +\index{floor division} +\index{floating-point division} +\index{division!floor} +\index{division!floating-point} +\index{modulus operator} +\index{operator!modulus} + +이런 복잡한 계산 대신 나눗셈 후 나머지 값을 리턴하는 {\bf 나머지 + 연산자} \verb"%"를 사용할 수 있다. + +\begin{verbatim} +>>> remainder = minutes % 60 +>>> remainder +45 +\end{verbatim} +% +나머지 연산자는 보기보다 매우 유용한다. 한 가지 예를 들어 보면, 나머지 +연산자는 어떤 값이 서로 나누어 떨어지는 지 확인할 때 쓸 수있다. {\tt + x \% y}가 영이라면 {\tt x}는 {\tt y}로 나누어 떨어진다. +\index{divisibility} + +또한, 어떤 숫자의 가장 오른쪽 자리수를 얻을 때 나머지 연산자를 쓸 수 +있다. {\tt x \% 10}을 계산하면 {\tt x}(십진수라 가정)의 1의 자리 값을 +얻는다. 마찬가지로 {\tt x \% 100}을 하면 마지막 두 자리 수를 얻는다. + +Python 2를 사용 중이라면 나눗셈은 다르게 동작한다. 나눗셈 연산자 +\verb"/"은 두 수가 모두 정수이면 내림 나눗셈을하고 두 값 중 하나라도 +{\tt 실수} 형면 부동소수점 나눗셈을 한다. +\index{Python 2} + + +\section{Boolean 표현식} +%Boolean expressions +\index{boolean expression} +\index{expression!boolean} +\index{logical operator} +\index{operator!logical} + +{\bf Boolean 표현식(boolean expression)}은 참또는 거짓을 나타내는 +표현식이다. 다음의 예들은 두 피연산자를 비교하는 {\tt ==} 연산자를 +사용한다. 두 값이 동일하면 {\tt True(참)}을 다르면 {\tt + False(거짓)}이다. + +\begin{verbatim} +>>> 5 == 5 +True +>>> 5 == 6 +False +\end{verbatim} +% +이 값은 문자열이 아니고, {\tt bool(불)} 데이터 형에 속한{\tt True}와 +{\tt False}는 특별한 값이다. +\index{True special value} +\index{False special value} +\index{special value!True} +\index{special value!False} +\index{bool type} +\index{type!bool} + +\begin{verbatim} +>>> type(True) + +>>> type(False) + +\end{verbatim} +% +{\tt ==} 연산자는 {\bf 관계 연산자(relational operator)} 중 하나이다. +나머지는 다음과 같다. + +\begin{verbatim} + x != y # x 는 y와 같지 않음 + x > y # x 는 y보다 큼 + x < y # x 는 y보다 작음 + x >= y # x 는 y보다 크거나 같음 + x <= y # x 는 y보다 작거나 같음 y +\end{verbatim} +% +이 연산자들이 익숙해 보일 수 있지만, Python에서 사용하는 기호가 수학 +기호와 다르다. 가장 흔한 실수는 하나의 등호({\tt =})를 써서 두 값이 +같은지 비교({\tt ==})하는 것이다. {\tt =}는 할당 연산자이고 {\tt ==}가 +관계 연산자인 것을 기억해야 한다. 그리고 {\tt =<}나 {\tt =>}와 같은 +연산자는 없다. + +\index{relational operator} +\index{operator!relational} + + +\section {논리 연산자} +%Logical operators +\index{logical operator} \index{operator!logical} 세 개의 {\bf 논리 + 연산자(logical operator)}가 있다. 각각은 {\tt and}, {\tt or}, 그리고 +{\tt not}이다. 이 연산자들의 의미는 영어에서의 각 단어의 의미와 같다. +예를 들어, {\tt x > 0 and x < 10} 은 {\tt x}가 0보다 크{\em고} 10보다 +10보다 작을 때 참이 된다. +\index{and operator} +\index{or operator} +\index{not operator} +\index{operator!and} +\index{operator!or} +\index{operator!not} + +{\tt n\%2 == 0 or n\%3 == 0} 은 {\em 둘 중 하나만} 또는 {\em둘 다} 참일 +때 참이 된다. 즉, 2 {\em 또는} 3으로 나누어 지거는 경우이다. + +마지막으로 {\tt not} 연산자는 boolean 표현식의 반대 값을 취한다. {\tt not + (x > y)}는 {\tt x > y}가 거짓일 때 참이 된다. 즉, {\tt x}가 {\tt + y}보다 작거나 같은 경우이다. + +정확하게 말하면, 논리 연산자의 피연산자는 boolean 표현식이어야하지만, +Python이 그렇게 엄격하지는 않다. 0이 아닌 어떤 수이기만 하면 {\tt + True}으로 인식한다. + +\begin{verbatim} +>>> 42 and True +True +\end{verbatim} +% +이러한 유연성이 도움이 될 때도 있지만, 미묘한 부분도 있기 때문에 혼돈이 +있을 수도 있다. 이렇게 사용하는 것은 피하는게 좋다(뭘 하는지 정확히 +알고 있다면 모를까). + + +\section{조건부 실행} +%Conditional execution +\label{conditional.execution} + +\index{conditional statement} +\index{statement!conditional} +\index{if statement} +\index{statement!if} +\index{conditional execution} + +프로그램을 유용하게 만들려면 프로그램이 상황에 맞게 동작할 수 있도록 +조건을 검사하는 능력이 반드시 필요하다. {\bf 조건문(conditional + statement)}이 바로 그 능력을 갖고 있다. 그 중 가장 간단한 것은 {\tt + if}문이다. + +\begin{verbatim} +if x > 0: + print('x is positive') +\end{verbatim} +% +{\tt if}문 이후의 boolean 표현식은 {\bf 조건(condition)}이라 부른다. +참이라면, 의도한 문장이 실행되고 그렇지 않다면 아무 일도 일어 나지 +않는다. +\index{condition} +\index{compound statement} +\index{statement!compound} + +헤더와 들여쓰기된 내용으로 구성된 함수 정의처럼 {\tt if}문도 헤더와 +내용을 갖고 있다. 이런 류의 문장들을 {\bf 복합문(compound + statement)}라고 부른다. + +내용에 포함될 수 있는 문장의 수가 정해지지 않았지만 최소한 하나는 +있어야 한다. 때로는 어떤 문장도 없는 내용이 필요할 때도 있다(아직 적지 +않은 코드를 대신해서 자리만 차지하는 기호를 쓸 수도 있다). 그 때에는 +아무 일도 하지 않는 {\tt pass}문을 쓰면 된다. +\index{pass statement} +\index{statement!pass} + +\begin{verbatim} +if x < 0: + pass # TODO: 음수 처리해야 함! +\end{verbatim} +% + +\section{선택적 실행} +%Alternative execution +\label{alternative.execution} +\index{alternative execution} +\index{else keyword} +\index{keyword!else} + +{\tt if}문의 두 번째 형식은 ``선택적 실행(aternative +execution)''이다. 두 가지 대안이 존재하고 조건 검사를 통해 대안 중 +하나를 선택하여 실행한다. 문법은 다음과 같다. + +\begin{verbatim} +if x % 2 == 0: + print('x는 짝수') +else: + print('x는 음수') +\end{verbatim} +% +{\tt x}를 2로 나눈 나머지가 0이라면 {\tt x}가 짝수이고, 프로그램은 +걸맞는 메시지를 표시한다. 조건이 거짓이라면, 두 번째 부분의 문장이 +실행된다. 조건은 참이거나 거짓이기 때문에 둘 중에 정확히 하나만 +선택적으로 실행된다. 실행의 흐름이 분리되므로 이러한 종류의 선택지를 +{\bf 분기(branch)}라고 부른다. \index{branch} + + + +\section{연쇄 조건문} +%Chained conditionals +\index{chained conditional} +\index{conditional!chained} + +두 개 이상의 가능성이 있는 경우 두개 이상의 분기가 필요하다. 이런 류의 +연산을 {\bf 연쇄 조건문(chained conditional)}이다. + + +\begin{verbatim} +if x < y: + print('x is less than y') +elif x > y: + print('x is greater than y') +else: + print('x and y are equal') +\end{verbatim} +% +{\tt elif}는 ``else if''의 약어이다. 다시 한 번 말하지만, 선택된 +분기가 실행된다. {\tt elif}문이 몇 개가 있던 상관없다. {\tt else} +절을 만나면 거기가 마지막이지만, 꼭 필요한 것은 아니다. +\index{elif keyword} +\index{keyword!elif} + +\begin{verbatim} +if choice == 'a': + draw_a() +elif choice == 'b': + draw_b() +elif choice == 'c': + draw_c() +\end{verbatim} +% +각 조건은 순차적으로 검사된다. 처음 조건이 거짓이면 다음 조건을 +검사하는 식이다. 참인 조건을 만나면 해당 분기가 실행되고 {\tt if}문은 +종료한다. 여러 개의 조건이 참이 될 수는 있는지 첫 번째 참이 조건만 +실행이 된다. + + + +\section{중첩된 조건문} +%Nested conditionals +\index{nested conditional} +\index{conditional!nested} + +조건문은 다른 조건문 내에 포함될 수 있다. 전 절에서 봤던 예제를 다음과 +같이 적을 수도 있다. + +\begin{verbatim} +if x == y: + print('x and y are equal') +else: + if x < y: + print('x is less than y') + else: + print('x is greater than y') +\end{verbatim} +% +처음 만나는 조건문은 분기가 두개다. 첫 번째 분기는 간단한 +\texttt{printf}문이다. 두 번째 분기는 또 다른 {\tt if}문을 포함하고 +있다. 내부의 {\tt if}문도 두 개의 분기를 갖고 있다. 각 분기의 내용도 +간단한 문장이지만, 이 문장들도 또 다른 조건문이었을 수도 있다. + +문장 들여쓰기를 하면 구조가 시각적으로 명확해지긴 하지만, {\bf 중첩 + 조건문(nested conditionals)}을 사용하면 읽기가 어려워진다. 가능하면 +쓰지 않는 방법을 찾는 것이 좋다. + +논리 연산자를 쓰면 중첩된 조건문이 간단해지는 경우가 많다. 다음의 +코드를 하나의 조건문으로 바꿔보자. + + +\begin{verbatim} +if 0 < x: + if x < 10: + print('x is a positive single-digit number.') +\end{verbatim} +% +{\tt print}문은 두 개의 조건문을 모두 통과 했을 때만 실행이 된다. 이와 +같은 경우에 {\tt and} 연산자를 쓰면 동일한 효과를 볼 수 있다. + +\begin{verbatim} +if 0 < x and x < 10: + print('x is a positive single-digit number.') +\end{verbatim} + +이와 같은 조건문에 Python은 더 간단한 표기법을 제공한다. + +\begin{verbatim} +if 0 < x < 10: + print('x is a positive single-digit number.') +\end{verbatim} + + +\section{재귀문} +%Recursion +\label{recursion} +\index{recursion} + +어느 한 함수가 또 다른 함수를 부르는 것은 전혀 이상하지 않다. 그렇기 +때문에 어떤 함수가 자기 자신을 부르는 것도 가능하다. 함수가 자신을 +부르는 것이 유용한 것인지 확신이 서지 않을 수도 있다. 나중에 +알게되겠지만, 프로그램이 할 수 있는 가장 마법같은 일 중 +하나가 재귀적 호출이다. 예로 다음의 함수를 살펴보자. + + +\begin{verbatim} +def countdown(n): + if n <= 0: + print('발사!') + else: + print(n) + countdown(n-1) +\end{verbatim} +% +{\tt n}이 0이거나 음수이면 ``발사!''고 표시하고 그 외의 경우에는 {\tt + n}을 화면에 적고 {\tt n-1}을 인자로하여 자기 자신({\tt countdown})을 +호출한다. + +다음과 같이 함수를 호출하면 어떻게 될까? + +\begin{verbatim} +>>> countdown(3) +\end{verbatim} +% +{\tt countdown}은 {\tt n=3}에서 실행된다. {\tt n}은 0보다 크기 때문에 +3을 출력하고 자신을 호출한다. + + +\begin{quote} +{\tt countdown}은 {\tt n=2}에서 실행된다. {\tt n}은 0보다 크기 때문에 +2을 출력하고 자신을 호출한다. + + +\begin{quote} +{\tt countdown}은 {\tt n=1}에서 실행된다. {\tt n}은 0보다 크기 때문에 +1을 출력하고 자신을 호출한다. + + +\begin{quote} +{\tt countdown}은 {\tt n=0}에서 실행된다. {\tt n}은 + 0이기 때문에 ``발사!''라고 화면에 표시하고 리턴한다. +\end{quote} + +\end{quote} + +{\tt n=2}을 받은 {\tt countdown}이 리턴한다. +\end{quote} + +{\tt n=3}을 받은 {\tt countdown}이 리턴한다. + +그리고 나면, \verb"__main__"으로 돌아온다. 최종적으로 다음과 같이 +표시된다. +\index{main} + +\begin{verbatim} +3 +2 +1 +발사! +\end{verbatim} +% +함수가 자기 자신을 호출하는 것을 보고 {\bf 재귀적(recursive)}이라고 +한다. {\bf 재귀문(recursion)}은 함수를 재귀적으로 실행시키는 과정을 +말한다. +\index{recursion} +\index{function!recursive} + +또 다른 예로, 어떤 문자열을 {\tt n}번 표시하는 함수를 작성해보자. + +\begin{verbatim} +def print_n(s, n): + if n <= 0: + return + print(s) + print_n(s, n-1) +\end{verbatim} +% +{\tt n <= 0}이면 {\bf 리턴문(return statement)}으로 함수가 종료된다. +실행의 흐름은 호출한 함수에게 즉시 리턴된다. 그리고 함수의 나머지 +부분은 실행되지 않는다. +\index{return statement} +\index{statement!return} + +함수의 나머지 부분은 {\tt countdown}과 유사하다. {\tt s}를 표시하고 +$n-1$번 {\tt s}를 출력하도록 자기 자신을 다시 호출한다. 결과로 +표시되는 줄의 수가 {\tt 1 + (n - 1)}이기 때문에 총 {\tt n}번이 된다. + + +이처럼 간단한 예에서는 {\tt for} 루프를 사용하는게 더 쉬울 수 도 있다. +하지만 우리가 이후에 보게 될 좀 더 복잡한 예제들은 {\tt for} 루프로 +표현하기가 어렵다. 어려운 거라면 미리 시작해서 익숙해지는 것이 좋다. +\index{for loop} +\index{loop!for} + + +\section{재귀 함수의 스택 상태도} +%Stack diagrams for recursive functions +\label{recursive.stack} +\index{stack diagram} +\index{function frame} +\index{frame} + +\ref{stackdiagram}절에서 함수 호출 중에 프로그램의 상태를 스택 상태도로 +표현하였었다. 똑같은 그림을 재귀문을 이해하는데도 쓸 수 있다. + +함수가 호출될 때마다 Python은 프레임을 생성하여 함수의 지역 변수와 매개 +변수를 저장한다. 재귀문을 쓰게 되면 스택에 하나 이상의 프레임이 +동시에 여러 개가 존재할 수 있다. + +그림~\ref{fig.stack2}은 {\tt countdown}을 {\tt n = 3}을 인자로 하여 +호출했을 때의 스택 상태도를 나타낸다. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/stack2.pdf}} +\caption{스택 상태도.} +\label{fig.stack2} +\end{figure} + +스택의 최상위 프레임에 \verb"__main__"가 있다. 프레임에 아무 것도 없는 +이유는 \verb"__main__"가 어떤 변수도 생성하지 않았고 인자도 전달받지 +못했기 때문이다. +\index{base case} +\index{recursion!base case} + +네 개의 {\tt countdown} 프레임들은 매개 변수 {\tt n}이 모두 다르다. +{\tt n = 0}이 있는 스택 프레임을 {\bf 기준 케이스(base case)}라 +부른다. 더 이상 재귀 호출을 하지 않기 때문에 그 이하로는 프레임이 +없다. + + +연습삼아 \verb"s = 'Hello'"와 {\tt n=2}를 인자로 \verb"print_n"가 +호출되었을 때의 스택 상태도를 그려보자. 그리고 함수 객체와 {\tt n}을 +인자로 하는 \verb"do_n" 함수를 만들어서 그 함수를 {\tt n}번 호출해 +보자. + + +\section{무한 재귀문} +%Infinite recursion +\index{infinite recursion} +\index{recursion!infinite} +\index{runtime error} +\index{error!runtime} +\index{traceback} + +재귀문이 기준 케이스에 도달하지 못한다면 재귀문은 끝없이 호출되고 +프로그램은 절대로 종료하지 않는다. 이것이 {\bf 무한 재귀문(infinite + recursion)}이고 일반적으로 나쁘다. 무한 재귀문의 한 짧은 +예를 살펴보자. + + +\begin{verbatim} +def recurse(): + recurse() +\end{verbatim} +% +대부분의 프로그래밍 환경에서 무한 재귀문을 갖는 프로그램이 무한히 +동작하는 일은 없다. 프로그램이 최대 재귀 가능 횟수에 도달하면 Python은 +오류 메시지를 보고 한다. +\index{exception!RuntimeError} +\index{RuntimeError} + +\begin{verbatim} + File "", line 2, in recurse + File "", line 2, in recurse + File "", line 2, in recurse + . + . + . + File "", line 2, in recurse +RuntimeError: Maximum recursion depth exceeded +\end{verbatim} +% +이 트레이스백은 이 전 장에서 살펴보았던 보다 좀 더 길다. 오류가 +발생하면서 스택에 1,000개의 {\tt recurse} 프레임이 생겼다. + +실수로 무한 재귀문을 만나게 되면 재귀 호출에 기준 케이스가 있는지 +함수를 확인해야 한다. 기준 케이스가 있다면 그 부분에 도달 가능한지 +확인해야 한다. + + + +\section{키보드 입력} +%Keyboard input +\index{keyboard input} + +지금까지 작성한 모든 프로그램은 사용자 입력이 없었다. 실행하면 +똑같은 동작만 했다. + +Python은 {\tt input}이라는 내장 함수를 제공한다. 이 함수는 잠시 멈춰서 +사용자가 입력하기를 기다린다. 사용자가 {\sf Return} 또는 {\sf + Enter}키를 누르면 프로그램은 계속 동작하고 \verb"input"은 사용자가 +입력한 문자열을 리턴한다. Python 2에서는 똑같은 일을 하는 함수를 +\verb"raw_input"이라 부른다. + +\index{Python 2} +\index{input function} +\index{function!input} + +\begin{verbatim} +>>> text = input() +What are you waiting for? +>>> text +'What are you waiting for?' +\end{verbatim} +% +사용자로 부터 입력을 받기 전에 어떤 것을 입력할지 알려주는 것이 좋다. +\verb"input"는 인자로 프롬프트의 내용을 갖는다. +\index{prompt} + +\begin{verbatim} +>>> name = input('당신은 누구죠?\n') +당신은 누구죠? +영국의 왕, 아서! +>>> name +'영국의 왕, 아서!' +\end{verbatim} +% +프롬프트의 마지막 부분의 \verb"\n"은 {\bf 새 줄(newline)}을 나타내는 +특수 기호로 줄을 바꾼다. 그렇기 때문에 사용자 입력 위치가 프롬프트 아래에 있다. +\index{newline} + +정수를 입력하기를 바란다면 리턴 값을 {\tt int}으로 변환할 수 있다. + +\begin{verbatim} +>>> prompt = '짐을 메달고 있지 않은 제비의 속도는?\n' +>>> speed = input(prompt) +짐을 메달고 있지 않은 제비의 속도는? +42 +>>> int(speed) +42 +\end{verbatim} +% +하지만 사용자가 숫자 말고 다른 것을 입력하면 오류가 발생한다. + +\begin{verbatim} +>>> speed = input(prompt) +짐을 메달고 있지 않은 제비의 속도는? +그 제비가 아프리카 제비야 아니면 영국 제비야? +>>> int(speed) +ValueError: invalid literal for int() with base 10 +\end{verbatim} +% +이런 류의 오류를 다루는 법을 나중에 보도록 하겠다. +\index{ValueError} +\index{exception!ValueError} + + +\section{디버깅} +%Debugging +\label{whitespace} +\index{debugging} +\index{traceback} + +문법 오류나 실행 중에 발생하는 오류에는 많은 정보가 담겨 있다. 때로는 +벅차게 많을 수도 있다. 그 중에 중요한 정보들은 다음과 같다. + + +\begin{itemize} + +\item 어떤 종류의 오류인가 + +\item 어디서 발생했는가 + +\end{itemize} + +문법 오류는 대체적으로 찾기가 쉽지만 몇 개는 눈에 잘 안 띄기도 한다. +사이띄기와 탭 문자 같은 공백과 관련한 오류들은 보이지 않기 때문에 쉽게 +지나치곤 한다. 그래서 찾기가 쉽지 않다. +\index{whitespace} + +\begin{verbatim} +>>> x = 5 +>>> y = 6 + File "", line 1 + y = 6 + ^ +IndentationError: unexpected indent +\end{verbatim} +% +이 예제에서의 문제는 두 번째 줄이 한 칸 들여쓰기되어 있다는 것이다. +그렇지만 오류 메시지는 {\tt y}를 가리키고 있기 때문에 오해하기 쉽다. +일반적으로 오류 메시지는 오류가 발견된 시점을 나타내기 때문에 실제 +오류는 코드의 이전에서 이미 있었을 수도 있다. 심지어는 전 줄에 오류가 +있었을 수도 있다. +\index{error!runtime} +\index{runtime error} + +실행 중 발생 오류에서도 마찬가지다. 신호대잡음비를 데시벨로 계산한다고 +해보자. 계산식은 $SNR_{db} = 10 \log_{10} (P_{signal} / +P_{noise})$이다. Python에서는 이 식을 작성하면 다음과 같다. + +\begin{verbatim} +import math +signal_power = 9 +noise_power = 10 +ratio = signal_power // noise_power +decibels = 10 * math.log10(ratio) +print(decibels) +\end{verbatim} +% +이 프로그램을 실행하면 예외처리가 된다. +% +\index{exception!OverflowError} +\index{OverflowError} + +\begin{verbatim} +Traceback (most recent call last): + File "snr.py", line 5, in ? + decibels = 10 * math.log10(ratio) +ValueError: math domain error +\end{verbatim} +% +이 오류 메시지는 5번 줄을 가리키고 있지만 그 줄에는 문제가 없다. 실제 +오류를 찾으려면 {\tt ratio}의 값을 출력해보는게 좋다. 출력해보면 0 +값을 리턴 받는다. 실제 문제는 내림 나눗셈을 하는 4번 줄에 있다. +소수점 단위의 나눗셈을 했어야 했다. +\index{floor division} +\index{division!floor} + +오류 메시지를 읽는데 충분한 시간을 들여야 하겠지만, 그 하는 말을 모두 +참이라 믿어서는 안된다. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[내림 나눗셈(floor division):] {\tt //}로 표시되는 연산자로서 두 + 수를 나눈 결과를 정수가 되도록 소수점을 버림 + \index{floor division} + \index{division!floor} + +\item[나머지 연산자(modulus operator):] 퍼센트({\tt \%}) 기호를 갖는 + 연산자로 두 정수를 나눈 나머지 값을 돌려줌 +\index{modulus operator} +\index{operator!modulus} + +\item[Boolean 표현식(boolean expression):] 결과가 항상 참({\tt + True})이거나 거짓({\tt False})인 표현식 +\index{boolean expression} +\index{expression!boolean} + +\item[관계 연산자(relational operator):] 피연산자를 비교하는 연산자로서 + 다음의 종류가 있음: {\tt ==}, {\tt !=}, {\tt >}, {\tt <}, {\tt >=}, + {\tt <=}. + +\item[논리 연산자(logical operator):] Boolean 표현식들을 서로 연결하는 + 연산자: {\tt and}, {\tt or}, {\tt not}이 있음 + +\item[조건문(conditional statement):] 어떤 조건에 따라 실행의 흐름을 + 결정하는 문장 +\index{conditional statement} +\index{statement!conditional} + +\item[조건(condition):] 조건문에서 어떤 분기가 실행될지를 결정하는 boolean 표현식 +\index{condition} + +\item[복합문(compound statement):] 헤더와 내용으로 구성된 문장으로 + 헤더는 콜론(:)으로 끝이 나나. 복합문의 내용은 헤더 위치에서 + 상대적으로 들여쓰기함 +\index{compound statement} + +\item[분기(branch):] 조건문에서 선택적으로 실행되는 일련의 문장 +\index{branch} + +\item[연쇄 조건문(chained conditional):] 여러 개의 선택적 분기문으로 구성된 조건문 +\index{chained conditional} +\index{conditional!chained} + +\item[중첩 조건문(nested conditional):] 어떤 조건문의 분기 내있는 또 다른 조건문 +\index{nested conditional} +\index{conditional!nested} + +\item[리턴문(return statement):] 함수를 호출한 문장으로 즉시 리턴하는 문장 + +\item[재귀문(recursion):] 현재 실행 중인 함수를 호출하는 과정 +\index{recursion} + +\item[기준 케이스(base case):] 재귀문에서 재귀 호출을 하지 않는 조건 분기 +\index{base case} + +\item[무한 재귀문(infinite recursion):] 기준 케이스가 없거나 절대 + 도달하지 못하는 재귀문. 무한 재귀문을 실행하면 실행 중 오류가 + 발생하게 됨 +\index{infinite recursion} + +\end{description} + +\section{연습 문제} +%Exercises + +\begin{exercise} + +{\tt time} 모듈은 {\tt time} 함수를 제공한다. 임의의 기준 시점에서 +시작하는 ``에포크(the epoch)''를 기준으로 현재 그린위치 평균시를 +리턴함. UNIX 시스템에서는 에포크는 1970 1월 1일이다. + + +\begin{verbatim} +>>> import time +>>> time.time() +1437746094.5735958 +\end{verbatim} + +현재 시간을 읽어서 시, 분, 초, 그리고 에포크로부터 현재까지 지난 날 +수를 리턴하는 스크립트를 작성하라. + +\end{exercise} + + +\begin{exercise} +\index{Fermat's Last Theorem} + +페르마의 마지막 정리는 $n$이 2보다 큰 경우 $a$, $b$, $c$의 양의 정수에 +대해 다음의 방정식은 해를 갖지 않는다는 정리이다. + +\[ a^n + b^n = c^n \] +% + +\begin{enumerate} + +\item 네 개의 변수---{\tt a}, {\tt b}, {\tt c}, {\tt n}---를 받아 $n$이 + 2보다 큰 경우에 대해 페르마의 마지막 정리가 참인지 검사하는 + \verb"check_fermat" 함수를 작성하라. + +\[a^n + b^n = c^n \] +% +위의 식이 참이라면 ``어머나, 페르마가 틀렸었네!'', 거짓이라면 ``역시 +없구나.''를 출력하도록 만들어라. + + +\item 사용자가 {\tt a}, {\tt b}, {\tt c}, {\tt n} 값을 정하도록 하고, + 입력 받은 값을 정수로 변환하여 \verb"check_fermat"의 입력으로 쓰는 + 함수를 만들어라. 입력 받은 값으로 페르마의 정리가 참인지 + 확인해보자. + +\end{enumerate} + +\end{exercise} + + +\begin{exercise} +\index{triangle} + +임의의 세 개의 막대기의 길이에 따라 삼각형 만들기 가능 여부가 +결정된다. 예를 들어, 한 막대기가 12인치이고 다른 두 개가 각각 +1인치라고 해보자. 작은 두 개의 막대기로는 중간에서 만날 수가 없다. +임의의 세 길이가 있을 때 삼각형 만들기가 가능한지 확인하는 간단한 +테스트가 있다. + +\begin{quotation} + 세 선분 중 하나의 선분이 나머지 두 선분의 합보다 길면 삼각형을 만들 + 수 없다. 짧으면 삼각형을 만들 수 있다. (두 선분의 길의의 합이 세 + 번째 길이와 같으면 ``퇴화(degenerate)'' 삼각형이라고 한다.) +\end{quotation} + +\begin{enumerate} + +\item 세 개의 정수를 인자로하여 주어진 수로 삼각형 만들기가 가능한지 + 여부를 판단하는 \verb"is_triangle" 함수를 작성하라. 가능하면 + ``Yes'' 불가능하면 ``No''를 출력하도록 하라. + +\item 사용자로 부터 세 정수를 입력받아, 그 수를 정수로 변환하고, + \verb"is_triangle"를 사용하여 주어진 정수로 삼각형을 만들 수 있는지 + 판단하는 함수를 작성하라. + +\end{enumerate} + +\end{exercise} + +\begin{exercise} +다음 프로그램의 결과가 무엇인가? +프로그램이 결과를 표시할 때의 스택 상태도를 그려보아라. + +\begin{verbatim} +def recurse(n, s): + if n == 0: + print(s) + else: + recurse(n-1, n+s) + +recurse(3, 0) +\end{verbatim} + +\begin{enumerate} + +\item 이 함수를 {\tt recurse(-1, 0)}으로 호출하면 어떻게 될까? + +\item 이 함수를 사용하기 위해 필요한 모든 정보를 담은 설명 문자열을 작성하라. + +\end{enumerate} + +\end{exercise} + +다음의 문제들은 \ref{turtlechap}장에서 설명한 {\tt turtle} 모듈을 사용한다. +\index{TurtleWorld} + +\begin{exercise} + +다음의 함수를 읽고 어떤 동작을 하는지 생각해보자(필요하면 +\ref{turtlechap}장의 예제를 읽어보자). 생각한 데로 동작하는지 +실행해보자. + + +\begin{verbatim} +def draw(t, length, n): + if n == 0: + return + angle = 50 + t.fd(length*n) + t.lt(angle) + draw(t, length, n-1) + t.rt(2*angle) + draw(t, length, n-1) + t.lt(angle) + t.bk(length*n) +\end{verbatim} + +\end{exercise} + + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/koch.pdf}} +\caption{코흐 곡선.} +\label{fig.koch} +\end{figure} + +\begin{exercise} +\index{Koch curve} + +코흐 곡선(The Koch curve)는 그림 \ref{fig.koch}처럼 보이는 프랙탈 +곡선이다. 길이 $x$를 사용하여 코흐 곡선을 그려라. 그리는 방법은 다음과 +같다. + + +\begin{enumerate} + +\item $x/3$의 길이로 코흐 곡선을 그린다. + +\item 왼쪽으로 60도 회전한다. + +\item $x/3$의 길이로 코흐 곡선을 그린다. + +\item 오른쪽으로 120도 회전한다. + +\item $x/3$의 길이로 코흐 곡선을 그린다. + +\item 왼쪽으로 60도 회전한다. + +\item $x/3$의 길이로 코흐 곡선을 그린다. + +\end{enumerate} + +만약, $x$가 3보다 작으면 $x$만큼의 길이로 직선을 그리면 된다. + +\begin{enumerate} + +\item 거북이 객체와 길이를 매개 변수로 하는 {\tt koch} 함수를 + 작성하라. 이 함수로 주어진 길이로 거북이를 사용하여 코흐 곡선을 + 그려보아라. + +\item 세 개의 코흐 곡선으로 눈송이의 외각선을 그리는 {\tt snowflake} + 함수를 작성하라. + +해답: \url{http://thinkpython2.com/code/koch.py}. + +\item 코흐 곡선을 일반화하는 방법은 여러 개가 + 있다. \url{http://en.wikipedia.org/wiki/Koch_snowflake}에 나와 있는 + 것 중 마음에 드는 것을 골라 만들어 보자. + +\end{enumerate} +\end{exercise} + + +\chapter{열매가 있는 함수} +%Fruitful functions +\label{fruitchap} + +우리가 사용한 수학 함수와 같은 많은 Python 함수들은 리턴 값이 있지만, +우리가 작성한 함수들은 리턴 값이 없다. 대신 값을 출력하거나 거북이를 +이동시키는 것과 같은 영향만 있다. 이 장에서는 열매가 있는 함수에 대해 +배울 것이다. + + + +\section{리턴 값} +%Return values +\index{return value} + +함수 호출에는 리턴 값이 있는데, 보통은 이 값을 변수에 할당하거나 어떤 +수식의 일부로 사용한다. + + +\begin{verbatim} +e = math.exp(1.0) +height = radius * math.sin(radians) +\end{verbatim} +% +지금까지 우리는 비어 있는 함수들을 작성했었다. 격식 없게는 리턴 값이 +없었고, 좀 정확하게는 그 함수들의 리턴 값은 {\tt None}이 었다. + +이 장에서는 (마침내) 열매가 있는 함수를 작성할 것이다. 첫 번째 예제는 +전달 받은 반지름으로 원의 넓이를 리턴하는 {\tt area} 함수이다. + +\begin{verbatim} +def area(radius): + a = math.pi * radius**2 + return a +\end{verbatim} +% +우리가 봤던 열매가 있는 함수에서의 {\tt + return}문은 수식이 포함되 있었다. 리턴문은 ``리턴 값으로 +따라오는 수식을 사용하여 즉시 리턴하라''는 의미를 갖고 있다. 리턴할 +수식이 복잡해도 괜찮기 때문에 이 예제의 함수를 좀 더 간결하게 작성 해 +볼 수도 있다. +\index{return statement} +\index{statement!return} + +\begin{verbatim} +def area(radius): + return math.pi * radius**2 +\end{verbatim} +% +그렇기는 하지만, {\bf 임시 변수}로 사용한 {\tt a}가 있어 좀 더 쉽게 +디버깅할 수도 있다. +\index{temporary variable} +\index{variable!temporary} + +때로는 조건문의 분기마다 리턴문이 있는 경우도 있다. + +\begin{verbatim} +def absolute_value(x): + if x < 0: + return -x + else: + return x +\end{verbatim} +% +각 {\tt return}문이 선택지마다 있기 때문에 그 중 어느 하나만 실행된다. + +리턴문이 실행되면 실행 중이던 함수는 다음 문장을 수행하지 않고 즉시 +종료한다. {\tt return}문 이후의 문장이나 실행의 흐름 상 도달하지 않는 +코드를 {\bf 죽은 코드(dead code)}라 부른다. +\index{dead code} + +열매가 있는 함수에서는 프로그램의 어떤 실행 흐름이더라도 {\tt + return}문에 도달하도록 하는 것이 좋다. 예를 들어보자. + +\begin{verbatim} +def absolute_value(x): + if x < 0: + return -x + if x > 0: + return x +\end{verbatim} +% +이 함수는 잘못되었다. 만약 {\tt x}가 0이면 두 선택지 모두 거짓이 +된다. 그러면 {\tt return}문에 도달하지 않고 종료하게 된다. 이 경우의 +리턴 값은 {\tt None}이지 0의 절대치가 아니다. +\index{None special value} +\index{special value!None} + +\begin{verbatim} +>>> print(absolute_value(0)) +None +\end{verbatim} +% +참고로, Python의 내부 함수 중에는 절대치를 계산하는 {\tt abs} 함수가 있다. +\index{abs function} +\index{function!abs} + +연습 문제로 {\tt x}와 {\tt y} 두 수를 받아 {\tt x > y}이면 {\tt 1}을 +리턴하고 {\tt x == y}이면 {\tt 0}을 그리고 {\tt x < y}이면 {\tt -1}을 +리턴하는 {\tt compare} 함수를 작성해보자. +\index{compare function} +\index{function!compare} + + +\section{점진적 개발} +%Incremental development +\label{incremental.development} +\index{development plan!incremental} + +큰 함수를 작성하다 보면 디버깅에 더 많은 시간을 쓰는 때가 있다. + +엄청나게 복잡한 프로그램을 작성하기 위해 {\bf 점진적 개발(incremental + development)} 방법론을 시도해 볼 것을 권한다. 점진적 개발 방법론의 +목적은 아주 작은 크기의 코드를 추가하고 그 부분에 대한 디버깅을 하여 +디버깅에 너무 오랜 시간을 쓰는 것을 피하도록 한다. +\index{testing!incremental development} +\index{Pythagorean theorem} + +예를 들어, $(x_1, y_1)$과 $(x_2, y_2)$의 좌표를 갖는 두 점 사이의 +거리를 잰다고 해보자. 피타고라스의 정리에 따라 거리는 다음과 같이 +계산할 수 있다. + +\begin{displaymath} +\mathrm{distance} = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} +\end{displaymath} +% +첫 단계는 Python에서 {\tt distance} 함수를 정의하는 것이다. 입력 +값(매개 변수)은 무엇인지 출력 값(리턴 값)은 무엇인지를 정해야 한다. + +이 경우에는 입력 값은 네 개의 수로 이루어진 두 개의 점이다. 리턴 값은 +부동소수점으로 표현되는 거리이다. + +입력과 출력 값이 정해지면 함수의 구조를 잡을 수 있다. + +\begin{verbatim} +def distance(x1, y1, x2, y2): + return 0.0 +\end{verbatim} +% +당연하겠지만, 이 버전의 함수는 거리를 계산할 수 없다. 이 함수는 언제는 +0만 리턴한다. 문법적으로는 정확하고 실행도 가능하다. 좀 더 복잡해지기 +전에 검사가 가능하다는 말이다. + +함수를 시험해 보려면 샘플 인자 값으로 호출하면 된다. + + +\begin{verbatim} +>>> distance(1, 2, 4, 6) +0.0 +\end{verbatim} +% +두 점 사이의 수평 거리가 3 차이나고 수직 거리가 4 차이 나도록 점들을 +선택했다. 피타고라스의 수에 따라 직각 삼각형의 세 변의 길이의 비가 +3:4:5 이기 때문에 결과는 5가 되야 한다. 정답을 알면 함수 검사가 +수월해지는 법이다. +\index{testing!knowing the answer} + +이제 이 함수가 문법적으로 정확하다는 것을 확인했으니 내용에 코드를 +추가해도 된다. 다음으로 밟아야 할 순서는 $x_2 - x_1$과 $y_2 - y_1$의 +계산으로 점 간의 차를 구하는 것이다. 다음 버전의 함수는 차를 계산하고 +임시 변수에 저장한 후 화면에 표시하는 것이다. + + +\begin{verbatim} +def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + print('dx는', dx) + print('dy는', dy) + return 0.0 +\end{verbatim} +% +함수가 동작한다면, \verb"dx는 3" 그리고 \verb"dy는 4"를 출력할 것이다. +그리고 그렇게 출력되었다면 인자도 함수에 제대로 전달했고 첫 계산도 +정확히 수행했다는 것을 알 수 있다. 만약 잘못 나왔다면 검사해야 할 +코드가 몇 줄 되지 않는 것에 위안을 얻으면 된다. + +그 다음 과정은 {\tt dx}와 {\tt dy}의 제곱의 합을 계산해야 한다. + +\begin{verbatim} +def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + print('dsquared is: ', dsquared) + return 0.0 +\end{verbatim} +% +마찬가지로, 변경한 코드를 실행해보고 결과가 맞는지 검사해봐야 +한다(결과는 25다). 마지막으로 {\tt math.sqrt}를 써서 결과를 리턴하면 +된다. +\index{sqrt} +\index{function!sqrt} + +\begin{verbatim} +def distance(x1, y1, x2, y2): + dx = x2 - x1 + dy = y2 - y1 + dsquared = dx**2 + dy**2 + result = math.sqrt(dsquared) + return result +\end{verbatim} +% +지금까지 제대로 동작했다면, 다 끝났다. 확인하기 원한다면 리턴하기 전에 +{\tt result}를 출력하면 된다. + +함수의 최종 버전은 실행했을 때 아무 것도 출력하지 않는다. 그저 값만 +리턴할 뿐 이다. {\tt print}문은 디버깅 때문에 포함한 것이기 때문에 +함수가 동작한다면 제거해야 한다. 이런 류의 코드를 보고 {\bf + 발판(scaffolding)}이라 한다. 프로그램을 작성하는데 도움은 되지만 +최종 결과물의 일부는 아니기 때문이다. +\index{scaffolding} + +처음 시작할 때는 한 두 줄의 코드만 추가해야 한다. 좀 더 익숙해지면 좀 +더 긴 길이의 코드를 작성하고 디버깅할 수 있게 된다. 초보이던 +전문가이던, 점진적 개발 방법론은 디버깅 시간을 엄청나게 줄일 수 있다. + +방법론의 핵심은 다음과 같다. + +\begin{enumerate} + +\item 동작하는 프로그램으로 부터 시작하여 점진적인 변화를 만들어라. + 그래야 어떤 순간이라도 오류를 발견하면 어디에 원인이 있는지 쉽게 찾을 + 수 있다. + +\item 중간 값들을 변수에 저장하여 출력해보고 검사 할 수 있게 만들어라 + +\item 프로그램이 동작한다면 발판으로 사용한 코드를 삭제하고 여러 줄로 + 작성한 문장들을 복합문으로 통합해라. 단, 통합했을 때 코드 읽기가 + 너무 어려워지면 안된다. + +\end{enumerate} + +연습삼아 {\tt hypotenuse}라는 함수를 만들어 보자. 이 함수는 직각 +삼각형의 빗변을 계산하는 함수로 다른 두 변의 길이를 인자로 받는다. +개발 과정의 각 단계를 거칠 때마다 결과를 표시하도록 해보자. +\index{hypotenuse} + + + +\section{합성} +%Composition +\index{composition} +\index{function composition} + +이제는 이미 알리라 생각이 되지만, 함수 내에서 다른 함수를 호출하는 것이 +가능하다. 원의 중심 점과 원주 위의 한 점을 받아 원의 면적을 계산하는 +함수로 예를 들어 보자. + +{\tt xc}와 {\tt yc}에 원의 중심 점을 저장하고 원주 위의 한 점은 {\tt + xp}와 {\tt yp}에 저장된다고 하자. 첫 번째 단계는 이 두 점을 사용하여 +원의 반지름을 계산하는 것이다.이미 작성한 {\tt distance} 함수를 +사용하자. + + +\begin{verbatim} +radius = distance(xc, yc, xp, yp) +\end{verbatim} +% +다음으로 반지름을 사용하여 원의 면적을 구하자. 이것도 이미 작성했었다. + +\begin{verbatim} +result = area(radius) +\end{verbatim} +% +이 모든 단계들을 한 함수로 캡슐화 해보자. +\index{encapsulation} + +\begin{verbatim} +def circle_area(xc, yc, xp, yp): + radius = distance(xc, yc, xp, yp) + result = area(radius) + return result +\end{verbatim} +% +임시 변수 {\tt radius}와 {\tt result}는 개발과 디버깅하는 과정에서만 +유용하기 때문에 프로그램이 제대로 동작하면 다음과 같이 간결하게 함수 +호출을 합성할 수 있다. + +\begin{verbatim} +def circle_area(xc, yc, xp, yp): + return area(distance(xc, yc, xp, yp)) +\end{verbatim} +% + +\section{Boolean 함수} +%Boolean functions +\label{boolean} + +함수는 bool 값을 리턴할 수 있다. 그렇게 하면 복잡한 검사문을 함수에 감출 +수 있기 때문에 유용하다. +\index{boolean function} +예를 살펴 보자. + +\begin{verbatim} +def is_divisible(x, y): + if x % y == 0: + return True + else: + return False +\end{verbatim} +% +Boolean 함수의 이름은 참/거짓을 묻는 질문처럼 만드는 것이 일반적이다. +\verb"is_divisible"은 {\tt x}가 {\tt y}로 나누어 떨어지는지 {\tt True} +또는 {\tt False}로 리턴한다. + +사용 예를 보자. + +\begin{verbatim} +>>> is_divisible(6, 4) +False +>>> is_divisible(6, 3) +True +\end{verbatim} +% +{\tt ==} 연산자의 결과는 참 또는 거짓이기때문에 그 결과를 바로 +리턴하도록 함수를 간결하게 작성할 수 있다. + + +\begin{verbatim} +def is_divisible(x, y): + return x % y == 0 +\end{verbatim} +% +Boolean 함수는 조건문에 많이 쓰인다. +\index{conditional statement} +\index{statement!conditional} + +\begin{verbatim} +if is_divisible(x, y): + print('x is divisible by y') +\end{verbatim} +% +아래와 같이 쓰고 싶은 유혹이 들 수 있다. + +\begin{verbatim} +if is_divisible(x, y) == True: + print('x is divisible by y') +\end{verbatim} +% +두 번 검사는 불필요하다. + +연습삼아 \verb"is_between(x, y, z)" 함수를 작성해보자. 이 함수는 $x +\le y \le z$이면 {\tt True}를 아니면 {\tt False}를 리턴한다. + + +\section{또 다시 재귀문} +%More recursion +\label{more.recursion} +\index{recursion} +\index{Turing complete language} +\index{language!Turing complete} +\index{Turing, Alan} +\index{Turing Thesis} + +Python의 일부만을 다뤘지만, 지금까지 다룬 내용이 프로그래밍 언어의 +{\em 전부}라는 사실을 알았으면 좋겠다. 지금의 언어로 연산하고 싶은 +어떤 것이든 다 표현할 수 있다. 누군가가 만든 프로그램도 지금까지 배운 +것들만으로 다시 만들 수 있다(사실 마우스, 디스크같은 것들을 다루려면 +다른 명령어들이 필요하겠지만 그게 다다). + +이 주장을 증명하는 것은 쉽지 않은 일이긴 하지만 최초의 컴퓨터 과학자인 +앨런 튜링(Alan Turing)이 증명했다(그가 수학자라고 주장하는 사람들이 +있기는 하지만, 초창기의 대부분의 컴퓨터 과학자들인 수학자로 시작했다). +그의 이름을 따서 튜링 명제라 한다. 이에 관한 완전하고(정확한) 논고는 +마이클 싶서(Michael Sipser)의 책 {\em Introduction to the Theory of + Computation}을 읽어보기를 바란다. + +지금까지 배운 도구들로 무엇을 할 수 있는지 보이기 위해 재귀적으로 +정의된 수학 함수를 살펴보도록 하겠다. 정의하는 대상을 정의에서 다시 +사용한다는 점에서 재귀적 정의는 순환 정의와 유사하다. 순환 정의는 +그렇게 도움이 되지 않는다. + + +\begin{description} + +\item[vorpal:] vorpal한 것을 나타내는 형용사 +\index{vorpal} +\index{circular definition} +\index{definition!circular} + +\end{description} + +사전에서 이런 단어를 만나면 짜증이 날 것이다. 반면, $!$로 표기하는 +계승(factorial) 함수는 다음과 같이 정의 된다. +% +\begin{eqnarray*} +&& 0! = 1 \\ +&& n! = n (n-1)! +\end{eqnarray*} +% +이 정의는 0의 계승은 1이고 어떤 값 $n$의 계승은 $n$ 곱하기 $n-1$의 +계승으로 정의된다. + +그래서, $3!$은 3 곱하기 $2!$이고, 다시 2곱하기 $1!$, 그리고 1 곱하기 +$0!$이 된다. 정리하면 $3!$은 3 곱하기 2 곱하기 1 곱하기 1이고, +계산하면 6이다. +\index{factorial function} +\index{function!factorial} +\index{recursive definition} + +어떤 것을 재귀문으로 정의하였다면 Pytho 프로그램을 써서 평가해면 된다. +먼저, 매개 변수를 정한다. {\tt factorial}의 경우 당연히 정수를 +전달해야 한다. + +\begin{verbatim} +def factorial(n): +\end{verbatim} +% +인자가 0이라면 1을 리턴하면 된다. + +\begin{verbatim} +def factorial(n): + if n == 0: + return 1 +\end{verbatim} +% +그 외의 경우를 다루는 방법이 흥미로운데, 재귀 호출을 써서 $n-1$의 +계승을 계산한 후 $n$으로 곱하면 된다. + +\begin{verbatim} +def factorial(n): + if n == 0: + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + return result +\end{verbatim} +% +이 프로그램의 실행의 흐름은 \ref{recursion}장에서 본 {\tt countdown}의 +실행 흐름과 비슷하다. {\tt factorial}의 인자로 3을 주고 시작하면 다음과 +같이 동작한다. + + +3은 0이 아니기 때문에 두 번째 분기를 선택하여 {\tt n-1}의 계승을 계산한다. + +\begin{quote} + 2은 0이 아니기 때문에 두 번째 분기를 선택하여 {\tt n-1}의 계승을 + 계산한다. + + + + \begin{quote} + 1은 0이 아니기 때문에 두 번째 분기를 선택하여 {\tt n-1}의 계승을 + 계산한다. + + \begin{quote} + 0은 0이기 때문에 더 이상 재귀 호출을 하지 않고 첫 번째 분기를 + 선택하여 1을 리턴한다. + \end{quote} + + 리턴 값 1을 $n$과 곱한 결과를 리턴한다. 이 때, $n$은 1이다. + \end{quote} + + 리턴 값 1을 $n$과 곱한 결과를 리턴한다. 이 때, $n$은 2이다. + +\end{quote} + +리턴 값 2을 $n$과 곱한 결과를 리턴한다. 이 때, $n$은 3이다. 계산 결과 +6이 처음 재귀 호출 과정을 시작한 함수의 리턴 값이 된다. + +\index{stack diagram} + +그림~\ref{fig.stack3}이 함수의 실행 흐름에 따른 스택 상태도를 나타낸다. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/stack3.pdf}} +\caption{스택 상태도} +\label{fig.stack3} +\end{figure} + +리턴 값이 스택 위로 전달되는 것을 볼 수 있다. 각 프레임에 나타난 리턴 +값은 {\tt n}과 {\tt recurse}의 곱인 {\tt result}이다. +\index{function frame} +\index{frame} + +마지막 프레임에는 {\tt recurse}와 {\tt result}가 없다. 이 변수들을 +생성하는 분기가 실행되지 않았기 때문이다. + + + +\section{믿음의 도약} +%Leap of faith +\index{recursion} +\index{leap of faith} + +실행 흐름에 따라 프로그램을 읽는 것도 한 방법이기는 하지만, 코드의 +길이에 압도될 수도 있다. 그 대안으로 ``믿음의 도약(leap of faith)''을 +하는 방법을 소개하겠다. 함수 호출을 만나면 실행 흐름대로 그 함수의 +내용을 다 읽는 대신, 그 함수가 제대로 동작하고 리턴 값도 제대로 +전달한다고 가정 하자. + +사실, 내장 함수은 이미 제대로 동작한다는 믿음을 갖고 사용했었다. {\tt + math.cos}나 {\tt math.exp}를 호출 했을 때 그 함수의 내용을 일일이 +확인해보지 않았다. 그저 내장 함수들은 훌륭한 프로그래머가 작성했을 +것이라 믿고 동작할 것이라 생각했다. + +자신이 작성한 함수도 똑같은 믿음을 갖고 사용해도 된다. +\ref{boolean}절에서 작성한 \verb"is_divisible"을 떠올려 보자. 이 +함수가 정확하다고 믿은 순간---코드 확인과 검사를 거친 후---그 함수의 +내용을 다시 읽어보지 않고 사용했다. +\index{testing!leap of faith} + +재귀 프로그램도 다르지 않다. 재귀 호출을 만나면 실행 흐름을 쫓는 대신 +재귀 호출이 제대로 동작한다고 믿어보자(그리고 정확한 결과도 리턴한다고 +해보자). 그리고 ``$n-1$의 계승을 구할 수 있다고 한다면 $n$의 계승도 +계산할 수 있을까?''라고 물어야 한다. $n$만 곱하면 되기 때문에 당연히 +가능하다. + +물론, 작성을 다 하지 않은 함수를 제대로 동작한다고 가정하는게 이상할 수 +있지만 그렇기 때문에 믿음의 도약이라 부르는 것이다. + + + +\section{또 하나의 예} +%One more example +\label{one.more.example} + +\index{fibonacci function} \index{function!fibonacci} {\tt factorial}을 +살펴보았는데, 가장 흔한 재귀적으로 정의한 수학 함수는 {\tt + fibonacci}이다. 정의는 다음과 같다(참고: +\url{http://en.wikipedia.org/wiki/Fibonacci_number}). +% +\begin{eqnarray*} +&& \mathrm{fibonacci}(0) = 0 \\ +&& \mathrm{fibonacci}(1) = 1 \\ +&& \mathrm{fibonacci}(n) = \mathrm{fibonacci}(n-1) + \mathrm{fibonacci}(n-2) +\end{eqnarray*} +% +Python으로 해석하면 다음과 같다. + +\begin{verbatim} +def fibonacci(n): + if n == 0: + return 0 + elif n == 1: + return 1 + else: + return fibonacci(n-1) + fibonacci(n-2) +\end{verbatim} +% +아무리 작은 $n$이라 할지라도 이 함수의 실행 흐름을 따라가려면 머리가 +터질 것이다. 믿음의 도약을 한다고 생각하고 두개의 재귀 호출이 제대로 +동작한다고 믿어보자. 그러면 결과들을 더했을 때 올바른 값을 얻는다는 +것이 명확해질 것이다. +\index{flow of execution} + + +\section{데이터 형 검사} +%Checking types +\label{guardian} + +{\tt factorial}을 호출 할 때 인자가 1.5면 어떻게 될까? +\index{type checking} +\index{error checking} +\index{factorial function} +\index{RuntimeError} + +\begin{verbatim} +>>> factorial(1.5) +RuntimeError: Maximum recursion depth exceeded +\end{verbatim} +% +무한 재귀문 오류인 것처럼 보인다. 어째서 그럴가? {\tt n == 0}이라는 +기준 케이스도 있는데 말이다. {\tt n}이 정수가 아니면 기준 케이스에 +도달 못하고 영원히 재귀 호출을 하게 된다. +\index{infinite recursion} +\index{recursion!infinite} + +첫 번째 재귀 호출에서 {\tt n}의 값은 0.5이다. 그 다음에는 -0.5가 +된다. 그 이후에는 수는 작아지기만 하지 절대로 0은 안된다. + +두 가지 선택이 있다. {\tt factorial} 함수를 일반화해서 부동소수점 수도 +계산할 수 있게 하거나 {\tt factorial}이 인자의 데이터 형을 검사할 수도 +있다. 첫 번째는 감마 함수라고 부르고 이 책이 다룰 수 있는 범위 밖에 +있다. 그러니 두 번째 것을 시도해보자. +\index{gamma function} + +내부 함수 중 {\tt isinstance}을 사용해서 인자의 데이터 형을 검사할 수 +있다. 그와 동시에 인자로 받은 값이 양수인지도 확인할 수 있다. +\index{isinstance function} +\index{function!isinstance} + +\begin{verbatim} +def factorial(n): + if not isinstance(n, int): + print('정수에 대해서만 정의되어 있음.') + return None + elif n < 0: + print('음의 정수에 대해서는 정의 안됨.') + return None + elif n == 0: + return 1 + else: + return n * factorial(n-1) +\end{verbatim} +% +첫 기준 케이스는 정수가 아닌 경우를 다루고 두 번째는 음의 정수를 +다룬다. 두 경우다 프로그램은 오류 메시지를 출력 하고 무언가 +잘못되었다는 것을 표시하기 위해 {\tt None}을 리턴한다. + + +\begin{verbatim} +>>> print(factorial('fred')) +정수에 대해서만 정의되어 있음. +None +>>> print(factorial(-2)) +음의 양수에 대해서는 정의 안됨. +None +\end{verbatim} +% +두 검사를 통과했다면, $n$은 양수의 정수이거나 0이라는 것을 알기 때문에 +재귀문이 종료한다는 것을 증명할 수 있다. +\index{guardian pattern} +\index{pattern!guardian} + +이 프로그램은 {\bf 가디언(guardian}, 보호자{\bf)}이라는 패턴을 +사용하였다. 첫 두 조건문이 오류가 발생할만한 값들로부터 코드를 +보호하는 가디언 역할을 한다. 가디언 패턴으로 코드의 정확성을 증명할 수 +있다. + +\ref{raise}절에서는 오류 메시지를 출력하는 것보다 좀 더 유연한 대안인 +엑셉션(exception, 예외) 처리에 대해 살펴 볼 것이다. + + +\section{디버깅} +%Debugging +\label{factdebug} +큰 프로그램을 작은 함수들로 나누어 작성하는 것은 디버깅을 할 수 있는 +지점들을 자연스럽게 만드는 효과가 있다. 함수가 동작하지 않을 때 검사해 +볼 세가지가 있다. +\index{debugging} + +\begin{itemize} + +\item 함수가 전달 받는 인자에 문제가 있다. 사전 조건이 잘못되었다. + +\item 함수에 문제가 있다. 사후 조건이 잘못되었다. + +\item 리턴 값 또는 그 값을 사용하는데 문제가 있다. + +\end{itemize} + +첫 가능성을 제거하려면 함수 시작부분에 {\tt print}문을 써서 매개 변수의 +값(그리고 데이터 형)을 출력해 보면 된다. 또는 사전 조건이 정확한지 +검사하는 코드를 명시적으로 작성하면 된다. +\index{precondition} +\index{postcondition} + +매개 변수가 맞아 보이면 모든 {\tt return}문 전에 {\tt print}문을 +삽입하여 리턴 값을 검사해보자. 함수 호출의 결과를 수기로도 +검산해보자. 검산이 쉬운 값을 넣어 함수를 +호출해보자(\ref{incremental.development}절을 참고하자). + +함수가 제대로 동작하는 것처럼 보이면 호출하는 문장에서 리턴 값을 +정확하게 사용하는지(또는 사용은 하는지) 확인해보자. +\index{flow of execution} + + +함수가 시작할 때 그리고 끝날 때 {\tt print}문을 넣어보면 실행 흐름을 +시각화하는데 도움이 된다. 다음은 {\tt factorial}에 {\tt print}문을 넣은 +버전이다. + +\begin{verbatim} +def factorial(n): + space = ' ' * (4 * n) + print(space, 'factorial', n) + if n == 0: + print(space, 'returning 1') + return 1 + else: + recurse = factorial(n-1) + result = n * recurse + print(space, 'returning', result) + return result +\end{verbatim} +% +{\tt space}는 공백 문자열로 결과의 들여쓰기 정도를 나타낸다. 다음은 +{\tt factorial(4)}의 결과이다. + +\begin{verbatim} + factorial 4 + factorial 3 + factorial 2 + factorial 1 + factorial 0 + returning 1 + returning 1 + returning 2 + returning 6 + returning 24 +\end{verbatim} +% +실행 흐름이 혼란스럽다면 이런 식으로 결과를 표시하는 것도 도움이 된다. +효과적인 발판을 만드는 것은 시간이 걸리지만 작은 발판이라할지라도 +디버깅 시간을 크게 줄일 수 있다. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[임시변수(temporary variable):] 복잡한 계산의 중간 값을 저장하는데 + 사용하는 변수 +\index{temporary variable} +\index{variable!temporary} + +\item[죽은 코드(dead code):] 대체적으로 {\tt return}문 다음에 오는 + 코드로 프로그램에서 실행되지 않는 부분 +\index{dead code} + +\item[점진적 개발(incremental development):] 한 번에 작은 크기의 코드를 + 추가하고 검사하여 디버깅 시간을 줄이려는 프로그램 걔발 계획 +\index{incremental development} + +\item[발판(scaffolding):] 프로그램 개발 중에는 사용되나 최종 버전에는 + 제외되는 코드 +\index{scaffolding} + +\item[가디언(보호자, guardian):] 오류를 발생시킬 수도 있는 상황을 + 조건문으로 처리하거나 검사하는 프로그래밍 패턴 + +\index{guardian pattern} +\index{pattern!guardian} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +다음 프로그램의 스택 상태도를 그려라. 프로그램은 무엇을 표시하는가? +\index{stack diagram} + +\begin{verbatim} +def b(z): + prod = a(z, z) + print(z, prod) + return prod + +def a(x, y): + x = x + 1 + return x * y + +def c(x, y, z): + total = x + y + z + square = b(total)**2 + return square + +x = 1 +y = x + 1 +print(c(x, y+3, x+y)) +\end{verbatim} + +\end{exercise} + + +\begin{exercise} +\label{ackermann} + +아커만 함수 $A(m, n)$은 다음과 같이 정의 되었다. + +\begin{eqnarray*} +A(m, n) = \begin{cases} + n+1 & \mbox{if } m = 0 \\ + A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\ +A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0. +\end{cases} +\end{eqnarray*} +% +상세 설명은 \url{http://en.wikipedia.org/wiki/Ackermann_function}을 +참고하라. 아커만 함수를 계산하는 {\tt ack} 함수를 작성하라. {\tt + ack(3, 4)}의 값을 구하고 125가 맞는지 확인하라. {\tt m}이나 {\tt + n}이 더 큰 값이면 어떻게 되는가? 해답은 +\url{http://thinkpython2.com/code/ackermann.py}에 있다. +\index{Ackermann function} +\index{function!ack} + +\end{exercise} + + +\begin{exercise} +\label{palindrome} +회문(pallindrome)은 ``noon''과 ``redivider''처럼 단어의 순방향 철자가 +역방향 철자와 동일한 단어를 뜻한다. 재귀적으로 표현했을 때, 첫 글자와 +마지막 글자가 같고 중간 부분이 회문이면 그 단어는 회문이다. +\index{palindrome} + +다음의 함수들은 문자열을 인자로 받아 첫 글자, 마지막 글자, 그리고 +중간의 글자들을 리턴한다. + +\begin{verbatim} +def first(word): + return word[0] + +def last(word): + return word[-1] + +def middle(word): + return word[1:-1] +\end{verbatim} +% +동작 방식은 \ref{strings}장에서 살펴볼 것이다. + +\begin{enumerate} + +\item {\tt palindrome.py}라는 이름을 함수들을 저장하고 검사해보자. 두 + 글자 길이의 단어를 {\tt middle} 함수에 인자로 전달하면 어떻게 + 되는가? 한 글자이면 어떻게 되는가? 빈 문자열 \verb"''"을 인자로 + 전달하면 어떻게 되는가? + +\item 문자열을 인자로 받아 그 문자열이 회문이면 {\tt True}를 아니면 + {\tt False}를 리턴하는 \verb"is_palindrome" 함수를 작성하라. 참고로 + 문자열의 길이를 확인하기 위해 내장 함수인 {\tt len}을 쓸 수 있다. + +\end{enumerate} + +해답: \url{http://thinkpython2.com/code/palindrome_soln.py}. + +\end{exercise} + +\begin{exercise} + + 어떤 수 $a$는 $b$로 나눌 수 있고 $a/b$가 $b$의 거듭제곱이면 $a$는 + $b$의 거듭제곱이다. {\tt a}와 {\tt b}를 매개 변수로 받아 {\tt a}가 + {\tt b}의 거듭제곱이면 {\tt True}를 리턴하는 \verb"is_power" 함수를 + 작성하라. 참고: 기준 케이스 선정이 중요하다. + + +\end{exercise} + + +\begin{exercise} +\index{greatest common divisor (GCD)} +\index{GCD (greatest common divisor)} + +$a$와 $b$의 최대 공약수(the Greatest Common Divisor, GCD)는 나머지 없이 +두 수를 나눌 수 있는 가장 큰 수이다. + +최대 공약수를 찾는 한 방법은 $a$을 $b$로 나눴을 때의 나머지 $r$에 대해 +$gcd(a, b) = gcd(b, r)$의 관계가 성립한다는 관찰을 사용하면 된다. 기준 +케이스로 $gcd(a, 0) = a$를 사용하라. + +매개 변수 {\tt a}와 {\tt b}를 사용하고 최대 공약수를 리턴하는 +\verb"gcd" 함수를 작성하라. + + +출처: 애벨슨(Abelson)과 서스만(Sussman)의 {\em Structure and + Interpretation of Computer Programs}의 예제를 참고하였다. + +\end{exercise} + + +\chapter{반복} +%Iteration + +이 장에서는 문장을 되풀이하여 실행하는 기능인 반복을 다룬다. +\ref{recursion}절에서 재귀문을 사용한 반복의 일종을 살펴봤었다. +\ref{repetition}절에서 {\tt for} 루프도 봤었다. 이 장에서는 {\tt + while}문을 사용한 또 다른 반복문을 배울 것이다. 그 전에 변수 할당에 +대해 좀 더 이야기하고 시작하겠다. + + +\section{재할당} +%Reassignment +\index{assignment} +\index{statement!assignment} +\index{reassignment} + +같은 변수에 한 번 이상 값을 할당해도 괜찮다는 것을 이제 깨달았을 +것이다. 기존의 변수에 새로운 값을 할당하면 그 변수는 새로운 값을 +가리킨다(이전에 가리키던 값은 더 이상 가리키지 않는다). + + + +\begin{verbatim} +>>> x = 5 +>>> x +5 +>>> x = 7 +>>> x +7 +\end{verbatim} +% +{\tt x}는 처음에 5를 그리고 두 번째 7이라는 값을 갖는다. + +그림 \ref{fig.assign2}의 스택 상태도에 {\bf 재할당(reassignment)}를 나타냈다. +\index{state diagram} \index{diagram!state} + +현 시점에서 많이들 혼돈하는 것을 집고 넘어가자. Python에서 등호({\tt + =})를 사용하는데 이 기호를 수학 명제로서 {\tt a = b}를 +해석하려고한다. 수학에서는 {\tt a}와 {\tt b}가 서로 동일하다는 +주장이다. 하지만, 그렇게 해석하면 틀린 것이다. +\index{equality and assignment} + + +첫째로 등가는 대칭적 관계를 나타내지만 할당은 대칭적이지 않다. 예를 +들어보자. 수학에서는 $a = 7$이면 $7 = a$이다. Python에서는 {\tt a = + 7 }이라는 문장은 괜찮지만 {\tt 7 = a}라는 문장은 틀린 문장이다. + + +수학에서는 어떤 식이 등가라면 그 주장은 항상 참이다. $a = b$라고 하면 +$a$는 항상 $b$와 동일하다. Python에서 할당문은 두 변수가 서로 동일하게 +만들지만 항상 그대로 유지되는 것은 아니다. + + +\begin{verbatim} +>>> a = 5 +>>> b = a # a와 b는 같음 +>>> a = 3 # a와 b는 더 이상 같지 않음 +>>> b +5 +\end{verbatim} +% +세 번째 줄은 {\tt a}를 변경하지만 {\tt b}는 변경시키지 않는다. 그렇기 +때문에 둘은 더 이상 같지 않다. + +변수 재할당은 유용하지만 신중하게 사용해야 한다. 변수의 값이 자주 +바뀌면 코드 읽기와 디버깅이 어려워진다. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/assign2.pdf}} +\caption{스택 상태도} +\label{fig.assign2} +\end{figure} + + + +\section{변수 갱신하기} +%Updating variables +\label{update} + +\index{update} +\index{variable!updating} + +흔한 할당 방법은 {\bf 갱신(update)}이다. 이런 종류는 변수의 새로운 +값은 이전 변수의 값에 의존한다. + +\begin{verbatim} +>>> x = x + 1 +\end{verbatim} +% +이 문장은 ``현재 {\tt x}의 값에 1을 더하고 그 값으로 {\tt x}을 갱신한다. + +존재하지 않는 변수를 갱신하면 오류가 발생한다. 왜냐하면 Python은 +오른쪽의 표현을 먼저 계산하고 {\tt x}에 값으로 할당하기 때문이다. + + +\begin{verbatim} +>>> x = x + 1 +NameError: name 'x' is not defined +\end{verbatim} +% +변수의 값을 갱신하기 전에 변수를 먼저 간단한 할당문으로 {\bf + 초기화(initialize)}해야 한다. +\index{initialization (before update)} + +\begin{verbatim} +>>> x = 0 +>>> x = x + 1 +\end{verbatim} +% +변수의 값에 1을 더하는 것을 {\bf 증가(increment)}, 1을 빼는 것을 {\bf + 감소(decrement)}라 부른다. +\index{increment} +\index{decrement} + + + + +\section{{\tt while}문} +%The {\tt while} statement +\index{statement!while} +\index{while loop} +\index{loop!while} +\index{iteration} + +컴퓨터는 반복적인 작업을 자동하는데 주로 사용된다. 동일하거나 유사한 +작업을 오류 없이 처리하는 것을 컴퓨터는 잘하지만 사람은 그렇지 못하다. +컴퓨터 프로그램에서 퇴풀이되는 작업을 {\bf 반복(iteration)}이라 한다. + +우리는 재귀문을 사용하여 반복하는 {\tt countdown}과 \verb"print_n" +함수를 봤었다. 반복 작업이 너무나 흔하기 때문에 Python은 언어 차원에서 +반복 기능을 제공하고 있다. 그 중 하나는 \ref{repetition}에서 봤던 +{\tt for}문이다. 다시 한 번 살펴볼 것이다. + +또 다른 것은 {\tt while}문이다. {\tt countdown}을 {\tt while}문으로 +바꿔서 다시 작성해보자. + + +\begin{verbatim} +def countdown(n): + while n > 0: + print(n) + n = n - 1 + print('발사!') +\end{verbatim} +% +{\tt while}문이 마치 영어처럼 거의 자연스럽게 읽혀진다. 해석하면 +``{\tt n}이 0보다 큰 동안에 {\tt n}의 값을 표시하고 그 값을 +감소시킨다. 0이 되면 {\tt 발사!}라고 표시''가 된다. +\index{flow of execution} + +좀 더 체계적으로 {\tt while}문의 실행 흐름을 살펴보자. + +\begin{enumerate} + +\item 조건이 참인지 거짓인지 판단한다. + +\item 거짓이면 {\tt while}문을 끝내고 다음 문장을 실행한다. + +\item 조건이 참이면 {\tt while}의 내용을 실행하고 첫 단계로 간다. + +\end{enumerate} + +이와 같은 흐름을 루프(loop, 반복)라 부른다. 세 번째 단계가 처음으로 +되돌아 반복하기 때문이다. +\index{condition} +\index{loop} +\index{body} + +루프의 내용은 하나 또는 그 이상의 변수를 바꿔야 한다. 그래야 조건이 +언젠가는 거짓이 되서 루프가 끝이나기 때문이다. 그렇지 않으면 루프는 +무한히 되풀이될 것이다. 이런 경우를 {\bf 무한 루프(infinite loop)}이라 +부른다. 샴푸의 사용법을 읽어보면 컴퓨터 과학자들은 놀라지 않을 수가 +없다. ``비누거품, 린스, 반복''라고 써 있는데, 이는 무한 루프이기 +때문이다. +\index{infinite loop} +\index{loop!infinite} + +{\tt countdown}의 경우 루프가 끝이 있음을 증명할 수 있다. 만약 {\tt + n}이 0이거나 음수이면 루프는 시작도 안된다. 그 외에는 0이 될 때까지 +매번 루프를 돌 때마다 {\tt n}은 감소된다. + +어떤 루프의 경우에는 판단하기가 쉽지않다. 에를 들어보자. + +\begin{verbatim} +def sequence(n): + while n != 1: + print(n) + if n % 2 == 0: # n은 짝수 + n = n / 2 + else: # n은 홀수 + n = n*3 + 1 +\end{verbatim} +% +이 루프의 조건은 {\tt n != 1}이기 때문에 루프는 {\tt n}이 {\tt 1}이 +되어 거짓이 될 때까지 계속된다. + +프로그램은 루프를 돌 때마다 {\tt n}의 값을 표시하고 짝수 또는 홀수 +검사를 한다. 짝수라면 {\tt n}를 2로 나누고, 홀수라면 {\tt n}은 {\tt + n*3 +1}으로 대체된다. {\tt sequence}에 인자를 3으로 전달했다고 +해보자. {\tt n}의 결과는 3, 10, 5, 16, 8, 4, 2, 1이 된다. + +{\tt n}가 증가되기도 하고 감소하기도 하기 때문에 1에 반드시 +도달한다거나 프로그램이 종료한다는 증명은 간단하지 않다. {\tt n}이 +특정 값인 경우라면 종료한다는 것을 증명할 수 있다. 시작 값이 2의 +배수라면 {\tt n}은 매번 짝수가 되기 때문에 루프를 반복하다보면 1에 +도달하게 된다. 16으로 시작한 경우가 그렇게 끝이 난다. +\index{Collatz conjecture} + +좀 더 어려운 질문은 이 프로그램이 {\em 모든} 양수에 대해서 +종료하는가이다. 아직까지는 그 어느 누구도 이것을 증명{\em 도} +반증하지{\em 도} 못했다! (참고: +\url{http://en.wikipedia.org/wiki/Collatz_conjecture}.) + +연습 문제로 \ref{recursion}절의 \verb"print_n" 함수를 반복문을 사용하여 +재작성해보라. + + +\section{{\tt break}문} +\index{break statement} +\index{statement!break} + +때로는 루프의 반정도를 실행하기 전까지는 루프를 종료할 때가 되었는지 +모를 때가 있다. 그런 경우에 {\tt break}문을 사용하여 루프 밖으로 나올 +수 있다. + +사용자가 {\tt done}을 입력하기 전까지 계속 입력을 받는 예를 살펴보자. +다음과 같이 작성하면 된다. + +\begin{verbatim} +while True: + line = input('> ') + if line == 'done': + break + print(line) + +print('Done!') +\end{verbatim} +% +루프의 조건이 {\tt True}라고 되어 있기 때문에 항상 참이다. 이 루프는 +{\tt break}문을 만나기 전까지 계속 반복된다. + +되풀이 될 때마다 꺽쇠 표시로 사용자에게 입력을 요청한다. 사용자가 +{\tt done}이라 쓰면 {\tt break}문이 루프를 끝낸다. 그 외에는 사용자가 +무엇을 입력하든 그것을 화면에 표시하고 루프의 처음으로 되돌아 간다. +여기 실행 예시가 있다. + + +\begin{verbatim} +> not done +not done +> done +Done! +\end{verbatim} +% +{\tt while} 루프를 이렇게 사용하는 두 가지 이유가 있다. 첫 째는 조건이 +루프 내 어디서든(루프 맨위에서 한 번이 아니라) 비교가 되기 때문이다. +두 번째는 종료 조건을 부정적으로(``이것이 발생하기 전까지 계속'') +표현하는 대신 긍정적으로(``이것이 발생하면 멈춤'') 표현할 수 있기 +때문이다. + + +\section{제곱 근} +%Square roots +\label{squareroot} +\index{square root} + +루프는 근사치를 구하고 반복적으로 그 값을 더 정확하게 만드는 수치해석 +프로그램에서 주로 쓰인다. +\index{Newton's method} + +예를 들어 보자. 제곱 근을 구하는 방법 중 하나는 뉴튼의 기법(Newton's +method)이다. $a$의 제곱 근을 알고 싶다고 해보자. 어떤 추정치 $x$에서 +시작하든 다음의 식으로 좀 더 정확한 근사치를 얻을 수 있다. + +\[ y = \frac{x + a/x}{2} \] +% +$a$는 4 $x$는 3이라고 해보자. + +\begin{verbatim} +>>> a = 4 +>>> x = 3 +>>> y = (x + a/x) / 2 +>>> y +2.16666666667 +\end{verbatim} +% +정답에 좀 더 가까운 결과를 얻었다($\sqrt{4} = 2$). 이 과정을 새로운 +추정치로 반복한다면 좀 더 정답에 가까워진다. + +\begin{verbatim} +>>> x = y +>>> y = (x + a/x) / 2 +>>> y +2.00641025641 +\end{verbatim} +% +몇 번 더 갱신하면 추정치는 거의 정답에 가까워진다. +\index{update} + +\begin{verbatim} +>>> x = y +>>> y = (x + a/x) / 2 +>>> y +2.00001024003 +>>> x = y +>>> y = (x + a/x) / 2 +>>> y +2.00000000003 +\end{verbatim} +% +일반적으로 이 과정을 몇 번이나 거쳐야 정답을 얻게 되는지 모른다. +그렇지만, 정답에 가까워지면 알게된다. 왜냐하면 추정치의 변화하지 않기 +때문이다. + + +\begin{verbatim} +>>> x = y +>>> y = (x + a/x) / 2 +>>> y +2.0 +>>> x = y +>>> y = (x + a/x) / 2 +>>> y +2.0 +\end{verbatim} +% +{\tt y == x}이면 멈추면 된다. 다음은 초기 추정치 {\tt x}로부터 변화가 +없을 때까지 정확도를 높이는 루프이다. + +\begin{verbatim} +while True: + print(x) + y = (x + a/x) / 2 + if y == x: + break + x = y +\end{verbatim} +% +대부분의 {\tt a}는 동작을 하지만, {\tt float}형을 등호에 쓸 때는 +조심해야 한다. 부동소수점 값은 근사치이기 때문이다. $1/3$처럼 +유리수인 경우나 $\sqrt{2}$처럼 무리수인 경우의 대부분은 {\tt + float}형으로 그 값을 정확하게 표현될 수 없다는 것을 기억해야 한다. +\index{floating-point} +\index{epsilon} + +{\tt float}형인 {\tt x}와 {\tt y}가 서로 정확히 일치하는지 등호로 +검사하는 대신 내장 함수인 {\tt abs}를 사용하여 그 수의 절대치 또는 +크기를 비교하는 것이 좋다. + +\begin{verbatim} + if abs(y-x) < epsilon: + break +\end{verbatim} +% +\verb"epsilon"는 {\tt 0.0000001}와 같은 값으로 얼마나 작아야 같다고 할 +수 있는지 판단하는데 도움이 된다. + + +\section{알고리즘} +%Algorithms +\index{algorithm} + +뉴튼의 기법은 {\bf 알고리즘(algorithm)}의 예이다. 어떤 종류의 문제(이 +경우에는 제곱 근의 계산)를 해결하기 위한 기계적인 과정이다. + +알고리즘이 무엇인지 이해하기 위해서는 알고리즘이 아닌 무엇인가로부터 +시작하는 것이 좋겠다. 한 자리 수 숫자로 곱셉하는 법을 배웠을 때 +구구단을 외웠을 것이다. 사실상은 100개의 서로 다른 해답을 외웠을 +뿐이다. 이런 종류의 지식은 알고리즘적 접근이 전혀 아니다. + +당신이 만약 ``게으르다면'' 요령을 배울 필요가 있다. 예를 들어 어떤 수 +$n$과 9의 곱을 구한다고 해보자. 일의 자리에 $n-1$을 쓰고 십의 자리에 +$10-n$을 쓰면 된다. 이 요령은 한 자리 수 숫자와 9의 곱에 대한 일반 +해이다. 이런 것이 바로 알고리즘이다! +\index{addition with carrying} +\index{carrying, addition with} +\index{subtraction!with borrowing} +\index{borrowing, subtraction with} + +올림이 있는 덧셈이나 빌려서 뺄셈하기와 나눗셈하는 기술들이 모두 +알고리즘이다. 알고리즘이 갖는 특성 중 하나는 지적 능력이 전혀 필요 +없다는 것이다. 기계적으로 간단한 규칙에 따라 이전 단계에서 다음 단계를 +따르면 되기 때문이다. + +알고리즘의 실행은 지겨운 일이지만 설계하는 것은 흥미진진하고 지적으로 +도전적이다. 뿐만아니라 컴퓨터 과학의 중심이기도 하다. + +사람들이 자연스럽게 어려움 없이 또는 깊이 생각하지 않고 하는 것들 +중에는 알고리즘으로 표현하기 매우 어려운 것들이 있다. 자연어 인식이 +좋은 예이다. 우리는 하지만 아직까지 {\em 어떻게} 그렇게 할 수 있는지 +누구도 설명하지 못했다. 최소한 알고리즘으로 풀어내지는 못했다. + + + +\section{디버깅} +%Debugging +\label{bisectbug} + +프로그램의 크기가 커지다보면 더 많은 시간을 디버깅에 쓰게 되는 것을 +보게 된다. 더 많은 코드는 오류를 만들 확률이 많아지고 버그가 숨을 곳이 +더 많아진다는 말이다. +\index{debugging!by bisection} +\index{bisection, debugging by} + +디버깅 시간을 줄이는 방법 중 하나는 ``등분으로 디버깅하기''이다. 예를 +들어 100 줄짜리 프로그램이 있다고 했을 때 한 줄씩 검사한다면 100번 +검사해야 한다. + +대신에, 문제를 반으로 쪼개보자. 프로그램의 중간 또는 그 근처에 있는 +중간 과정의 값 중 검사할 수 있는 것을 확인해보자. {\tt print}문(증명을 +도와줄 어떤 것)을 추가한 후 프로그램을 실행하자. + + +중간 점검이 부정확하다면 전반부에 오류가 있다는 말이다. 정확하다면 +문제는 후반부에 있다. + +이런 식으로 검사를 할 때마다 검사해야할 줄의 수를 반씩 줄여나가면 +된다. 이론상으로는 이 과정을 6번(100번 보다 작다) 반복하면 검사해야 할 +줄의 수가 하나 또는 두 줄 정도가 된다. + +실제로는 ``프로그램의 중간''이 늘 명확하지도 않고 그 부분을 검사한다는 +것이 가능하지도 않다. 정확한 중간 지점을 찾기 위해 라인 수를 세서 +반으로 나눈다는 것도 말이 안된다. 대신에 오류가 있을만한 부분을 +생각해보고 검사 문장을 쉽게 삽입할 수 있는 위치를 생각해보자. 그리고 +검사 문장 삽입 위치 전과 그 후에 오류가 있을 확률이 서로 비슷한 지점에 +검사 문장을 삽입하자. + + + + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[재할당(reassignment):] 이미 존재하는 변수에 새로운 값을 할당하는 것. +\index{reassignment} + +\item[갱신(update):] 변수의 새로운 값이 이전 값에 의존하는 할당문. +\index{update} + +\item[초기화(initialization):] 갱신될 변수에 초기 값을 할당하는 것. +\index{initialization!variable} + +\item[증가(increment):] 변수의 값을 증가 시키는 갱신(주로 1 증가). +\index{increment} + +\item[감소(decrement):] 변수의 값을 감소 시키는 갱신. +\index{decrement} + +\item[반복(iteration):] 재귀 함수 호출이나 루프를 사용하여 문장들을 + 되풀이하여 실행하는 것 +\index{iteration} + +\item[무한 루프(infinite loop):] 종료 조건이 절대로 충족되지 않는 루프. +\index{infinite loop} + +\item[알고리즘(algorithm):] 어떤 종류의 문제를 해결하는 일반적인 과정. +\index{algorithm} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +\index{algorithm!square root} + +\ref{squareroot} 절의 루프문을 복사하여 \verb"mysqrt"라는 함수로 +캡슐화하라. 이 때 {\tt a}를 매개 변수로하고 타당한 {\tt x}을 +선정하자. 그리고 {\tt a}의 제곱 근의 추정치를 리턴하도록 하라. +\index{encapsulation} + +검사를 위해 \verb"test_square_root"라는 함수를 만들고 다음과 같이 +출력하도록 만들자. + +\begin{verbatim} +a mysqrt(a) math.sqrt(a) diff +- --------- ------------ ---- +1.0 1.0 1.0 0.0 +2.0 1.41421356237 1.41421356237 2.22044604925e-16 +3.0 1.73205080757 1.73205080757 0.0 +4.0 2.0 2.0 0.0 +5.0 2.2360679775 2.2360679775 0.0 +6.0 2.44948974278 2.44948974278 0.0 +7.0 2.64575131106 2.64575131106 0.0 +8.0 2.82842712475 2.82842712475 4.4408920985e-16 +9.0 3.0 3.0 0.0 +\end{verbatim} +% +첫 번재 열은 숫자 $a$이다. 두 번째 열은 \verb"mysqrt"으로 계산된 $a$의 +제곱근이다. 세 번째 열은 {\tt math.sqrt}으로 계산된 제곱 근이다. 네 +번째 열은 두 추정치의 차이의 절대치를 나타낸다. +\end{exercise} + + +\begin{exercise} +\index{eval function} +\index{function!eval} + +내장 함수인 {\tt eval}은 문자열을 받아 Python 인터프리터를 사용하여 +계산한다. 다음 예를 살펴보자. + +\begin{verbatim} +>>> eval('1 + 2 * 3') +7 +>>> import math +>>> eval('math.sqrt(5)') +2.2360679774997898 +>>> eval('type(math.pi)') + +\end{verbatim} +% +반복저으로 사용자의 입력을 기다리는 \verb"eval_loop" 함수를 +작성해보자. 전달받은 값을 {\tt eval} 함수로 계산하고 그 결과를 +출력하도록 만들자. + +사용자가 \verb"'done'"을 입력하기 전까지 계속 동작하고 종료하면서 +마지막 계산한 수식의 결과를 표시하도록 만들자. + +\end{exercise} + + +\begin{exercise} +\index{Ramanujan, Srinivasa} + +스리니바사 라마누잔(Srinivasa Ramanujan)은 무한 급수를 발견하였다. +무한 급수는 $1 / \pi$의 근사치를 구하는데 쓰인다. +\index{pi} + +\[ \frac{1}{\pi} = \frac{2\sqrt{2}}{9801} +\sum^\infty_{k=0} \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}} \] + +위의 공식을 사용하여 $\pi$의 추청지를 계산하여 리턴하는 +\verb"estimate_pi" 함수를 작성해보자. {\tt while} 루프를 사용하여 +추정치의 마지막 항이 {\tt 1e-15}(Python에서 $10^{-15}$의 표기)보다 작을 +때까지 반복하라. 얻은 결과는 {\tt math.pi}와 비교해 볼 수 있다. + +해답: \url{http://thinkpython2.com/code/pi.py}. + +\end{exercise} + + +\chapter{문자열} +%Strings +\label{strings} + +문자열은 정수나 부동소수점 그리고 boolean 과같지 않다. 문자열은 {\bf + 수열(sequence)}로서 여러 값들의 순차 컬렉션이다. 이 장에서는 +문자열을 이루는 글자들을 접근하는 방법과 몇 개의 문자열 관련 메소드를 +배울 것이다. +\index{sequence} +%ordered collection 순차 컬렉션 + +\section{문자열은 수열이다} +%A string is a sequence + +\index{sequence} +\index{character} +\index{bracket operator} +\index{operator!bracket} + +문자열은 글자들의 수열이다. 각 글자를 각괄호를 사용해 접근할 수 있다. + +\begin{verbatim} +>>> fruit = 'banana' +>>> letter = fruit[1] +\end{verbatim} +% +두 번째 문장은 {\tt fruit}의 첫 글자를 {\tt letter}에 할당한다. +\index{index} + +각괄호에 쓰인 표현식을 {\bf 색인(index)}이라 한다. 색인(이름에서 알 수 +있듯이)은 수열에서 원하는 글자를 가리킨다. + +그렇지만 기대한 글자가 아닐 수 있다. + +\begin{verbatim} +>>> letter +'a' +\end{verbatim} +% +대부분의 사람에게 \verb"'banana'"의 첫 글자는 {\tt a}가 아니라 {\tt + b}이다. 그렇지만 컴퓨터 과학자에게는 색인 첫 글자로부터 떨어진 +위치를 뜻하기 때문에 첫 글자의 첫 글자로부터 떨어진 위치는 0이다. + + +\begin{verbatim} +>>> letter = fruit[0] +>>> letter +'b' +\end{verbatim} +% +{\tt b}가 \verb"'banana'"의 0번째 글자이고 {\tt a}와 {\tt n}가 각각 +1번째와 2번째 글자이다. +\index{index!starting at zero} \index{zero, index starting at} + +변수와 연산자로 구성된 표현식을 색인으로 사용할 수 있다. +\index{index} + +\begin{verbatim} +>>> i = 1 +>>> fruit[i] +'a' +>>> fruit[i+1] +'n' +\end{verbatim} +% + +기억해야 할 것은 색인은 항상 정수여야 한다는 것이다. 그렇지 않으면 +다음과 같은 오류가 발생한다. +\index{exception!TypeError} +\index{TypeError} + +\begin{verbatim} +>>> letter = fruit[1.5] +TypeError: string indices must be integers +\end{verbatim} +% + +\section{{\tt len}} +\index{len function} +\index{function!len} + +문자열의 글자 수를 리턴하는 {\tt len}는 내장 함수이다. + +\begin{verbatim} +>>> fruit = 'banana' +>>> len(fruit) +6 +\end{verbatim} +% +문자열의 마지막 글자를 얻으려고 할 때 다음과 같이 하면 될 것 같다는 생각이 든다. 그렇지만 안된다. +\index{exception!IndexError} +\index{IndexError} + +\begin{verbatim} +>>> length = len(fruit) +>>> last = fruit[length] +IndexError: string index out of range +\end{verbatim} +% +{\tt IndexError}가 발생하는 이유는 {\tt 'banana'}에서 색인 6 위치에는 +글자가 없기 때문이다. 0에서 숫자를 세기 시작하기 때문에 6 글자의 +색인은 0에서 시작해서 5에서 끝난다. 그러므로 마지막 글자를 얻으려면 +{\tt length}에서 1 뺀 값을 사용해야 한다. + +\begin{verbatim} +>>> last = fruit[length-1] +>>> last +'a' +\end{verbatim} +% +또는 색인을 음수로 쓰면 된다. 문자열을 역방향으로 셀 수 있다. {\tt + fruit[-1]}이라는 표현식은 마지막 글자를 {\tt fruit[-2]}은 끝에서 +2번째 글자를 나타내는 식이다. +\index{index!negative} +\index{negative index} + + +\section{{\tt for} 루프로 순회하기} +%Traversal with a {\tt for} loop +\label{for} +\index{traversal} +\index{loop!traversal} +\index{for loop} +\index{loop!for} +\index{statement!for} +\index{traversal} + +문자열의 각 글자 단위로 처리하는 연산들이 많다. 보통은 첫 글자에서 +시작해서, 마지막 글자에 도달하기 까지 각 글자로 무언가를 한다. 이런 +류의 작업을 {\bf 순회(traversal)}이라 부른다. 순회문을 작성하는 한 +가지 방법은 {\tt while} 루프를 쓰는 것이다. + +\begin{verbatim} +index = 0 +while index < len(fruit): + letter = fruit[index] + print(letter) + index = index + 1 +\end{verbatim} +% + +이 루프는 문자열을 순회하면서 한 글자씩 출력한다. 루프의 조건은 {\tt + index < len(fruit)}이기 때문에 {\tt index}가 문자열의 길이와 같게 될 +때까지 동작한다. 조건이 맞지 않으면 루프가 실행되지 않는다. +마지막으로 접근되는 글자는 문자열의 마지막 글자인 {\tt len(fruit)-1}번 +색인이다. + +연습삼아 문자열을 인자로 입력받아 각 줄에 한 글자씩 역순으로 출력하는 +함수를 만들어 보자. + +순회문을 작성하는 또 다른 방법은 {\tt for} 루프를 사용하는 것이다. + +\begin{verbatim} +for letter in fruit: + print(letter) +\end{verbatim} +% +루프를 순회할 때마다 다음 글자가 {\tt letter} 변수에 할당된다. 루프는 +더 이상 글자가 없을 때까지 계속 실행된다. + +\index{concatenation} +\index{abecedarian} +\index{McCloskey, Robert} + +다음 예제는 연결(문자열 더하기)하는 방법과 {\tt for} 루프를 사용하여 +알파벳 순으로 된 시리즈(series)를 만드는 방법을 소개한다. 로버트 +맥클로스키(Robert McCloskey)의 책 {\em Make Way for Ducklings}에 나오는 +오리들의 이름은 Jack, Kack, Lack, Mack, Nack, Ouack, Pack, 그리고 +Quack이다. 이 루프는 이 이름들을 알파벳 순서대로 출력한다. + + +\begin{verbatim} +prefixes = 'JKLMNOPQ' +suffix = 'ack' + +for letter in prefixes: + print(letter + suffix) +\end{verbatim} +% +결과는 다음과 같다. + +\begin{verbatim} +Jack +Kack +Lack +Mack +Nack +Oack +Pack +Qack +\end{verbatim} +% +이 결과가 완전히 정확한 것은 아니다. ``Ouack''과 ``Quack'' 스펠링이 +잘못되었기 때문이다. 연습 문제로 이 오류를 고쳐보라. + + + + +\section{문자열 조각} +%String slices +\label{slice} +\index{slice operator} \index{operator!slice} \index{index!slice} +\index{string!slice} \index{slice!string} + +문자열 중 일 부분을 {\bf 조각(slice)}이라 부른다. 조각을 선택하는 +방법은 글자를 선택하는 방법과 동일하다. + + +\begin{verbatim} +>>> s = 'Monty Python' +>>> s[0:5] +'Monty' +>>> s[6:12] +'Python' +\end{verbatim} +% +{\tt [n:m]} 연산자가 ``n 번째'' 글자부터 ``m 번째'' 글자까지를 +리턴한다. 이 때, 첫글자는 포함되고 마지막 글자는 미포함이라는 것에 +주의해야 한다. 이와 같은 동작은 비직관적이지만, 그림 +\ref{fig.banana}에서 보인 것처럼 색인 번호가 글자들 사이를 가리키고 +있다고 생각하면 이해하는데 도움이 된다. + + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/banana.pdf}} +\caption{Slice indices.} +\label{fig.banana} +\end{figure} + +첫 번째 색인(콜론 앞의 숫자)을 쓰지 않으면 조각은 문자열의 첫 위치부터 +시작한다. 두 번째 색인을 쓰지 않으면 문자열의 끝까지를 리턴한다. + +\begin{verbatim} +>>> fruit = 'banana' +>>> fruit[:3] +'ban' +>>> fruit[3:] +'ana' +\end{verbatim} +% +첫 색인이 두 번째 색인보다 크거나 같으면 두 개의 따옴표만 있는 {\bf 빈 + 문자열(empty string)}을 얻는다. +\index{quotation mark} + +\begin{verbatim} +>>> fruit = 'banana' +>>> fruit[3:3] +'' +\end{verbatim} +% +빈 문자열은 글자를 포함하지 않기 때문에 길이가 0이라는 것 외에는 다른 +문자열과 다를 바가 없다. + +이 예제로 계속 이어가 보자. {\tt fruit[:]}는 어떤 의미를 갖는 +표현일까? 한 번 실행해보자. +\index{copy!slice} +\index{slice!copy} + + + +\section{문자열의 불변성} +%Strings are immutable +\index{mutability} +\index{immutability} +\index{string!immutable} + +문자열의 글자를 바꾸려는 의도로 {\tt[]} 연산자를 할당문의 왼편에 놓고 +쓰고 싶을 수도 있다. 다음의 예를 살펴보자. +\index{TypeError} +\index{exception!TypeError} + +\begin{verbatim} +>>> greeting = 'Hello, world!' +>>> greeting[0] = 'J' +TypeError: 'str' object does not support item assignment +\end{verbatim} +% +여기서 ``객체(object)''는 문자열이고 ``항목(item)''은 할당하려고 했던 +글자를 뜻한다. 현재로서는 객체는 값과 동일하다고 이해하고 +넘어가자. \ref{equivalence}절에서 객체에 대한 정확한 정의를 다루도록 +하겠다. +\index{object} +\index{item} +\index{item assignment} +\index{assignment!item} +\index{immutability} + +이와 같은 오류의 원인은 문자열의 {\bf 불변성(immutable)} 때문이다. 한 +번 정의된 문자열은 변경할 수 없다는 말이다. 원래의 문자열을 변경하는 +가장 좋은 방법은 새로운 문자열을 만드는 것이다. + +\begin{verbatim} +>>> greeting = 'Hello, world!' +>>> new_greeting = 'J' + greeting[1:] +>>> new_greeting +'Jello, world!' +\end{verbatim} +% +이 예제는 {\tt greeting} 문자열의 조각에 새로운 첫 글자를 연결하고 +있다. 원래의 문자열에는 어떤 변경도 일어나지 않는다. +\index{concatenation} + + +\section{검색} +%Searching +\label{find} + +다음 함수가 하는 일은? +\index{find function} +\index{function!find} + +\begin{verbatim} +def find(word, letter): + index = 0 + while index < len(word): + if word[index] == letter: + return index + index = index + 1 + return -1 +\end{verbatim} +% +{\tt find}는 {\tt []} 연산자의 역이라고 생각할 수 있다. 문자열에서 +색인 위치의 글자를 추출하는 대신 글자를 전달받아 문자열에서 몇 번째 +위치에 해당 글자가 있는지 리턴하고 있다. 해당 글자가 없다면 함수는 +{\tt -1}을 리턴한다. + +처음으로 {\tt return}문이 루프안에 있는 예제를 살펴보았다. {\tt + word[index] == letter}라면 함수는 루프에서 벗어나 즉시 리턴한다. + +문자열에서 찾고자 하는 글자가 없다면 프로그램은 루프에서 정상적으로 +빠져나와서 {\tt -1}을 리턴한다. + +수열을 순회하면서 찾고자 하는 것을 발견하면 리턴하는 종류의 연산을 +{\bf 검색(search)}이라 한다. +\index{traversal} +\index{search pattern} +\index{pattern!search} + +연습 문제로 {\tt find} 함수에 세 번째 매개 변수를 추가해보라. 이 매개 +변수는 {\tt word}에서 찾기 시작해야 할 색인 번호 이다. + + +\section{루프와 합계} +%Looping and counting +\label{counter} +\index{counter} +\index{counting and looping} +\index{looping and counting} +\index{looping!with strings} + +다음은 문자열에서 {\tt a}가 몇 번 있는지 세는 프로그램이다. + +\begin{verbatim} +word = 'banana' +count = 0 +for letter in word: + if letter == 'a': + count = count + 1 +print(count) +\end{verbatim} +% +이 프로그램은 {\bf 카운터(counter)}라는 연산 패턴을 나타낸다. {\tt + count} 변수는 최초에 0으로 초기화하고 {\tt a}를 만날 때마다 1씩 +증가를 한다. 루프를 종료하면 {\tt count}는 문자열 내의 {\tt a}의 +개수가 저장된다. + +\index{encapsulation} 연습 문제로 이 코드를 {\tt count}라는 함수 +이름으로 캡슐화해보자. 그리고 일반화하여 문자열과 셀 글자를 인자로 +받도록 해보자. + +그 후에는 만들었던 세 개의 인자를 전달 받는 {\tt find} 함수를 사용하여 +문자열 순회 부분을 제거해보자. + + +\section{문자열 메소드} +%String methods +\label{optional} + +문자열을 조작할 수 있는 다양한 메소드가 있다. 메소드는 함수처럼 인자를 +전달 받고 리턴 값을 갖고 있지만, 문법이 다르다. 예를 들어 {\tt + upper}라는 메소드는 전달 받은 문자열을 모두 대문자로 변환하여 +리턴한다. +\index{method} +\index{string!method} + +함수 문법처럼 {\tt upper(word)}라고 쓰는 대신 메소드는 {\tt + word.upper()}라고 쓴다. + +\begin{verbatim} +>>> word = 'banana' +>>> new_word = word.upper() +>>> new_word +'BANANA' +\end{verbatim} +% +메소드의 이름인 {\tt upper}와 메소드를 적용할 문자열의 이름 {\tt + word}와 함께 닷 표기법으로 써야 한다. 빈괄호를 쓰는 것은 인자를 받지 +않기 때문이다. +\index{parentheses!empty} +\index{dot notation} + +메소드 호출을 함수 호출과는 다른 의미로 {\bf 호출(invocation)}이라고 +부른다. 지금의 경우에는 {\tt word}에 대해서 {\tt upper} 메소드를 +호출(invoke)했다. +% 재번역 A method call is called an {\bf invocation}; in this case, we would +% say that we are invoking {\tt upper} on {\tt word}. +\index{invocation} + +이제 볼 {\tt find}라는 메소드는 우리가 작성했던 코드와 동작이 매우 유사하다. + +\begin{verbatim} +>>> word = 'banana' +>>> index = word.find('a') +>>> index +1 +\end{verbatim} +% +이 예제에서는 {\tt word}에 대해서 {\tt find}라는 메소드를 호출하면서 그 +메소드에 우리가 찾는 글자를 인자로 전달 한다. + +사실은 {\tt find} 메소드는 우리가 작성한 코드보다 더 일반화가 잘되어 +있다. 글자만 찾는 것이 아니라 문자열 중 일부분을 찾을 수도 있다. + +\begin{verbatim} +>>> word.find('na') +2 +\end{verbatim} +% +기본적으로 {\tt find}는 문자열의 처음 부분에서 시작하지만 두 번째 +인자로 시작해야 하는 색인을 쓸 수 있다. +\index{optional argument} +\index{argument!optional} + +\begin{verbatim} +>>> word.find('na', 3) +4 +\end{verbatim} +% +이 예제는 {\tt find} 메소드가 세 번째 {\bf 선택적 인자(optional + argument)}로 멈춰야 할 색인도 받을 수 있다는 것을 보여준다. + +\begin{verbatim} +>>> name = 'bob' +>>> name.find('b', 1, 2) +-1 +\end{verbatim} +% +이 검색은 색인 {\tt 1}에서 {\tt 2} 전까지의 색인에 {\tt b}가 없기 +때문에 실패하였다. 두 번째 색인을 포함하지 않고 그 전까지만 검색하기 +때문에 {\tt find}는 문자열 조각 연산과 일관성있게 동작한다. + + + +\section{{\tt in} 연산} +%The {\tt in} operator +\label{inboth} +\index{in operator} +\index{operator!in} +\index{boolean operator} +\index{operator!boolean} + +{\tt in}이라는 단어는 포함 여부를 나타내는 boolean 연산자이다. 두 개의 +문자열을 인자로 받아서 첫 번째 문자열이 두 번째 문자열에 +부분문자열이라면 {\tt True}를 리턴한다. + + +\begin{verbatim} +>>> 'a' in 'banana' +True +>>> 'seed' in 'banana' +False +\end{verbatim} +% +예를 들어 다음의 함수는 {\tt word1} 중 {\tt word2}에 포함되는 글자들을 +모두 출력한다. + +\begin{verbatim} +def in_both(word1, word2): + for letter in word1: + if letter in word2: + print(letter) +\end{verbatim} +% +변수명을 잘짓는다면 Python이 영어처럼 읽히기도 한다. + +\begin{tabular}{l} +for (each) letter in (the first) word, \\ +\begingroup\scriptsize +(첫 번째) 단어에 포함된 (각) 글자들에대해 \endgroup\\ +if (the) letter (appears) in (the second) word,\\ +\begingroup\scriptsize +(해당) 글자가 (두 번째) 단어에 포함되어 있다면 \endgroup\\ + print (the) letter. \\ +\begingroup\scriptsize +(포함된) 글자를 출력하라. \endgroup +\end{tabular} + + +다음의 예에서는 사과(apples)와 오렌지(oranges)를 비교한 결과이다. + + +\begin{verbatim} +>>> in_both('apples', 'oranges') +a +e +s +\end{verbatim} +% + +\section{문자열 비교} +%String comparison +\index{string!comparison} +\index{comparison!string} + +관계 연산자는 문자열도 다룰 수 있다. 두 문자열이 동일한지 보려면 다음처럼 하면 된다. + +\begin{verbatim} +if word == 'banana': + print('All right, bananas.') +\end{verbatim} +% +다른 관계 연산자들은 입력받은 단어들을 알파벳 순으로 정렬하는데 유용하다. + +\begin{verbatim} +if word < 'banana': + print('Your word, ' + word + ', comes before banana.') +elif word > 'banana': + print('Your word, ' + word + ', comes after banana.') +else: + print('All right, bananas.') +\end{verbatim} +% +Python은 대소문자를 사람들이 하듯이 구분하지 않는다. 모든 대문자는 +모든 소문자 전에 나타난다. 그러므로 다음과 같은 결과를 얻게 된다. + +\begin{verbatim} +Your word, Pineapple, comes before banana. +\end{verbatim} +% +이런 류의 문제에 대응하는 일반적인 방법은 비교 전에 대문자를 소문자로 +바꾸어 문자열을 표준 형식으로 변환하는 것이다. 문자열 비교할 때 이런 +차이를 잘 기억하고 실수하지 않도록 하자. + +% 원문 Keep that in mind in case you have to defend yourself against a man armed with a Pineapple. + + +\section{디버깅} +%Debugging +\index{debugging} +\index{traversal} + +색인을 사용하여 수열의 값을 순회할 때 첫 시작 지점과 끝 지점을 제대로 +지정하는게 까다로울 수 있다. 다음의 함수는 두 단어를 비교하고 한 +단어가 다른 단어의 역순인 경우 {\tt True}를 리턴한다. 하지만, 두 개의 +오류가 있다. + + +\begin{verbatim} +def is_reverse(word1, word2): + if len(word1) != len(word2): + return False + + i = 0 + j = len(word2) + + while j > 0: + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 + + return True +\end{verbatim} +% +첫 {\tt if}문은 두 단어의 길이가 같은지 비교한다. 서로 다르면 {\tt + False}를 즉시 리턴한다. 아니면, 함수가 끝날 때까지 두 단어의 길이는 +같다고 가정할 수 있다. 이 용법은 \ref{guardian} 절에서 다룬 가디언 +패턴의 예이다. +\index{guardian pattern} +\index{pattern!guardian} +\index{index} + +{\tt i}와 {\tt j}는 색인이다. {\tt i}는 {\tt word1}을 순방향으로 +순회하고 {\tt j}는 {\tt word2}를 역방향으로 순회한다. 각 단어의 글자가 +서로 맞지 않다면 즉시 {\tt Flase}를 리턴한다. 루프를 모두 끝내고 각 +단어의 모든 글자가 동일하다면 {\tt True}를 리턴한다. + +``pots''와 ``stop''이라는 단어로 검사를 했을 때 {\tt True}를 리턴하길 +기대하겠지만, IndexError(색인 오류)가 발생한다. +\index{IndexError} +\index{exception!IndexError} + +\begin{verbatim} +>>> is_reverse('pots', 'stop') +... + File "reverse.py", line 15, in is_reverse + if word1[i] != word2[j]: +IndexError: string index out of range +\end{verbatim} +% +저자가 이런 류의 오류를 디버깅하는 방법은 오류 발생 지점 바로 전 줄에서 +색인을 출력해보는 것이다. + +\begin{verbatim} + while j > 0: + print(i, j) # print here + + if word1[i] != word2[j]: + return False + i = i+1 + j = j-1 +\end{verbatim} +% +다시 프로그램을 실행해보면 다음과 같은 정보를 얻는다. + +\begin{verbatim} +>>> is_reverse('pots', 'stop') +0 4 +... +IndexError: string index out of range +\end{verbatim} +% +루프를 처음 돌 때 {\tt j}의 값이 4라서 문자열 \verb"'pots'"의 범위를 +벗어난다. 이 문자열의 마지막 문자의 색인은 3이기 때문에 {\tt j}의 초기 +값은 {\tt len(word2)-1}이 되어야 한다. + +오류를 수정하여 다시 실행한 결과는 다음과 같다. + +\begin{verbatim} +>>> is_reverse('pots', 'stop') +0 3 +1 2 +2 1 +True +\end{verbatim} +% +이제야 결과가 정확하게 나왔다. 하지만 루프가 3번만 실행된 것이 +이상해보인다. 이 문제를 이해하기 위해 상태도를 그려보자. 첫 루프에서 +\verb"is_reverse"의 프레임의 상태는 그림 \ref{fig.state4}에 나타나 +있다. +\index{state diagram} \index{diagram!state} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/state4.pdf}} +\caption{상태도.} +\label{fig.state4} +\end{figure} + +임의로 프레임 내의 변수들의 자리를 재배치하였고 점선을 사용하여 {\tt + i}와 {\tt j}가 각각 {\tt word1}과 {\tt word2}의 글자들을 나타내는 +것을 표현하였다. + +이 그림을 시작점으로 해서 종이 위에서 프로그램의 실행 과정을 +따라가보자. 반복할 때마다 {\tt i}와 {\tt j}의 값을 바꿔보자. 함수에 +있는 두 번째 오류를 찾아 고쳐보자. +\label{isreverse} + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[객체(object):] 변수를 가리킬 수 있는 무엇. ``객체(object)''와 + ``값(value)''를 교차하여 사용할 수 있다. 앞으로 더 정확하게 정의할 + 것이다. +\index{object} + +\item[수열(sequence):] 정수 색인으로 구분되는 값들의 여러 값들의 순차 컬렉션 +\index{sequence} + +\item[아이템(item):] 수열에 포함된 값 중 하나 +\index{item} + +\item[색인(index):] 수열에 있는 아이템을 선택하기 위한 정수 값. + Python의 색인은 0에서 시작한다. +\index{index} + +\item[조각(slice):] 색인 범위로 지정된 문자열의 일부 +\index{slice} + +\item[빈 문자열(empty string):] 길이가 0이고 글자가 포함안된 문자열로 + 두 개의 연속된 따옴표로 표현된다. +\index{empty string} + +\item[불변성(immutable):] 수열의 특성으로 변경 불가능한 아이템들을 갖는 + 수열을 뜻함 +\index{immutability} + +\item[순회(traverse):] 수열의 아이템들을 하나씩 방문하면서 유사한 동작을 수행함 +\index{traversal} + +\item[검색(search):] 순회 패턴 중 하나로 찾는 것을 발견하면 멈춤 +\index{search pattern} +\index{pattern!search} + +\item[카운터(counter):] 보통 0으로 초기화된 후 증가하는 값으로 무언가를 + 셀 때 사용하는 변수 +\index{counter} + +\item[호출(invocation):] 메소드를 호출하는 문장 +\index{invocation} + +\item[선택적 인자(optional argument):] 함수나 메소드의 인자 중 꼭 필요하지 않은 것 +\index{optional argument} +\index{argument!optional} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +\index{string method} +\index{method!string} + +\url{http://docs.python.org/3/library/stdtypes.html#string-methods}에 +설명된 문자열 메소드들의 문서을 읽어보자. 어떻게 동작하는지 알 수 +있도록 몇 개는 꼭 실험해보기 바란다. {\tt strip}과 {\tt replace}는 +특히 유용하므로 실험해보기 바란다. + +이 문서는 어쩌면 혼돈스러운 문법을 사용하고 있다. 예를 들어 +\verb"find(sub[, start[, end]])"에서 사용된 각괄호는 선택적 인자를 +나타낸다. {\tt sub}은 필수이지만 {\tt start}는 선택적이다. {\tt + start}를 선택한 경우에만 해당하는데, 선택했다면 {\tt end}가 선택적 +인자이다. +\index{optional argument} +\index{argument!optional} + +\end{exercise} + + +\begin{exercise} +\index{count method} +\index{method!count} + +{\tt count}라는 문자열 메소드가 있는데, \ref{counter}절에서 본 함수와 +유사하다. 이 메소드에 대한 문서를 읽어보고 \verb"'banana'"에 {\tt a}가 +몇 개 있는지 세는 호출문을 작성해보자. +\end{exercise} + + +\begin{exercise} +\index{step size} +\index{slice operator} +\index{operator!slice} + +문자열 조각 연산자는 ``증감폭(step size)''를 지정할 수 있는 세 번째 +색인이 있다. 이 값을 지정하면 지정된 칸만큼 떨어진 글자를 선택한다. +예를 들어 증감폭이 2이면 홀수 번째만 선택하고 3이면 3배수 위치의 값만 +선택한다. + +\begin{verbatim} +>>> fruit = 'banana' +>>> fruit[0:5:2] +'bnn' +\end{verbatim} + +증감폭을 -1로 지정하면 역순으로 순회한다. \verb"[::-1]"라고 쓰면 +역순으로 표기된 문자열을 얻는다. +\index{palindrome} + +이 표현을 사용하여 연습문제 \ref{palindrome}의 \verb"is_palindrome"을 +한 줄로 표현해보자. +\end{exercise} + + +\begin{exercise} + + 다음은 문자열이 소문자로 구성되었는지 검사하도록 {\em 의도}한 + 함수들이다. 이들 중 어떤 것들은 잘못되었다. 각 함수마다 무슨 동작을 + 하는지 설명해보라(문자열을 매개 변수로 받는다 가정하자). + +\begin{verbatim} +def any_lowercase1(s): + for c in s: + if c.islower(): + return True + else: + return False + +def any_lowercase2(s): + for c in s: + if 'c'.islower(): + return 'True' + else: + return 'False' + +def any_lowercase3(s): + for c in s: + flag = c.islower() + return flag + +def any_lowercase4(s): + flag = False + for c in s: + flag = flag or c.islower() + return flag + +def any_lowercase5(s): + for c in s: + if not c.islower(): + return False + return True +\end{verbatim} + +\end{exercise} + + +\begin{exercise} +\index{letter rotation} +\index{rotation, letter} + +\label{exrotate} +카이사르의 암호(Ceasar cypher)은 알파벳 상의 글자를 고정된 위치만큼 회전하여 다른 글자로 치환하는 방식이다. 이 말의 뜻은 'A'라는 글자를 3 회전하면 'D'가 되고 'Z'를 1 회전하면 'A'가 되도록 한다는 말이다. + +단어를 회전하려면 각 글자를 같은 크기만큼 회전하여 치환하면 된다. 예를 +들어 ``cheer''를 7 회전하면 ``jolly''가 되고 ``melon''을 -10회전하면 +cubed''가 된다. {\em 2001: 스페이스 오디세이}라는 영화에 나오는 +디스커버리호의 주컴퓨터 HAL은 IBM을 -1 회전한 글자이다. + +%For example ``sleep'' +%rotated by 9 is ``bunny'' and ``latex'' rotated by 7 is ``shale''. + +함수 \verb"rotate_word"를 작성하여 문자열과 정수를 매개 변수로 받아 +정수만큼 문자열을 회전한 카이사르의 암호를 리턴해보자. + +글자를 숫자로 변환시키는 내장 함수 {\tt ord}와 숫자를 글자로 변환하는 내장 함수 {\tt chr}를 사용해서 작성해보자. 알파벳의 글자들은 순차적으로 부호화되어 있다. 예를 들어 보자. + +\begin{verbatim} +>>> ord('c') - ord('a') +2 +\end{verbatim} + +\verb"'c'"는 \verb"'a'"에서 두 번째 떨어진 위치에 있기 때문에 결과가 +2가 된다. 대문자는 다르게 부호화되어 있다는 것에 주의하다. + +인터넷에 떠도는 불쾌한 농담들은 ROT13으로 부호화된 것들이 많다. +ROT13은 카이사르 암호로 13번 회전했다는 뜻이다. 무덤덤한 독자라면 찾아 +바꿔 읽어 보자. 해답은 \url{http://thinkpython2.com/code/rotate.py}에 +있다. + +\end{exercise} + + +\chapter{사례 연구: 단어 놀이} +%Case study: word play +\label{wordplay} + +이 번 장에서는 두 번째의 사례 연구를 선보인다. 특정 성질을 갖는 +단어들을 찾아 단어 퍼즐을 푸는 프로그램이다. 예를 들어 영어에 존재하는 +긴 회문을 찾아 알파벳 순으로 글자가 나타나는 단어들을 찾을 것이다. +그리고 나서 이전에 해결한 문제의 해법을 응용하는 다른 프로그램 개발 +계획에 대해 설명할 것이다. + + + +\section{단어 목록 읽어 들이기} +%Reading word lists +\label{wordlist} + +이 장에서의 활용할 예제들은 영어 단어의 목록이 있어야 한다. 웹에는 +무수히 많은 단어 목록들이 있지만 우리의 목적에 가장 적합한 목록은 +Grady Ward가 공개적으로 유지 관리 및 기여하고 있는 모비 어휘목록 +프로젝트 (Moby lexicon project, +\url{http://wikipedia.org/wiki/Moby_Project} 참고)이다. 이 목록은 +113,809개의 공식 십자 낱말 풀이용 단어들이다. 십자 낱말 풀이와 다른 +단어 놀이에 적합한 단어 목록이다. 이 모비 목록은 {\tt + 113809of.fic}이라는 이름을 갖고 있지만 +\url{http://thinkpython2.com/code/words.txt}에서 {\tt words.txt}라는 +쉬운 이름으로 내려 받아 사용하면 된다. +\index{Moby Project} +\index{crosswords} + +이 파일은 서식이 없어서 어떤 문서 편집기로 열어도 되지만, Python에서 이 +파일을 읽어보자. 파일 이름을 매개 변수로 {\tt open}이라는 내장 함수에 +전달하면 해당 파일을 읽을 수 있는 {\bf 파일 객체}를 리턴 받는다. +\index{open function} +\index{function!open} +\index{plain text} +\index{text!plain} +\index{object!file} +\index{file object} + +\begin{verbatim} +>>> fin = open('words.txt') +\end{verbatim} +% +{\tt fin}은 입력으로 전달 받은 파일 객체를 나타내는 일반적인 이름이다. +파일 객체는 읽기를 위한 여러 메소드를 제공하는데 그 중에는 {\tt + readline}도 포함된다. 이 메소드는 파일에서 줄 바꿈(newline) 기호를 만나기 +전까지의 글자들을 읽은 후 해당 문자열을 리턴한다. +\index{readline method} +\index{method!readline} + +\begin{verbatim} +>>> fin.readline() +'aa\r\n' +\end{verbatim} +% +이 목록에서 첫 번째 단어는 ``aa''로 용암의 일종이다. 그 뒤에 따라오는 +\verb"\r\n"은 두 개의 공백 문자로 리턴(carriage return)과 줄 바꿈을 +나타내며 다음 단어와 지금의 단어를 구분하는 역할을 한다. + +파일 객체는 파일에서의 현재 위치를 기억하고 있기 때문에 또 한 번 {\tt + readline}을 호출하면 그 다음 단어를 얻는다. + +\begin{verbatim} +>>> fin.readline() +'aah\r\n' +\end{verbatim} +% +그 다음 단어는 ``aah''이며, 이 단어도 전혀 이상하지 않은 낱말이다. +만약 공백 문자가 거슬린다면 {\tt strip}이라는 문자열 메소드를 이용하여 +없앨 수 있다. +\index{strip method} +\index{method!strip} + +\begin{verbatim} +>>> line = fin.readline() +>>> word = line.strip() +>>> word +'aahed' +\end{verbatim} +% +{\tt for} 루프에 파일 객체를 사용할 수도 있다. 다음의 프로그램은 {\tt + words.txt}를 읽어서 각 단어를 한 줄씩 읽는 동작을 한다. +\index{open function} +\index{function!open} + +\begin{verbatim} +fin = open('words.txt') +for line in fin: + word = line.strip() + print(word) +\end{verbatim} +% + +\section{연습 문제} +%Exercises + +이 연습 문제들에 대한 해답은 다음 절에 나와 있다. 해법을 읽어보기 전에 +풀어 보기 바란다. + +\begin{exercise} + {\tt words.txt}를 읽는 프로그램을 작성하여 (공백을 포함하지 않고) 20 + 글자 이상이 되는 단어들만 출력 해보자. +\index{whitespace} + +\end{exercise} + +\begin{exercise} + + 1939년에 Ernest Vincent Wright가 {\em Gadsby}라는 50,000 단어로 된 + 소설을 출판하였다. 그 소설에는 영어에서 가장 흔한 글자 중 하나인 + ``e''가 포함되어 있지 않다. 그런 글을 쓴다는 것이 쉬운 일은 아니었을 + 것이다. + + 사실 이 흔한 글자를 쓰지 않고는 사적인 생각을 하기도 어렵다. + 처음에는 매우 느리겠지만 조심스럽게 오랜 시간 동안 훈련을 하다보면 할 + 수 있게 된다. + + 설명은 여기까지. + + \verb"has_no_e"이라는 함수를 작성하여 전달 받은 단어에 ``e''가 없다면 + {\tt True}를 리턴하도록 하자. + + 이전 절에서 사용한 프로그램을 수정하여 ``e''를 포함하고 있지 않은 + 단어들만 출력하도록 한 뒤 단어 목록에서 ``e''를 포함하고 있지 않은 + 단어의 백분율을 계산해보자. + +\index{lipogram} + +\end{exercise} + + +\begin{exercise} + + 단어와 금지 문자열을 입력 받는 {\tt avoids}라는 함수를 작성해보자. + 만약 이 함수가 {\tt True}를 리턴하면 해당 단어는 금지 문자열을 쓰고 + 있지 않다는 뜻이다. + + 사용자가 금지 문자를 입력하도록 프로그램을 수정한 후 금지 문자열을 + 포함하지 않는 단어가 총 몇 개인지 출력하도록 해보자. 가장 적은 수의 + 단어들을 목록에서 제거하도록 문자 다섯 개로 이루어진 금지 문자 집합을 + 구성할 수 있겠는가? + +\end{exercise} + + + +\begin{exercise} + + 단어와 문자열을 입력 받는 \verb"uses_only" 라는 함수를 작성하여 + 전달한 문자열로만 이루어진 단어인 경우에만 {\tt True}를 리턴하도록 + 해보자. {\tt acefhlo}만으로 로 이루어진 문장을 만들 수 있겠는가? + ``Hoe alfalfa''외에 다른 문장을 만들어보자. + +\end{exercise} + + +\begin{exercise} + + 단어와 꼭 사용해야 하는 글자로 이루어진 문자열을 입력 받는 + \verb"uses_all" 라는 함수를 작성해보자. 이 함수는 꼭 사용해야 하는 + 문자열의 글자들을 최소한 한 번 사용하면 {\tt True}를 리턴한다. {\tt + aeiou}를 모두 사용하는 단어는 몇 개나 있는가? {\tt aeiouy}를 + 사용하는 하는 단어는 몇 개나 있나? + +\end{exercise} + + +\begin{exercise} + + 단어의 글자들이 알파벳 순으로 나열이 되어 있으면 {\tt True}를 + 리턴하는 \verb"is_abecedarian"이라는 함수를 작성해보자(두 번 연속 + 사용되는 경우도 인정된다). 알파벳 순으로 된 단어가 몇 개나 되는가? + +\index{abecedarian} + +\end{exercise} + + + +\section{검색} +%Search +\label{search} +\index{search pattern} +\index{pattern!search} + +All of the exercises in the previous section have something +in common; they can be solved with the search pattern we saw +in Section~\ref{find}. The simplest example is: + +\begin{verbatim} +def has_no_e(word): + for letter in word: + if letter == 'e': + return False + return True +\end{verbatim} +% +The {\tt for} loop traverses the characters in {\tt word}. If we find +the letter ``e'', we can immediately return {\tt False}; otherwise we +have to go to the next letter. If we exit the loop normally, that +means we didn't find an ``e'', so we return {\tt True}. +\index{traversal} + +\index{in operator} +\index{operator!in} +You could write this function more concisely using the {\tt in} +operator, but I started with this version because it +demonstrates the logic of the search pattern. + +\index{generalization} +{\tt avoids} is a more general version of \verb"has_no_e" but it +has the same structure: + +\begin{verbatim} +def avoids(word, forbidden): + for letter in word: + if letter in forbidden: + return False + return True +\end{verbatim} +% +We can return {\tt False} as soon as we find a forbidden letter; +if we get to the end of the loop, we return {\tt True}. + +\verb"uses_only" is similar except that the sense of the condition +is reversed: + +\begin{verbatim} +def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True +\end{verbatim} +% +Instead of a list of forbidden letters, we have a list of available +letters. If we find a letter in {\tt word} that is not in +{\tt available}, we can return {\tt False}. + +\verb"uses_all" is similar except that we reverse the role +of the word and the string of letters: + +\begin{verbatim} +def uses_all(word, required): + for letter in required: + if letter not in word: + return False + return True +\end{verbatim} +% +Instead of traversing the letters in {\tt word}, the loop +traverses the required letters. If any of the required letters +do not appear in the word, we can return {\tt False}. +\index{traversal} + +If you were really thinking like a computer scientist, you would +have recognized that \verb"uses_all" was an instance of a +previously solved problem, and you would have written: + +\begin{verbatim} +def uses_all(word, required): + return uses_only(required, word) +\end{verbatim} +% +This is an example of a program development plan called {\bf + reduction to a previously solved problem}, which means that you +recognize the problem you are working on as an instance of a solved +problem and apply an existing solution. \index{reduction to a + previously solved problem} \index{development plan!reduction} + + +\section{Looping with indices} +\index{looping!with indices} +\index{index!looping with} + +I wrote the functions in the previous section with {\tt for} +loops because I only needed the characters in the strings; I didn't +have to do anything with the indices. + +For \verb"is_abecedarian" we have to compare adjacent letters, +which is a little tricky with a {\tt for} loop: + +\begin{verbatim} +def is_abecedarian(word): + previous = word[0] + for c in word: + if c < previous: + return False + previous = c + return True +\end{verbatim} + +An alternative is to use recursion: + +\begin{verbatim} +def is_abecedarian(word): + if len(word) <= 1: + return True + if word[0] > word[1]: + return False + return is_abecedarian(word[1:]) +\end{verbatim} + +Another option is to use a {\tt while} loop: + +\begin{verbatim} +def is_abecedarian(word): + i = 0 + while i < len(word)-1: + if word[i+1] < word[i]: + return False + i = i+1 + return True +\end{verbatim} +% +The loop starts at {\tt i=0} and ends when {\tt i=len(word)-1}. Each +time through the loop, it compares the $i$th character (which you can +think of as the current character) to the $i+1$th character (which you +can think of as the next). + +If the next character is less than (alphabetically before) the current +one, then we have discovered a break in the abecedarian trend, and +we return {\tt False}. + +If we get to the end of the loop without finding a fault, then the +word passes the test. To convince yourself that the loop ends +correctly, consider an example like \verb"'flossy'". The +length of the word is 6, so +the last time the loop runs is when {\tt i} is 4, which is the +index of the second-to-last character. On the last iteration, +it compares the second-to-last character to the last, which is +what we want. +\index{palindrome} + +Here is a version of \verb"is_palindrome" (see +Exercise~\ref{palindrome}) that uses two indices; one starts at the +beginning and goes up; the other starts at the end and goes down. + +\begin{verbatim} +def is_palindrome(word): + i = 0 + j = len(word)-1 + + while i>> cheeses = ['Cheddar', 'Edam', 'Gouda'] +>>> numbers = [42, 123] +>>> empty = [] +>>> print(cheeses, numbers, empty) +['Cheddar', 'Edam', 'Gouda'] [42, 123] [] +\end{verbatim} +% +\index{assignment} + + +\section{Lists are mutable} +\label{mutable} +\index{list!element} +\index{access} +\index{index} +\index{bracket operator} +\index{operator!bracket} + +The syntax for accessing the elements of a list is the same as for +accessing the characters of a string---the bracket operator. The +expression inside the brackets specifies the index. Remember that the +indices start at 0: + +\begin{verbatim} +>>> cheeses[0] +'Cheddar' +\end{verbatim} +% +Unlike strings, lists are mutable. When the bracket operator appears +on the left side of an assignment, it identifies the element of the +list that will be assigned. +\index{mutability} + +\begin{verbatim} +>>> numbers = [42, 123] +>>> numbers[1] = 5 +>>> numbers +[42, 5] +\end{verbatim} +% +The one-eth element of {\tt numbers}, which +used to be 123, is now 5. +\index{index!starting at zero} +\index{zero, index starting at} + +Figure~\ref{fig.liststate} shows +the state diagram for {\tt +cheeses}, {\tt numbers} and {\tt empty}: +\index{state diagram} +\index{diagram!state} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/liststate.pdf}} +\caption{State diagram.} +\label{fig.liststate} +\end{figure} + +Lists are represented by boxes with the word ``list'' outside +and the elements of the list inside. {\tt cheeses} refers to +a list with three elements indexed 0, 1 and 2. +{\tt numbers} contains two elements; the diagram shows that the +value of the second element has been reassigned from 123 to 5. +{\tt empty} refers to a list with no elements. +\index{item assignment} +\index{assignment!item} +\index{reassignment} + +List indices work the same way as string indices: + +\begin{itemize} + +\item Any integer expression can be used as an index. + +\item If you try to read or write an element that does not exist, you +get an {\tt IndexError}. +\index{exception!IndexError} +\index{IndexError} + +\item If an index has a negative value, it counts backward from the +end of the list. + +\end{itemize} +\index{list!index} + +\index{list!membership} +\index{membership!list} +\index{in operator} +\index{operator!in} + +The {\tt in} operator also works on lists. + +\begin{verbatim} +>>> cheeses = ['Cheddar', 'Edam', 'Gouda'] +>>> 'Edam' in cheeses +True +>>> 'Brie' in cheeses +False +\end{verbatim} + + +\section{Traversing a list} +\index{list!traversal} +\index{traversal!list} +\index{for loop} +\index{loop!for} +\index{statement!for} + +The most common way to traverse the elements of a list is +with a {\tt for} loop. The syntax is the same as for strings: + +\begin{verbatim} +for cheese in cheeses: + print(cheese) +\end{verbatim} +% +This works well if you only need to read the elements of the +list. But if you want to write or update the elements, you +need the indices. A common way to do that is to combine +the built-in functions {\tt range} and {\tt len}: +\index{looping!with indices} +\index{index!looping with} + +\begin{verbatim} +for i in range(len(numbers)): + numbers[i] = numbers[i] * 2 +\end{verbatim} +% +This loop traverses the list and updates each element. {\tt len} +returns the number of elements in the list. {\tt range} returns +a list of indices from 0 to $n-1$, where $n$ is the length of +the list. Each time through the loop {\tt i} gets the index +of the next element. The assignment statement in the body uses +{\tt i} to read the old value of the element and to assign the +new value. +\index{item update} +\index{update!item} + +A {\tt for} loop over an empty list never runs the body: + +\begin{verbatim} +for x in []: + print('This never happens.') +\end{verbatim} +% +Although a list can contain another list, the nested +list still counts as a single element. The length of this list is +four: +\index{nested list} +\index{list!nested} + +\begin{verbatim} +['spam', 1, ['Brie', 'Roquefort', 'Pol le Veq'], [1, 2, 3]] +\end{verbatim} + + + +\section{List operations} +\index{list!operation} + +The {\tt +} operator concatenates lists: +\index{concatenation!list} +\index{list!concatenation} + +\begin{verbatim} +>>> a = [1, 2, 3] +>>> b = [4, 5, 6] +>>> c = a + b +>>> c +[1, 2, 3, 4, 5, 6] +\end{verbatim} +% +The {\tt *} operator repeats a list a given number of times: +\index{repetition!list} +\index{list!repetition} + +\begin{verbatim} +>>> [0] * 4 +[0, 0, 0, 0] +>>> [1, 2, 3] * 3 +[1, 2, 3, 1, 2, 3, 1, 2, 3] +\end{verbatim} +% +The first example repeats {\tt [0]} four times. The second example +repeats the list {\tt [1, 2, 3]} three times. + + +\section{List slices} +\index{slice operator} +\index{operator!slice} +\index{index!slice} +\index{list!slice} +\index{slice!list} + +The slice operator also works on lists: + +\begin{verbatim} +>>> t = ['a', 'b', 'c', 'd', 'e', 'f'] +>>> t[1:3] +['b', 'c'] +>>> t[:4] +['a', 'b', 'c', 'd'] +>>> t[3:] +['d', 'e', 'f'] +\end{verbatim} +% +If you omit the first index, the slice starts at the beginning. +If you omit the second, the slice goes to the end. So if you +omit both, the slice is a copy of the whole list. +\index{list!copy} +\index{slice!copy} +\index{copy!slice} + +\begin{verbatim} +>>> t[:] +['a', 'b', 'c', 'd', 'e', 'f'] +\end{verbatim} +% +Since lists are mutable, it is often useful to make a copy +before performing operations that modify lists. +\index{mutability} + +A slice operator on the left side of an assignment +can update multiple elements: +\index{slice!update} +\index{update!slice} + +\begin{verbatim} +>>> t = ['a', 'b', 'c', 'd', 'e', 'f'] +>>> t[1:3] = ['x', 'y'] +>>> t +['a', 'x', 'y', 'd', 'e', 'f'] +\end{verbatim} +% + +% You can add elements to a list by squeezing them into an empty +% slice: + +% % \begin{verbatim} +% >>> t = ['a', 'd', 'e', 'f'] +% >>> t[1:1] = ['b', 'c'] +% >>> print t +% ['a', 'b', 'c', 'd', 'e', 'f'] +% \end{verbatim} +% \afterverb +% +% And you can remove elements from a list by assigning the empty list to +% them: + +% % \begin{verbatim} +% >>> t = ['a', 'b', 'c', 'd', 'e', 'f'] +% >>> t[1:3] = [] +% >>> print t +% ['a', 'd', 'e', 'f'] +% \end{verbatim} +% \afterverb +% +% But both of those operations can be expressed more clearly +% with list methods. + + +\section{List methods} +\index{list!method} +\index{method, list} + +Python provides methods that operate on lists. For example, +{\tt append} adds a new element to the end of a list: +\index{append method} +\index{method!append} + +\begin{verbatim} +>>> t = ['a', 'b', 'c'] +>>> t.append('d') +>>> t +['a', 'b', 'c', 'd'] +\end{verbatim} +% +{\tt extend} takes a list as an argument and appends all of +the elements: +\index{extend method} +\index{method!extend} + +\begin{verbatim} +>>> t1 = ['a', 'b', 'c'] +>>> t2 = ['d', 'e'] +>>> t1.extend(t2) +>>> t1 +['a', 'b', 'c', 'd', 'e'] +\end{verbatim} +% +This example leaves {\tt t2} unmodified. + +{\tt sort} arranges the elements of the list from low to high: +\index{sort method} +\index{method!sort} + +\begin{verbatim} +>>> t = ['d', 'c', 'e', 'b', 'a'] +>>> t.sort() +>>> t +['a', 'b', 'c', 'd', 'e'] +\end{verbatim} +% +Most list methods are void; they modify the list and return {\tt None}. +If you accidentally write {\tt t = t.sort()}, you will be disappointed +with the result. +\index{void method} +\index{method!void} +\index{None special value} +\index{special value!None} + + +\section{Map, filter and reduce} +\label{filter} + +To add up all the numbers in a list, you can use a loop like this: + +% see add.py + +\begin{verbatim} +def add_all(t): + total = 0 + for x in t: + total += x + return total +\end{verbatim} +% +{\tt total} is initialized to 0. Each time through the loop, +{\tt x} gets one element from the list. The {\tt +=} operator +provides a short way to update a variable. This +{\bf augmented assignment statement}, +\index{update operator} +\index{operator!update} +\index{assignment!augmented} +\index{augmented assignment} + +\begin{verbatim} + total += x +\end{verbatim} +% +is equivalent to + +\begin{verbatim} + total = total + x +\end{verbatim} +% +As the loop runs, {\tt total} accumulates the sum of the +elements; a variable used this way is sometimes called an +{\bf accumulator}. +\index{accumulator!sum} + +Adding up the elements of a list is such a common operation +that Python provides it as a built-in function, {\tt sum}: + +\begin{verbatim} +>>> t = [1, 2, 3] +>>> sum(t) +6 +\end{verbatim} +% +An operation like this that combines a sequence of elements into +a single value is sometimes called {\bf reduce}. +\index{reduce pattern} +\index{pattern!reduce} +\index{traversal} + +Sometimes you want to traverse one list while building +another. For example, the following function takes a list of strings +and returns a new list that contains capitalized strings: + +\begin{verbatim} +def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res +\end{verbatim} +% +{\tt res} is initialized with an empty list; each time through +the loop, we append the next element. So {\tt res} is another +kind of accumulator. +\index{accumulator!list} + +An operation like \verb"capitalize_all" is sometimes called a {\bf +map} because it ``maps'' a function (in this case the method {\tt +capitalize}) onto each of the elements in a sequence. +\index{map pattern} +\index{pattern!map} +\index{filter pattern} +\index{pattern!filter} + +Another common operation is to select some of the elements from +a list and return a sublist. For example, the following +function takes a list of strings and returns a list that contains +only the uppercase strings: + +\begin{verbatim} +def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res +\end{verbatim} +% +{\tt isupper} is a string method that returns {\tt True} if +the string contains only upper case letters. + +An operation like \verb"only_upper" is called a {\bf filter} because +it selects some of the elements and filters out the others. + +Most common list operations can be expressed as a combination +of map, filter and reduce. + + +\section{Deleting elements} +\index{element deletion} +\index{deletion, element of list} + +There are several ways to delete elements from a list. If you +know the index of the element you want, you can use +{\tt pop}: +\index{pop method} +\index{method!pop} + +\begin{verbatim} +>>> t = ['a', 'b', 'c'] +>>> x = t.pop(1) +>>> t +['a', 'c'] +>>> x +'b' +\end{verbatim} +% +{\tt pop} modifies the list and returns the element that was removed. +If you don't provide an index, it deletes and returns the +last element. + +If you don't need the removed value, you can use the {\tt del} +operator: +\index{del operator} +\index{operator!del} + +\begin{verbatim} +>>> t = ['a', 'b', 'c'] +>>> del t[1] +>>> t +['a', 'c'] +\end{verbatim} +% +If you know the element you want to remove (but not the index), you +can use {\tt remove}: +\index{remove method} +\index{method!remove} + +\begin{verbatim} +>>> t = ['a', 'b', 'c'] +>>> t.remove('b') +>>> t +['a', 'c'] +\end{verbatim} +% +The return value from {\tt remove} is {\tt None}. +\index{None special value} +\index{special value!None} + +To remove more than one element, you can use {\tt del} with +a slice index: + +\begin{verbatim} +>>> t = ['a', 'b', 'c', 'd', 'e', 'f'] +>>> del t[1:5] +>>> t +['a', 'f'] +\end{verbatim} +% +As usual, the slice selects all the elements up to but not +including the second index. + + + +\section{Lists and strings} +\index{list} +\index{string} +\index{sequence} + +A string is a sequence of characters and a list is a sequence +of values, but a list of characters is not the same as a +string. To convert from a string to a list of characters, +you can use {\tt list}: +\index{list!function} +\index{function!list} + +\begin{verbatim} +>>> s = 'spam' +>>> t = list(s) +>>> t +['s', 'p', 'a', 'm'] +\end{verbatim} +% +Because {\tt list} is the name of a built-in function, you should +avoid using it as a variable name. I also avoid {\tt l} because +it looks too much like {\tt 1}. So that's why I use {\tt t}. + +The {\tt list} function breaks a string into individual letters. If +you want to break a string into words, you can use the {\tt split} +method: +\index{split method} +\index{method!split} + +\begin{verbatim} +>>> s = 'pining for the fjords' +>>> t = s.split() +>>> t +['pining', 'for', 'the', 'fjords'] +\end{verbatim} +% +An optional argument called a {\bf delimiter} specifies which +characters to use as word boundaries. +The following example +uses a hyphen as a delimiter: +\index{optional argument} +\index{argument!optional} +\index{delimiter} + +\begin{verbatim} +>>> s = 'spam-spam-spam' +>>> delimiter = '-' +>>> t = s.split(delimiter) +>>> t +['spam', 'spam', 'spam'] +\end{verbatim} +% +{\tt join} is the inverse of {\tt split}. It +takes a list of strings and +concatenates the elements. {\tt join} is a string method, +so you have to invoke it on the delimiter and pass the +list as a parameter: +\index{join method} +\index{method!join} +\index{concatenation} + +\begin{verbatim} +>>> t = ['pining', 'for', 'the', 'fjords'] +>>> delimiter = ' ' +>>> s = delimiter.join(t) +>>> s +'pining for the fjords' +\end{verbatim} +% +In this case the delimiter is a space character, so +{\tt join} puts a space between words. To concatenate +strings without spaces, you can use the empty string, +\verb"''", as a delimiter. +\index{empty string} +\index{string!empty} + + +\section{Objects and values} +\label{equivalence} +\index{object} +\index{value} + +If we run these assignment statements: + +\begin{verbatim} +a = 'banana' +b = 'banana' +\end{verbatim} +% +We know that {\tt a} and {\tt b} both refer to a +string, but we don't +know whether they refer to the {\em same} string. +There are two possible states, shown in Figure~\ref{fig.list1}. +\index{aliasing} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/list1.pdf}} +\caption{State diagram.} +\label{fig.list1} +\end{figure} + +In one case, {\tt a} and {\tt b} refer to two different objects that +have the same value. In the second case, they refer to the same +object. +\index{is operator} +\index{operator!is} + +To check whether two variables refer to the same object, you can +use the {\tt is} operator. + +\begin{verbatim} +>>> a = 'banana' +>>> b = 'banana' +>>> a is b +True +\end{verbatim} +% +In this example, Python only created one string object, and both {\tt + a} and {\tt b} refer to it. But when you create two lists, you get +two objects: + +\begin{verbatim} +>>> a = [1, 2, 3] +>>> b = [1, 2, 3] +>>> a is b +False +\end{verbatim} +% +So the state diagram looks like Figure~\ref{fig.list2}. +\index{state diagram} +\index{diagram!state} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/list2.pdf}} +\caption{State diagram.} +\label{fig.list2} +\end{figure} + +In this case we would say that the two lists are {\bf equivalent}, +because they have the same elements, but not {\bf identical}, because +they are not the same object. If two objects are identical, they are +also equivalent, but if they are equivalent, they are not necessarily +identical. +\index{equivalence} +\index{identity} + +Until now, we have been using ``object'' and ``value'' +interchangeably, but it is more precise to say that an object has a +value. If you evaluate {\tt [1, 2, 3]}, you get a list +object whose value is a sequence of integers. If another +list has the same elements, we say it has the same value, but +it is not the same object. +\index{object} +\index{value} + + +\section{Aliasing} +\index{aliasing} +\index{reference!aliasing} + +If {\tt a} refers to an object and you assign {\tt b = a}, +then both variables refer to the same object: + +\begin{verbatim} +>>> a = [1, 2, 3] +>>> b = a +>>> b is a +True +\end{verbatim} +% +The state diagram looks like Figure~\ref{fig.list3}. +\index{state diagram} +\index{diagram!state} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/list3.pdf}} +\caption{State diagram.} +\label{fig.list3} +\end{figure} + +The association of a variable with an object is called a {\bf +reference}. In this example, there are two references to the same +object. +\index{reference} + +An object with more than one reference has more +than one name, so we say that the object is {\bf aliased}. +\index{mutability} + +If the aliased object is mutable, changes made with one alias affect +the other: + +\begin{verbatim} +>>> b[0] = 42 +>>> a +[42, 2, 3] +\end{verbatim} +% +Although this behavior can be useful, it is error-prone. In general, +it is safer to avoid aliasing when you are working with mutable +objects. +\index{immutability} + +For immutable objects like strings, aliasing is not as much of a +problem. In this example: + +\begin{verbatim} +a = 'banana' +b = 'banana' +\end{verbatim} +% +It almost never makes a difference whether {\tt a} and {\tt b} refer +to the same string or not. + + +\section{List arguments} +\label{list.arguments} +\index{list!as argument} +\index{argument} +\index{argument!list} +\index{reference} +\index{parameter} + +When you pass a list to a function, the function gets a reference to +the list. If the function modifies the list, the caller sees +the change. For example, \verb"delete_head" removes the first element +from a list: + +\begin{verbatim} +def delete_head(t): + del t[0] +\end{verbatim} +% +Here's how it is used: + +\begin{verbatim} +>>> letters = ['a', 'b', 'c'] +>>> delete_head(letters) +>>> letters +['b', 'c'] +\end{verbatim} +% +The parameter {\tt t} and the variable {\tt letters} are +aliases for the same object. The stack diagram looks like +Figure~\ref{fig.stack5}. +\index{stack diagram} +\index{diagram!stack} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/stack5.pdf}} +\caption{Stack diagram.} +\label{fig.stack5} +\end{figure} + +Since the list is shared by two frames, I drew +it between them. + +It is important to distinguish between operations that +modify lists and operations that create new lists. For +example, the {\tt append} method modifies a list, but the +{\tt +} operator creates a new list. +\index{append method} +\index{method!append} +\index{list!concatenation} +\index{concatenation!list} + +Here's an example using {\tt append}: +% +\begin{verbatim} +>>> t1 = [1, 2] +>>> t2 = t1.append(3) +>>> t1 +[1, 2, 3] +>>> t2 +None +\end{verbatim} +% +The return value from {\tt append} is {\tt None}. + +Here's an example using the {\tt +} operator: +% +\begin{verbatim} +>>> t3 = t1 + [4] +>>> t1 +[1, 2, 3] +>>> t3 +[1, 2, 3, 4] +\end{verbatim} +% +The result of the operator is a new list, and the original list is +unchanged. + +This difference is important when you write functions that +are supposed to modify lists. For example, this function +{\em does not} delete the head of a list: +% +\begin{verbatim} +def bad_delete_head(t): + t = t[1:] # WRONG! +\end{verbatim} +% +The slice operator creates a new list and the assignment +makes {\tt t} refer to it, but that doesn't affect the caller. +\index{slice operator} +\index{operator!slice} +% +\begin{verbatim} +>>> t4 = [1, 2, 3] +>>> bad_delete_head(t4) +>>> t4 +[1, 2, 3] +\end{verbatim} +% +At the beginning of \verb"bad_delete_head", {\tt t} and {\tt t4} +refer to the same list. At the end, {\tt t} refers to a new list, +but {\tt t4} still refers to the original, unmodified list. + +An alternative is to write a function that creates and +returns a new list. For +example, {\tt tail} returns all but the first +element of a list: + +\begin{verbatim} +def tail(t): + return t[1:] +\end{verbatim} +% +This function leaves the original list unmodified. +Here's how it is used: + +\begin{verbatim} +>>> letters = ['a', 'b', 'c'] +>>> rest = tail(letters) +>>> rest +['b', 'c'] +\end{verbatim} + + + +\section{디버깅} +%Debugging +\index{debugging} + +Careless use of lists (and other mutable objects) +can lead to long hours of debugging. Here are some common +pitfalls and ways to avoid them: + +\begin{enumerate} + +\item Most list methods modify the argument and + return {\tt None}. This is the opposite of the string methods, + which return a new string and leave the original alone. + +If you are used to writing string code like this: + +\begin{verbatim} +word = word.strip() +\end{verbatim} + +It is tempting to write list code like this: + +\begin{verbatim} +t = t.sort() # WRONG! +\end{verbatim} +\index{sort method} +\index{method!sort} + +Because {\tt sort} returns {\tt None}, the +next operation you perform with {\tt t} is likely to fail. + +Before using list methods and operators, you should read the +documentation carefully and then test them in interactive mode. + +\item Pick an idiom and stick with it. + +Part of the problem with lists is that there are too many +ways to do things. For example, to remove an element from +a list, you can use {\tt pop}, {\tt remove}, {\tt del}, +or even a slice assignment. + +To add an element, you can use the {\tt append} method or +the {\tt +} operator. Assuming that {\tt t} is a list and +{\tt x} is a list element, these are correct: + +\begin{verbatim} +t.append(x) +t = t + [x] +t += [x] +\end{verbatim} + +And these are wrong: + +\begin{verbatim} +t.append([x]) # WRONG! +t = t.append(x) # WRONG! +t + [x] # WRONG! +t = t + x # WRONG! +\end{verbatim} + +Try out each of these examples in interactive mode to make sure +you understand what they do. Notice that only the last +one causes a runtime error; the other three are legal, but they +do the wrong thing. + + +\item Make copies to avoid aliasing. +\index{aliasing!copying to avoid} +\index{copy!to avoid aliasing} + +If you want to use a method like {\tt sort} that modifies +the argument, but you need to keep the original list as +well, you can make a copy. + +\begin{verbatim} +>>> t = [3, 1, 2] +>>> t2 = t[:] +>>> t2.sort() +>>> t +[3, 1, 2] +>>> t2 +[1, 2, 3] +\end{verbatim} + +In this example you could also use the built-in function {\tt sorted}, +which returns a new, sorted list and leaves the original alone. +\index{sorted!function} +\index{function!sorted} + +\begin{verbatim} +>>> t2 = sorted(t) +>>> t +[3, 1, 2] +>>> t2 +[1, 2, 3] +\end{verbatim} + +\end{enumerate} + + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[list:] A sequence of values. +\index{list} + +\item[element:] One of the values in a list (or other sequence), +also called items. +\index{element} + +\item[nested list:] A list that is an element of another list. +\index{nested list} + +\item[accumulator:] A variable used in a loop to add up or +accumulate a result. +\index{accumulator} + +\item[augmented assignment:] A statement that updates the value +of a variable using an operator like \verb"+=". +\index{assignment!augmented} +\index{augmented assignment} +\index{traversal} + +\item[reduce:] A processing pattern that traverses a sequence +and accumulates the elements into a single result. +\index{reduce pattern} +\index{pattern!reduce} + +\item[map:] A processing pattern that traverses a sequence and +performs an operation on each element. +\index{map pattern} +\index{pattern!map} + +\item[filter:] A processing pattern that traverses a list and +selects the elements that satisfy some criterion. +\index{filter pattern} +\index{pattern!filter} + +\item[object:] Something a variable can refer to. An object +has a type and a value. +\index{object} + +\item[equivalent:] Having the same value. +\index{equivalent} + +\item[identical:] Being the same object (which implies equivalence). +\index{identical} + +\item[reference:] The association between a variable and its value. +\index{reference} + +\item[aliasing:] A circumstance where two or more variables refer to the same +object. +\index{aliasing} + +\item[delimiter:] A character or string used to indicate where a +string should be split. +\index{delimiter} + +\end{description} + + +\section{연습 문제} +%Exercises + +You can download solutions to these exercises from +\url{http://thinkpython2.com/code/list_exercises.py}. + +\begin{exercise} + +Write a function called \verb"nested_sum" that takes a list of lists +of integers and adds up the elements from all of the nested lists. +For example: + +\begin{verbatim} +>>> t = [[1, 2], [3], [4, 5, 6]] +>>> nested_sum(t) +21 +\end{verbatim} + +\end{exercise} + +\begin{exercise} +\label{cumulative} +\index{cumulative sum} + +Write a function called {\tt cumsum} that takes a list of numbers and +returns the cumulative sum; that is, a new list where the $i$th +element is the sum of the first $i+1$ elements from the original list. +For example: + +\begin{verbatim} +>>> t = [1, 2, 3] +>>> cumsum(t) +[1, 3, 6] +\end{verbatim} + +\end{exercise} + +\begin{exercise} + +Write a function called \verb"middle" that takes a list and +returns a new list that contains all but the first and last +elements. For example: + +\begin{verbatim} +>>> t = [1, 2, 3, 4] +>>> middle(t) +[2, 3] +\end{verbatim} + +\end{exercise} + +\begin{exercise} + +Write a function called \verb"chop" that takes a list, modifies it +by removing the first and last elements, and returns {\tt None}. +For example: + +\begin{verbatim} +>>> t = [1, 2, 3, 4] +>>> chop(t) +>>> t +[2, 3] +\end{verbatim} + +\end{exercise} + + +\begin{exercise} +Write a function called \verb"is_sorted" that takes a list as a +parameter and returns {\tt True} if the list is sorted in ascending +order and {\tt False} otherwise. For example: + +\begin{verbatim} +>>> is_sorted([1, 2, 2]) +True +>>> is_sorted(['b', 'a']) +False +\end{verbatim} + +\end{exercise} + + +\begin{exercise} +\label{anagram} +\index{anagram} + +Two words are anagrams if you can rearrange the letters from one +to spell the other. Write a function called \verb"is_anagram" +that takes two strings and returns {\tt True} if they are anagrams. +\end{exercise} + + + +\begin{exercise} +\label{duplicate} +\index{duplicate} +\index{uniqueness} + +Write a function called \verb"has_duplicates" that takes +a list and returns {\tt True} if there is any element that +appears more than once. It should not modify the original +list. + +\end{exercise} + + +\begin{exercise} + +This exercise pertains to the so-called Birthday Paradox, which you +can read about at \url{http://en.wikipedia.org/wiki/Birthday_paradox}. +\index{birthday paradox} + +If there are 23 students in your class, what are the chances +that two of you have the same birthday? You can estimate this +probability by generating random samples of 23 birthdays +and checking for matches. Hint: you can generate random birthdays +with the {\tt randint} function in the {\tt random} module. +\index{random module} +\index{module!random} +\index{randint function} +\index{function!randint} + +You can download my +solution from \url{http://thinkpython2.com/code/birthday.py}. + +\end{exercise} + + + +\begin{exercise} +\index{append method} +\index{method append} +\index{list!concatenation} +\index{concatenation!list} + +Write a function that reads the file {\tt words.txt} and builds +a list with one element per word. Write two versions of +this function, one using the {\tt append} method and the +other using the idiom {\tt t = t + [x]}. Which one takes +longer to run? Why? + +Solution: \url{http://thinkpython2.com/code/wordlist.py}. +\index{time module} +\index{module!time} + +\end{exercise} + + +\begin{exercise} +\label{wordlist1} +\label{bisection} +\index{membership!bisection search} +\index{bisection search} +\index{search, bisection} +\index{membership!binary search} +\index{binary search} +\index{search, binary} + +To check whether a word is in the word list, you could use +the {\tt in} operator, but it would be slow because it searches +through the words in order. + +Because the words are in alphabetical order, we can speed things up +with a bisection search (also known as binary search), which is +similar to what you do when you look a word up in the dictionary. You +start in the middle and check to see whether the word you are looking +for comes before the word in the middle of the list. If so, you +search the first half of the list the same way. Otherwise you search +the second half. + +Either way, you cut the remaining search space in half. If the +word list has 113,809 words, it will take about 17 steps to +find the word or conclude that it's not there. + +Write a function called \verb"in_bisect" that takes a sorted list +and a target value and returns the index of the value +in the list if it's there, or {\tt None} if it's not. +\index{bisect module} +\index{module!bisect} + +Or you could read the documentation of the {\tt bisect} module +and use that! Solution: \url{http://thinkpython2.com/code/inlist.py}. + +\end{exercise} + +\begin{exercise} +\index{reverse word pair} + +Two words are a ``reverse pair'' if each is the reverse of the +other. Write a program that finds all the reverse pairs in the +word list. Solution: \url{http://thinkpython2.com/code/reverse_pair.py}. + +\end{exercise} + +\begin{exercise} +\index{interlocking words} + +Two words ``interlock'' if taking alternating letters from each forms +a new word. For example, ``shoe'' and ``cold'' +interlock to form ``schooled''. +Solution: \url{http://thinkpython2.com/code/interlock.py}. +Credit: This exercise is inspired by an example at \url{http://puzzlers.org}. + +\begin{enumerate} + +\item Write a program that finds all pairs of words that interlock. + Hint: don't enumerate all pairs! + +\item Can you find any words that are three-way interlocked; that is, + every third letter forms a word, starting from the first, second or + third? + +\end{enumerate} +\end{exercise} + + +\chapter{Dictionaries} + +This chapter presents another built-in type called a dictionary. +Dictionaries are one of Python's best features; they are the +building blocks of many efficient and elegant algorithms. + + +\section{A dictionary is a mapping} + +\index{dictionary} +\index{dictionary} +\index{type!dict} +\index{key} +\index{key-value pair} +\index{index} +A {\bf dictionary} is like a list, but more general. In a list, +the indices have to be integers; in a dictionary they can +be (almost) any type. + +A dictionary contains a collection of indices, which are called {\bf + keys}, and a collection of values. Each key is associated with a +single value. The association of a key and a value is called a {\bf + key-value pair} or sometimes an {\bf item}. \index{item} + +In mathematical language, a dictionary represents a {\bf mapping} +from keys to values, so you can also say that each key +``maps to'' a value. +As an example, we'll build a dictionary that maps from English +to Spanish words, so the keys and the values are all strings. + +The function {\tt dict} creates a new dictionary with no items. +Because {\tt dict} is the name of a built-in function, you +should avoid using it as a variable name. +\index{dict function} +\index{function!dict} + +\begin{verbatim} +>>> eng2sp = dict() +>>> eng2sp +{} +\end{verbatim} + +The squiggly-brackets, \verb"{}", represent an empty dictionary. +To add items to the dictionary, you can use square brackets: +\index{squiggly bracket} +\index{bracket!squiggly} + +\begin{verbatim} +>>> eng2sp['one'] = 'uno' +\end{verbatim} +% +This line creates an item that maps from the key +\verb"'one'" to the value \verb"'uno'". If we print the +dictionary again, we see a key-value pair with a colon +between the key and value: + +\begin{verbatim} +>>> eng2sp +{'one': 'uno'} +\end{verbatim} +% +This output format is also an input format. For example, +you can create a new dictionary with three items: + +\begin{verbatim} +>>> eng2sp = {'one': 'uno', 'two': 'dos', 'three': 'tres'} +\end{verbatim} +% +But if you print {\tt eng2sp}, you might be surprised: + +\begin{verbatim} +>>> eng2sp +{'one': 'uno', 'three': 'tres', 'two': 'dos'} +\end{verbatim} +% +The order of the key-value pairs might not be the same. If +you type the same example on your computer, you might get a +different result. In general, the order of items in +a dictionary is unpredictable. + +But that's not a problem because +the elements of a dictionary are never indexed with integer indices. +Instead, you use the keys to look up the corresponding values: + +\begin{verbatim} +>>> eng2sp['two'] +'dos' +\end{verbatim} +% +The key \verb"'two'" always maps to the value \verb"'dos'" so the order +of the items doesn't matter. + +If the key isn't in the dictionary, you get an exception: +\index{exception!KeyError} +\index{KeyError} + +\begin{verbatim} +>>> eng2sp['four'] +KeyError: 'four' +\end{verbatim} +% +The {\tt len} function works on dictionaries; it returns the +number of key-value pairs: +\index{len function} +\index{function!len} + +\begin{verbatim} +>>> len(eng2sp) +3 +\end{verbatim} +% +The {\tt in} operator works on dictionaries, too; it tells you whether +something appears as a {\em key} in the dictionary (appearing +as a value is not good enough). +\index{membership!dictionary} +\index{in operator} +\index{operator!in} + +\begin{verbatim} +>>> 'one' in eng2sp +True +>>> 'uno' in eng2sp +False +\end{verbatim} +% +To see whether something appears as a value in a dictionary, you +can use the method {\tt values}, which returns a collection of +values, and then use the {\tt in} operator: +\index{values method} +\index{method!values} + +\begin{verbatim} +>>> vals = eng2sp.values() +>>> 'uno' in vals +True +\end{verbatim} +% +The {\tt in} operator uses different algorithms for lists and +dictionaries. For lists, it searches the elements of the list in +order, as in Section~\ref{find}. As the list gets longer, the search +time gets longer in direct proportion. + +For dictionaries, Python uses an +algorithm called a {\bf hashtable} that has a remarkable property: the +{\tt in} operator takes about the same amount of time no matter how +many items are in the dictionary. I explain how that's possible +in Section~\ref{hashtable}, but the explanation might not make +sense until you've read a few more chapters. + + +\section{Dictionary as a collection of counters} +\label{histogram} +\index{counter} + +Suppose you are given a string and you want to count how many +times each letter appears. There are several ways you could do it: + +\begin{enumerate} + +\item You could create 26 variables, one for each letter of the +alphabet. Then you could traverse the string and, for each +character, increment the corresponding counter, probably using +a chained conditional. + +\item You could create a list with 26 elements. Then you could +convert each character to a number (using the built-in function +{\tt ord}), use the number as an index into the list, and increment +the appropriate counter. + +\item You could create a dictionary with characters as keys +and counters as the corresponding values. The first time you +see a character, you would add an item to the dictionary. After +that you would increment the value of an existing item. + +\end{enumerate} + +Each of these options performs the same computation, but each +of them implements that computation in a different way. +\index{implementation} + +An {\bf implementation} is a way of performing a computation; +some implementations are better than others. For example, +an advantage of the dictionary implementation is that we don't +have to know ahead of time which letters appear in the string +and we only have to make room for the letters that do appear. + +Here is what the code might look like: + +\begin{verbatim} +def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] += 1 + return d +\end{verbatim} +% +The name of the function is {\tt histogram}, which is a statistical +term for a collection of counters (or frequencies). +\index{histogram} +\index{frequency} +\index{traversal} + +The first line of the +function creates an empty dictionary. The {\tt for} loop traverses +the string. Each time through the loop, if the character {\tt c} is +not in the dictionary, we create a new item with key {\tt c} and the +initial value 1 (since we have seen this letter once). If {\tt c} is +already in the dictionary we increment {\tt d[c]}. +\index{histogram} + +Here's how it works: + +\begin{verbatim} +>>> h = histogram('brontosaurus') +>>> h +{'a': 1, 'b': 1, 'o': 2, 'n': 1, 's': 2, 'r': 2, 'u': 2, 't': 1} +\end{verbatim} +% +The histogram indicates that the letters \verb"'a'" and \verb"'b'" +appear once; \verb"'o'" appears twice, and so on. + + +\index{get method} +\index{method!get} +Dictionaries have a method called {\tt get} that takes a key +and a default value. If the key appears in the dictionary, +{\tt get} returns the corresponding value; otherwise it returns +the default value. For example: + +\begin{verbatim} +>>> h = histogram('a') +>>> h +{'a': 1} +>>> h.get('a', 0) +1 +>>> h.get('b', 0) +0 +\end{verbatim} +% +As an exercise, use {\tt get} to write {\tt histogram} more concisely. You +should be able to eliminate the {\tt if} statement. + + +\section{Looping and dictionaries} +\index{dictionary!looping with} +\index{looping!with dictionaries} +\index{traversal} + +If you use a dictionary in a {\tt for} statement, it traverses +the keys of the dictionary. For example, \verb"print_hist" +prints each key and the corresponding value: + +\begin{verbatim} +def print_hist(h): + for c in h: + print(c, h[c]) +\end{verbatim} +% +Here's what the output looks like: + +\begin{verbatim} +>>> h = histogram('parrot') +>>> print_hist(h) +a 1 +p 1 +r 2 +t 1 +o 1 +\end{verbatim} +% +Again, the keys are in no particular order. To traverse the keys +in sorted order, you can use the built-in function {\tt sorted}: +\index{sorted!function} +\index{function!sorted} + +\begin{verbatim} +>>> for key in sorted(h): +... print(key, h[key]) +a 1 +o 1 +p 1 +r 2 +t 1 +\end{verbatim} + +%TODO: get this on Atlas + + +\section{Reverse lookup} +\label{raise} +\index{dictionary!lookup} +\index{dictionary!reverse lookup} +\index{lookup, dictionary} +\index{reverse lookup, dictionary} + +Given a dictionary {\tt d} and a key {\tt k}, it is easy to +find the corresponding value {\tt v = d[k]}. This operation +is called a {\bf lookup}. + +But what if you have {\tt v} and you want to find {\tt k}? +You have two problems: first, there might be more than one +key that maps to the value {\tt v}. Depending on the application, +you might be able to pick one, or you might have to make +a list that contains all of them. Second, there is no +simple syntax to do a {\bf reverse lookup}; you have to search. + +Here is a function that takes a value and returns the first +key that maps to that value: + +\begin{verbatim} +def reverse_lookup(d, v): + for k in d: + if d[k] == v: + return k + raise LookupError() +\end{verbatim} +% +This function is yet another example of the search pattern, but it +uses a feature we haven't seen before, {\tt raise}. The +{\bf raise statement} causes an exception; in this case it causes a +{\tt LookupError}, which is a built-in exception used to indicate +that a lookup operation failed. +\index{search} +\index{pattern!search} \index{raise statement} \index{statement!raise} +\index{exception!LookupError} \index{LookupError} + +If we get to the end of the loop, that means {\tt v} +doesn't appear in the dictionary as a value, so we raise an +exception. + +Here is an example of a successful reverse lookup: + +\begin{verbatim} +>>> h = histogram('parrot') +>>> key = reverse_lookup(h, 2) +>>> key +'r' +\end{verbatim} +% +And an unsuccessful one: + +\begin{verbatim} +>>> key = reverse_lookup(h, 3) +Traceback (most recent call last): + File "", line 1, in + File "", line 5, in reverse_lookup +LookupError +\end{verbatim} +% +The effect when you raise an exception is the same as when +Python raises one: it prints a traceback and an error message. +\index{traceback} +\index{optional argument} +\index{argument!optional} + +The {\tt raise} statement can take a detailed error message as an +optional argument. For example: + +\begin{verbatim} +>>> raise LookupError('value does not appear in the dictionary') +Traceback (most recent call last): + File "", line 1, in ? +LookupError: value does not appear in the dictionary +\end{verbatim} +% +A reverse lookup is much slower than a forward lookup; if you +have to do it often, or if the dictionary gets big, the performance +of your program will suffer. + + +\section{Dictionaries and lists} +\label{invert} + +Lists can appear as values in a dictionary. For example, if you +are given a dictionary that maps from letters to frequencies, you +might want to invert it; that is, create a dictionary that maps +from frequencies to letters. Since there might be several letters +with the same frequency, each value in the inverted dictionary +should be a list of letters. +\index{invert dictionary} +\index{dictionary!invert} + +Here is a function that inverts a dictionary: + +\begin{verbatim} +def invert_dict(d): + inverse = dict() + for key in d: + val = d[key] + if val not in inverse: + inverse[val] = [key] + else: + inverse[val].append(key) + return inverse +\end{verbatim} +% +Each time through the loop, {\tt key} gets a key from {\tt d} and +{\tt val} gets the corresponding value. If {\tt val} is not in {\tt + inverse}, that means we haven't seen it before, so we create a new +item and initialize it with a {\bf singleton} (a list that contains a +single element). Otherwise we have seen this value before, so we +append the corresponding key to the list. \index{singleton} + +Here is an example: + +\begin{verbatim} +>>> hist = histogram('parrot') +>>> hist +{'a': 1, 'p': 1, 'r': 2, 't': 1, 'o': 1} +>>> inverse = invert_dict(hist) +>>> inverse +{1: ['a', 'p', 't', 'o'], 2: ['r']} +\end{verbatim} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/dict1.pdf}} +\caption{State diagram.} +\label{fig.dict1} +\end{figure} + +Figure~\ref{fig.dict1} is a state diagram showing {\tt hist} and {\tt inverse}. +A dictionary is represented as a box with the type {\tt dict} above it +and the key-value pairs inside. If the values are integers, floats or +strings, I draw them inside the box, but I usually draw lists +outside the box, just to keep the diagram simple. +\index{state diagram} +\index{diagram!state} + +Lists can be values in a dictionary, as this example shows, but they +cannot be keys. Here's what happens if you try: +\index{TypeError} +\index{exception!TypeError} + + +\begin{verbatim} +>>> t = [1, 2, 3] +>>> d = dict() +>>> d[t] = 'oops' +Traceback (most recent call last): + File "", line 1, in ? +TypeError: list objects are unhashable +\end{verbatim} +% +I mentioned earlier that a dictionary is implemented using +a hashtable and that means that the keys have to be {\bf hashable}. +\index{hash function} +\index{hashable} + +A {\bf hash} is a function that takes a value (of any kind) +and returns an integer. Dictionaries use these integers, +called hash values, to store and look up key-value pairs. +\index{immutability} + +This system works fine if the keys are immutable. But if the +keys are mutable, like lists, bad things happen. For example, +when you create a key-value pair, Python hashes the key and +stores it in the corresponding location. If you modify the +key and then hash it again, it would go to a different location. +In that case you might have two entries for the same key, +or you might not be able to find a key. Either way, the +dictionary wouldn't work correctly. + +That's why keys have to be hashable, and why mutable types like +lists aren't. The simplest way to get around this limitation is to +use tuples, which we will see in the next chapter. + +Since dictionaries are mutable, they can't be used as keys, +but they {\em can} be used as values. + + +\section{Memos} +\label{memoize} + +If you played with the {\tt fibonacci} function from +Section~\ref{one.more.example}, you might have noticed that the bigger +the argument you provide, the longer the function takes to run. +Furthermore, the run time increases quickly. +\index{fibonacci function} +\index{function!fibonacci} + +To understand why, consider Figure~\ref{fig.fibonacci}, which shows +the {\bf call graph} for {\tt fibonacci} with {\tt n=4}: + +\begin{figure} +\centerline +{\includegraphics[scale=0.7]{figs/fibonacci.pdf}} +\caption{Call graph.} +\label{fig.fibonacci} +\end{figure} + +A call graph shows a set of function frames, with lines connecting each +frame to the frames of the functions it calls. At the top of the +graph, {\tt fibonacci} with {\tt n=4} calls {\tt fibonacci} with {\tt +n=3} and {\tt n=2}. In turn, {\tt fibonacci} with {\tt n=3} calls +{\tt fibonacci} with {\tt n=2} and {\tt n=1}. And so on. +\index{function frame} +\index{frame} +\index{call graph} + +Count how many times {\tt fibonacci(0)} and {\tt fibonacci(1)} are +called. This is an inefficient solution to the problem, and it gets +worse as the argument gets bigger. +\index{memo} + +One solution is to keep track of values that have already been +computed by storing them in a dictionary. A previously computed value +that is stored for later use is called a {\bf memo}. Here is a +``memoized'' version of {\tt fibonacci}: + +\begin{verbatim} +known = {0:0, 1:1} + +def fibonacci(n): + if n in known: + return known[n] + + res = fibonacci(n-1) + fibonacci(n-2) + known[n] = res + return res +\end{verbatim} +% +{\tt known} is a dictionary that keeps track of the Fibonacci +numbers we already know. It starts with +two items: 0 maps to 0 and 1 maps to 1. + +Whenever {\tt fibonacci} is called, it checks {\tt known}. +If the result is already there, it can return +immediately. Otherwise it has to +compute the new value, add it to the dictionary, and return it. + +If you run this version of {\tt fibonacci} and compare it with +the original, you will find that it is much faster. + + + +\section{Global variables} +\index{global variable} +\index{variable!global} + +In the previous example, {\tt known} is created outside the function, +so it belongs to the special frame called \verb"__main__". +Variables in \verb"__main__" are sometimes called {\bf global} +because they can be accessed from any function. Unlike local +variables, which disappear when their function ends, global variables +persist from one function call to the next. +\index{flag} +\index{main} + +It is common to use global variables for {\bf flags}; that is, +boolean variables that indicate (``flag'') whether a condition +is true. For example, some programs use +a flag named {\tt verbose} to control the level of detail in the +output: + +\begin{verbatim} +verbose = True + +def example1(): + if verbose: + print('Running example1') +\end{verbatim} +% +If you try to reassign a global variable, you might be surprised. +The following example is supposed to keep track of whether the +function has been called: +\index{reassignment} + +\begin{verbatim} +been_called = False + +def example2(): + been_called = True # WRONG +\end{verbatim} +% +But if you run it you will see that the value of \verb"been_called" +doesn't change. The problem is that {\tt example2} creates a new local +variable named \verb"been_called". The local variable goes away when +the function ends, and has no effect on the global variable. +\index{global statement} +\index{statement!global} +\index{declaration} + +To reassign a global variable inside a function you have to +{\bf declare} the global variable before you use it: + +\begin{verbatim} +been_called = False + +def example2(): + global been_called + been_called = True +\end{verbatim} +% +The {\bf global statement} tells the interpreter +something like, ``In this function, when I say \verb"been_called", I +mean the global variable; don't create a local one.'' +\index{update!global variable} +\index{global variable!update} + +Here's an example that tries to update a global variable: + +\begin{verbatim} +count = 0 + +def example3(): + count = count + 1 # WRONG +\end{verbatim} +% +If you run it you get: +\index{UnboundLocalError} +\index{exception!UnboundLocalError} + +\begin{verbatim} +UnboundLocalError: local variable 'count' referenced before assignment +\end{verbatim} +% +Python assumes that {\tt count} is local, and under that assumption +you are reading it before writing it. The solution, again, +is to declare {\tt count} global. +\index{counter} + +\begin{verbatim} +def example3(): + global count + count += 1 +\end{verbatim} +% +If a global variable refers to a mutable value, you can modify +the value without declaring the variable: +\index{mutability} + +\begin{verbatim} +known = {0:0, 1:1} + +def example4(): + known[2] = 1 +\end{verbatim} +% +So you can add, remove and replace elements of a global list or +dictionary, but if you want to reassign the variable, you +have to declare it: + +\begin{verbatim} +def example5(): + global known + known = dict() +\end{verbatim} +% +Global variables can be useful, but if you have a lot of them, +and you modify them frequently, they can make programs +hard to debug. + + +\section{디버깅} +%Debugging +\index{debugging} + +As you work with bigger datasets it can become unwieldy to +debug by printing and checking the output by hand. Here are some +suggestions for debugging large datasets: + +\begin{description} + +\item[Scale down the input:] If possible, reduce the size of the +dataset. For example if the program reads a text file, start with +just the first 10 lines, or with the smallest example you can find. +You can either edit the files themselves, or (better) modify the +program so it reads only the first {\tt n} lines. + +If there is an error, you can reduce {\tt n} to the smallest +value that manifests the error, and then increase it gradually +as you find and correct errors. + +\item[Check summaries and types:] Instead of printing and checking the +entire dataset, consider printing summaries of the data: for example, +the number of items in a dictionary or the total of a list of numbers. + +A common cause of runtime errors is a value that is not the right +type. For debugging this kind of error, it is often enough to print +the type of a value. + +\item[Write self-checks:] Sometimes you can write code to check +for errors automatically. For example, if you are computing the +average of a list of numbers, you could check that the result is +not greater than the largest element in the list or less than +the smallest. This is called a ``sanity check'' because it detects +results that are ``insane''. +\index{sanity check} +\index{consistency check} + +Another kind of check compares the results of two different +computations to see if they are consistent. This is called a +``consistency check''. + +\item[Format the output:] Formatting debugging output +can make it easier to spot an error. We saw an example in +Section~\ref{factdebug}. Another tool you might find useful is the {\tt pprint} module, which provides +a {\tt pprint} function that displays built-in types in +a more human-readable format ({\tt pprint} stands for +``pretty print''). +\index{pretty print} +\index{pprint module} +\index{module!pprint} + +\end{description} + +Again, time you spend building scaffolding can reduce +the time you spend debugging. +\index{scaffolding} + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[mapping:] A relationship in which each element of one set +corresponds to an element of another set. +\index{mapping} + +\item[dictionary:] A mapping from keys to their +corresponding values. +\index{dictionary} + +\item[key-value pair:] The representation of the mapping from +a key to a value. +\index{key-value pair} + +\item[item:] In a dictionary, another name for a key-value + pair. +\index{item!dictionary} + +\item[key:] An object that appears in a dictionary as the +first part of a key-value pair. +\index{key} + +\item[value:] An object that appears in a dictionary as the +second part of a key-value pair. This is more specific than +our previous use of the word ``value''. +\index{value} + +\item[implementation:] A way of performing a computation. +\index{implementation} + +\item[hashtable:] The algorithm used to implement Python +dictionaries. +\index{hashtable} + +\item[hash function:] A function used by a hashtable to compute the +location for a key. +\index{hash function} + +\item[hashable:] A type that has a hash function. Immutable +types like integers, +floats and strings are hashable; mutable types like lists and +dictionaries are not. +\index{hashable} + +\item[lookup:] A dictionary operation that takes a key and finds +the corresponding value. +\index{lookup} + +\item[reverse lookup:] A dictionary operation that takes a value and finds +one or more keys that map to it. +\index{reverse lookup} + +\item[raise statement:] A statement that (deliberately) raises an exception. +\index{raise statement} +\index{statement!raise} + +\item[singleton:] A list (or other sequence) with a single element. +\index{singleton} + +\item[call graph:] A diagram that shows every frame created during +the execution of a program, with an arrow from each caller to +each callee. +\index{call graph} +\index{diagram!call graph} + +\item[memo:] A computed value stored to avoid unnecessary future +computation. +\index{memo} + +\item[global variable:] A variable defined outside a function. Global +variables can be accessed from any function. +\index{global variable} + +\item[global statement:] A statement that declares a variable name +global. +\index{global statement} +\index{statement!global} + +\item[flag:] A boolean variable used to indicate whether a condition +is true. +\index{flag} + +\item[declaration:] A statement like {\tt global} that tells the +interpreter something about a variable. +\index{declaration} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +\label{wordlist2} +\index{set membership} +\index{membership!set} + +Write a function that reads the words in {\tt words.txt} and +stores them as keys in a dictionary. It doesn't matter what the +values are. Then you can use the {\tt in} operator +as a fast way to check whether a string is in +the dictionary. + +If you did Exercise~\ref{wordlist1}, you can compare the speed +of this implementation with the list {\tt in} operator and the +bisection search. + +\end{exercise} + + +\begin{exercise} +\label{setdefault} + +Read the documentation of the dictionary method {\tt setdefault} +and use it to write a more concise version of \verb"invert_dict". +Solution: \url{http://thinkpython2.com/code/invert_dict.py}. +\index{setdefault method} +\index{method!setdefault} + +\end{exercise} + + +\begin{exercise} +Memoize the Ackermann function from Exercise~\ref{ackermann} and see if +memoization makes it possible to evaluate the function with bigger +arguments. Hint: no. +Solution: \url{http://thinkpython2.com/code/ackermann_memo.py}. +\index{Ackermann function} +\index{function!ack} + +\end{exercise} + + + +\begin{exercise} +\index{duplicate} + +If you did Exercise~\ref{duplicate}, you already have +a function named \verb"has_duplicates" that takes a list +as a parameter and returns {\tt True} if there is any object +that appears more than once in the list. + +Use a dictionary to write a faster, simpler version of +\verb"has_duplicates". +Solution: \url{http://thinkpython2.com/code/has_duplicates.py}. + +\end{exercise} + + +\begin{exercise} +\label{exrotatepairs} +\index{letter rotation} +\index{rotation!letters} + +Two words are ``rotate pairs'' if you can rotate one of them +and get the other (see \verb"rotate_word" in Exercise~\ref{exrotate}). + +Write a program that reads a wordlist and finds all the rotate +pairs. Solution: \url{http://thinkpython2.com/code/rotate_pairs.py}. + +\end{exercise} + + +\begin{exercise} +\index{Car Talk} +\index{Puzzler} + +Here's another Puzzler from {\em Car Talk} +(\url{http://www.cartalk.com/content/puzzlers}): + +\begin{quote} +This was sent in by a fellow named Dan O'Leary. He came upon a common +one-syllable, five-letter word recently that has the following unique +property. When you remove the first letter, the remaining letters form +a homophone of the original word, that is a word that sounds exactly +the same. Replace the first letter, that is, put it back and remove +the second letter and the result is yet another homophone of the +original word. And the question is, what's the word? + +Now I'm going to give you an example that doesn't work. Let's look at +the five-letter word, `wrack.' W-R-A-C-K, you know like to `wrack with +pain.' If I remove the first letter, I am left with a four-letter +word, 'R-A-C-K.' As in, `Holy cow, did you see the rack on that buck! +It must have been a nine-pointer!' It's a perfect homophone. If you +put the `w' back, and remove the `r,' instead, you're left with the +word, `wack,' which is a real word, it's just not a homophone of the +other two words. + +But there is, however, at least one word that Dan and we know of, +which will yield two homophones if you remove either of the first two +letters to make two, new four-letter words. The question is, what's +the word? +\end{quote} +\index{homophone} +\index{reducible word} +\index{word, reducible} + +You can use the dictionary from Exercise~\ref{wordlist2} to check +whether a string is in the word list. + +To check whether two words are homophones, you can use the CMU +Pronouncing Dictionary. You can download it from +\url{http://www.speech.cs.cmu.edu/cgi-bin/cmudict} or from +\url{http://thinkpython2.com/code/c06d} and you can also download +\url{http://thinkpython2.com/code/pronounce.py}, which provides a function +named \verb"read_dictionary" that reads the pronouncing dictionary and +returns a Python dictionary that maps from each word to a string that +describes its primary pronunciation. + +Write a program that lists all the words that solve the Puzzler. +Solution: \url{http://thinkpython2.com/code/homophone.py}. + +\end{exercise} + + + +\chapter{Tuples} +\label{tuplechap} + +This chapter presents one more built-in type, the tuple, and then +shows how lists, dictionaries, and tuples work together. +I also present a useful feature for variable-length argument lists, +the gather and scatter operators. + +One note: there is no consensus on how to pronounce ``tuple''. +Some people say ``tuh-ple'', which rhymes with ``supple''. But +in the context of programming, most people say ``too-ple'', which +rhymes with ``quadruple''. + + +\section{Tuples are immutable} +\index{tuple} +\index{type!tuple} +\index{sequence} + +A tuple is a sequence of values. The values can be any type, and +they are indexed by integers, so in that respect tuples are a lot +like lists. The important difference is that tuples are immutable. +\index{mutability} +\index{immutability} + +Syntactically, a tuple is a comma-separated list of values: + +\begin{verbatim} +>>> t = 'a', 'b', 'c', 'd', 'e' +\end{verbatim} +% +Although it is not necessary, it is common to enclose tuples in +parentheses: +\index{parentheses!tuples in} + +\begin{verbatim} +>>> t = ('a', 'b', 'c', 'd', 'e') +\end{verbatim} +% +To create a tuple with a single element, you have to include a final +comma: +\index{singleton} +\index{tuple!singleton} + +\begin{verbatim} +>>> t1 = 'a', +>>> type(t1) + +\end{verbatim} +% +A value in parentheses is not a tuple: + +\begin{verbatim} +>>> t2 = ('a') +>>> type(t2) + +\end{verbatim} +% +Another way to create a tuple is the built-in function {\tt tuple}. +With no argument, it creates an empty tuple: +\index{tuple function} +\index{function!tuple} + +\begin{verbatim} +>>> t = tuple() +>>> t +() +\end{verbatim} +% +If the argument is a sequence (string, list or tuple), the result +is a tuple with the elements of the sequence: + +\begin{verbatim} +>>> t = tuple('lupins') +>>> t +('l', 'u', 'p', 'i', 'n', 's') +\end{verbatim} +% +Because {\tt tuple} is the name of a built-in function, you should +avoid using it as a variable name. + +Most list operators also work on tuples. The bracket operator +indexes an element: +\index{bracket operator} +\index{operator!bracket} + +\begin{verbatim} +>>> t = ('a', 'b', 'c', 'd', 'e') +>>> t[0] +'a' +\end{verbatim} +% +And the slice operator selects a range of elements. +\index{slice operator} +\index{operator!slice} +\index{tuple!slice} +\index{slice!tuple} + +\begin{verbatim} +>>> t[1:3] +('b', 'c') +\end{verbatim} +% +But if you try to modify one of the elements of the tuple, you get +an error: +\index{exception!TypeError} +\index{TypeError} +\index{item assignment} +\index{assignment!item} + +\begin{verbatim} +>>> t[0] = 'A' +TypeError: object doesn't support item assignment +\end{verbatim} +% +Because tuples are immutable, you can't modify the elements. But you +can replace one tuple with another: + +\begin{verbatim} +>>> t = ('A',) + t[1:] +>>> t +('A', 'b', 'c', 'd', 'e') +\end{verbatim} +% +This statement makes a new tuple and then makes {\tt t} refer to it. + +The relational operators work with tuples and other sequences; +Python starts by comparing the first element from each +sequence. If they are equal, it goes on to the next elements, +and so on, until it finds elements that differ. Subsequent +elements are not considered (even if they are really big). +\index{comparison!tuple} +\index{tuple!comparison} + +\begin{verbatim} +>>> (0, 1, 2) < (0, 3, 4) +True +>>> (0, 1, 2000000) < (0, 3, 4) +True +\end{verbatim} + + + +\section{Tuple assignment} +\label{tuple.assignment} +\index{tuple!assignment} +\index{assignment!tuple} +\index{swap pattern} +\index{pattern!swap} + +It is often useful to swap the values of two variables. +With conventional assignments, you have to use a temporary +variable. For example, to swap {\tt a} and {\tt b}: + +\begin{verbatim} +>>> temp = a +>>> a = b +>>> b = temp +\end{verbatim} +% +This solution is cumbersome; {\bf tuple assignment} is more elegant: + +\begin{verbatim} +>>> a, b = b, a +\end{verbatim} +% +The left side is a tuple of variables; the right side is a tuple of +expressions. Each value is assigned to its respective variable. +All the expressions on the right side are evaluated before any +of the assignments. + +The number of variables on the left and the number of +values on the right have to be the same: +\index{exception!ValueError} +\index{ValueError} + +\begin{verbatim} +>>> a, b = 1, 2, 3 +ValueError: too many values to unpack +\end{verbatim} +% +More generally, the right side can be any kind of sequence +(string, list or tuple). For example, to split an email address +into a user name and a domain, you could write: +\index{split method} +\index{method!split} +\index{email address} + +\begin{verbatim} +>>> addr = 'monty@python.org' +>>> uname, domain = addr.split('@') +\end{verbatim} +% +The return value from {\tt split} is a list with two elements; +the first element is assigned to {\tt uname}, the second to +{\tt domain}. + +\begin{verbatim} +>>> uname +'monty' +>>> domain +'python.org' +\end{verbatim} +% + +\section{Tuples as return values} +\index{tuple} +\index{value!tuple} +\index{return value!tuple} +\index{function, tuple as return value} + +Strictly speaking, a function can only return one value, but +if the value is a tuple, the effect is the same as returning +multiple values. For example, if you want to divide two integers +and compute the quotient and remainder, it is inefficient to +compute {\tt x/y} and then {\tt x\%y}. It is better to compute +them both at the same time. +\index{divmod} + +The built-in function {\tt divmod} takes two arguments and +returns a tuple of two values, the quotient and remainder. +You can store the result as a tuple: + +\begin{verbatim} +>>> t = divmod(7, 3) +>>> t +(2, 1) +\end{verbatim} +% +Or use tuple assignment to store the elements separately: +\index{tuple assignment} +\index{assignment!tuple} + +\begin{verbatim} +>>> quot, rem = divmod(7, 3) +>>> quot +2 +>>> rem +1 +\end{verbatim} +% +Here is an example of a function that returns a tuple: + +\begin{verbatim} +def min_max(t): + return min(t), max(t) +\end{verbatim} +% +{\tt max} and {\tt min} are built-in functions that find +the largest and smallest elements of a sequence. \verb"min_max" +computes both and returns a tuple of two values. +\index{max function} +\index{function!max} +\index{min function} +\index{function!min} + + +\section{Variable-length argument tuples} +\label{gather} +\index{variable-length argument tuple} +\index{argument!variable-length tuple} +\index{gather} +\index{parameter!gather} +\index{argument!gather} + +Functions can take a variable number of arguments. A parameter +name that begins with {\tt *} {\bf gathers} arguments into +a tuple. For example, {\tt printall} +takes any number of arguments and prints them: + +\begin{verbatim} +def printall(*args): + print(args) +\end{verbatim} +% +The gather parameter can have any name you like, but {\tt args} is +conventional. Here's how the function works: + +\begin{verbatim} +>>> printall(1, 2.0, '3') +(1, 2.0, '3') +\end{verbatim} +% +The complement of gather is {\bf scatter}. If you have a +sequence of values and you want to pass it to a function +as multiple arguments, you can use the {\tt *} operator. +For example, {\tt divmod} takes exactly two arguments; it +doesn't work with a tuple: +\index{scatter} +\index{argument scatter} +\index{TypeError} +\index{exception!TypeError} + +\begin{verbatim} +>>> t = (7, 3) +>>> divmod(t) +TypeError: divmod expected 2 arguments, got 1 +\end{verbatim} +% +But if you scatter the tuple, it works: + +\begin{verbatim} +>>> divmod(*t) +(2, 1) +\end{verbatim} +% +Many of the built-in functions use +variable-length argument tuples. For example, {\tt max} +and {\tt min} can take any number of arguments: +\index{max function} +\index{function!max} +\index{min function} +\index{function!min} + +\begin{verbatim} +>>> max(1, 2, 3) +3 +\end{verbatim} +% +But {\tt sum} does not. +\index{sum function} +\index{function!sum} + +\begin{verbatim} +>>> sum(1, 2, 3) +TypeError: sum expected at most 2 arguments, got 3 +\end{verbatim} +% +As an exercise, write a function called {\tt sumall} that takes any number +of arguments and returns their sum. + + +\section{Lists and tuples} +\index{zip function} +\index{function!zip} + +{\tt zip} is a built-in function that takes two or more sequences and +returns a list of tuples where each tuple contains one +element from each sequence. The name of the function refers to +a zipper, which joins and interleaves two rows of teeth. + +This example zips a string and a list: + +\begin{verbatim} +>>> s = 'abc' +>>> t = [0, 1, 2] +>>> zip(s, t) + +\end{verbatim} +% +The result is a {\bf zip object} that knows how to iterate through +the pairs. The most common use of {\tt zip} is in a {\tt for} loop: + +\begin{verbatim} +>>> for pair in zip(s, t): +... print(pair) +... +('a', 0) +('b', 1) +('c', 2) +\end{verbatim} +% +A zip object is a kind of {\bf iterator}, which is any object +that iterates through a sequence. Iterators are similar to lists in some +ways, but unlike lists, you can't use an index to select an element from +an iterator. +\index{iterator} + +If you want to use list operators and methods, you can +use a zip object to make a list: + +\begin{verbatim} +>>> list(zip(s, t)) +[('a', 0), ('b', 1), ('c', 2)] +\end{verbatim} +% +The result is a list of tuples; in this example, each tuple contains +a character from the string and the corresponding element from +the list. +\index{list!of tuples} + +If the sequences are not the same length, the result has the +length of the shorter one. + +\begin{verbatim} +>>> list(zip('Anne', 'Elk')) +[('A', 'E'), ('n', 'l'), ('n', 'k')] +\end{verbatim} +% +You can use tuple assignment in a {\tt for} loop to traverse a list of +tuples: +\index{traversal} +\index{tuple assignment} +\index{assignment!tuple} + +\begin{verbatim} +t = [('a', 0), ('b', 1), ('c', 2)] +for letter, number in t: + print(number, letter) +\end{verbatim} +% +Each time through the loop, Python selects the next tuple in +the list and assigns the elements to {\tt letter} and +{\tt number}. The output of this loop is: +\index{loop} + +\begin{verbatim} +0 a +1 b +2 c +\end{verbatim} +% +If you combine {\tt zip}, {\tt for} and tuple assignment, you get a +useful idiom for traversing two (or more) sequences at the same +time. For example, \verb"has_match" takes two sequences, {\tt t1} and +{\tt t2}, and returns {\tt True} if there is an index {\tt i} +such that {\tt t1[i] == t2[i]}: +\index{for loop} + +\begin{verbatim} +def has_match(t1, t2): + for x, y in zip(t1, t2): + if x == y: + return True + return False +\end{verbatim} +% +If you need to traverse the elements of a sequence and their +indices, you can use the built-in function {\tt enumerate}: +\index{traversal} +\index{enumerate function} +\index{function!enumerate} + +\begin{verbatim} +for index, element in enumerate('abc'): + print(index, element) +\end{verbatim} +% +The result from {\tt enumerate} is an enumerate object, which +iterates a sequence of pairs; each pair contains an index (starting +from 0) and an element from the given sequence. +In this example, the output is + +\begin{verbatim} +0 a +1 b +2 c +\end{verbatim} +% +Again. +\index{iterator} +\index{object!enumerate} +\index{enumerate object} + + +\section{Dictionaries and tuples} +\label{dictuple} +\index{dictionary} +\index{items method} +\index{method!items} +\index{key-value pair} + +Dictionaries have a method called {\tt items} that returns a sequence of +tuples, where each tuple is a key-value pair. + +\begin{verbatim} +>>> d = {'a':0, 'b':1, 'c':2} +>>> t = d.items() +>>> t +dict_items([('c', 2), ('a', 0), ('b', 1)]) +\end{verbatim} +% +The result is a \verb"dict_items" object, which is an iterator that +iterates the key-value pairs. You can use it in a {\tt for} loop +like this: +\index{iterator} + +\begin{verbatim} +>>> for key, value in d.items(): +... print(key, value) +... +c 2 +a 0 +b 1 +\end{verbatim} +% +As you should expect from a dictionary, the items are in no +particular order. + +Going in the other direction, you can use a list of tuples to +initialize a new dictionary: \index{dictionary!initialize} + +\begin{verbatim} +>>> t = [('a', 0), ('c', 2), ('b', 1)] +>>> d = dict(t) +>>> d +{'a': 0, 'c': 2, 'b': 1} +\end{verbatim} + +Combining {\tt dict} with {\tt zip} yields a concise way +to create a dictionary: +\index{zip function!use with dict} + +\begin{verbatim} +>>> d = dict(zip('abc', range(3))) +>>> d +{'a': 0, 'c': 2, 'b': 1} +\end{verbatim} +% +The dictionary method {\tt update} also takes a list of tuples +and adds them, as key-value pairs, to an existing dictionary. +\index{update method} +\index{method!update} +\index{traverse!dictionary} +\index{dictionary!traversal} + +It is common to use tuples as keys in dictionaries (primarily because +you can't use lists). For example, a telephone directory might map +from last-name, first-name pairs to telephone numbers. Assuming +that we have defined {\tt last}, {\tt first} and {\tt number}, we +could write: +\index{tuple!as key in dictionary} +\index{hashable} + +\begin{verbatim} +directory[last, first] = number +\end{verbatim} +% +The expression in brackets is a tuple. We could use tuple +assignment to traverse this dictionary. +\index{tuple!in brackets} + +\begin{verbatim} +for last, first in directory: + print(first, last, directory[last,first]) +\end{verbatim} +% +This loop traverses the keys in {\tt directory}, which are tuples. It +assigns the elements of each tuple to {\tt last} and {\tt first}, then +prints the name and corresponding telephone number. + +There are two ways to represent tuples in a state diagram. The more +detailed version shows the indices and elements just as they appear in +a list. For example, the tuple \verb"('Cleese', 'John')" would appear +as in Figure~\ref{fig.tuple1}. +\index{state diagram} +\index{diagram!state} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/tuple1.pdf}} +\caption{State diagram.} +\label{fig.tuple1} +\end{figure} + +But in a larger diagram you might want to leave out the +details. For example, a diagram of the telephone directory might +appear as in Figure~\ref{fig.dict2}. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/dict2.pdf}} +\caption{State diagram.} +\label{fig.dict2} +\end{figure} + +Here the tuples are shown using Python syntax as a graphical +shorthand. The telephone number in the diagram is the complaints line +for the BBC, so please don't call it. + + +\section{Sequences of sequences} +\index{sequence} + +I have focused on lists of tuples, but almost all of the examples in +this chapter also work with lists of lists, tuples of tuples, and +tuples of lists. To avoid enumerating the possible combinations, it +is sometimes easier to talk about sequences of sequences. + +In many contexts, the different kinds of sequences (strings, lists and +tuples) can be used interchangeably. So how should you choose one +over the others? +\index{string} +\index{list} +\index{tuple} +\index{mutability} +\index{immutability} + +To start with the obvious, strings are more limited than other +sequences because the elements have to be characters. They are +also immutable. If you need the ability to change the characters +in a string (as opposed to creating a new string), you might +want to use a list of characters instead. + +Lists are more common than tuples, mostly because they are mutable. +But there are a few cases where you might prefer tuples: + +\begin{enumerate} + +\item In some contexts, like a {\tt return} statement, it is +syntactically simpler to create a tuple than a list. + +\item If you want to use a sequence as a dictionary key, you +have to use an immutable type like a tuple or string. + +\item If you are passing a sequence as an argument to a function, +using tuples reduces the potential for unexpected behavior +due to aliasing. + +\end{enumerate} + +Because tuples are immutable, they don't provide methods like {\tt + sort} and {\tt reverse}, which modify existing lists. But Python +provides the built-in function {\tt sorted}, which takes any sequence +and returns a new list with the same elements in sorted order, and +{\tt reversed}, which takes a sequence and returns an iterator that +traverses the list in reverse order. +\index{sorted function} +\index{function!sorted} \index{reversed function} +\index{function!reversed} +\index{iterator} + + +\section{디버깅} +%Debugging +\index{debugging} +\index{data structure} +\index{shape error} +\index{error!shape} + +Lists, dictionaries and tuples are examples of {\bf data + structures}; in this chapter we are starting to see compound data +structures, like lists of tuples, or dictionaries that contain tuples +as keys and lists as values. Compound data structures are useful, but +they are prone to what I call {\bf shape errors}; that is, errors +caused when a data structure has the wrong type, size, or structure. +For example, if you are expecting a list with one integer and I +give you a plain old integer (not in a list), it won't work. +\index{structshape module} +\index{module!structshape} + +To help debug these kinds of errors, I have written a module +called {\tt structshape} that provides a function, also called +{\tt structshape}, that takes any kind of data structure as +an argument and returns a string that summarizes its shape. +You can download it from \url{http://thinkpython2.com/code/structshape.py} + +Here's the result for a simple list: + +\begin{verbatim} +>>> from structshape import structshape +>>> t = [1, 2, 3] +>>> structshape(t) +'list of 3 int' +\end{verbatim} +% +A fancier program might write ``list of 3 int{\em s}'', but it +was easier not to deal with plurals. Here's a list of lists: + +\begin{verbatim} +>>> t2 = [[1,2], [3,4], [5,6]] +>>> structshape(t2) +'list of 3 list of 2 int' +\end{verbatim} +% +If the elements of the list are not the same type, +{\tt structshape} groups them, in order, by type: + +\begin{verbatim} +>>> t3 = [1, 2, 3, 4.0, '5', '6', [7], [8], 9] +>>> structshape(t3) +'list of (3 int, float, 2 str, 2 list of int, int)' +\end{verbatim} +% +Here's a list of tuples: + +\begin{verbatim} +>>> s = 'abc' +>>> lt = list(zip(t, s)) +>>> structshape(lt) +'list of 3 tuple of (int, str)' +\end{verbatim} +% +And here's a dictionary with 3 items that map integers to strings. + +\begin{verbatim} +>>> d = dict(lt) +>>> structshape(d) +'dict of 3 int->str' +\end{verbatim} +% +If you are having trouble keeping track of your data structures, +{\tt structshape} can help. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[tuple:] An immutable sequence of elements. +\index{tuple} + +\item[tuple assignment:] An assignment with a sequence on the +right side and a tuple of variables on the left. The right +side is evaluated and then its elements are assigned to the +variables on the left. +\index{tuple assignment} +\index{assignment!tuple} + +\item[gather:] The operation of assembling a variable-length +argument tuple. +\index{gather} + +\item[scatter:] The operation of treating a sequence as a list of +arguments. +\index{scatter} + +\item[zip object:] The result of calling a built-in function {\tt zip}; +an object that iterates through a sequence of tuples. +\index{zip object} +\index{object!zip} + +\item[iterator:] An object that can iterate through a sequence, but +which does not provide list operators and methods. +\index{iterator} + +\item[data structure:] A collection of related values, often +organized in lists, dictionaries, tuples, etc. +\index{data structure} + +\item[shape error:] An error caused because a value has the +wrong shape; that is, the wrong type or size. +\index{shape} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +Write a function called \verb"most_frequent" that takes a string and +prints the letters in decreasing order of frequency. Find text +samples from several different languages and see how letter frequency +varies between languages. Compare your results with the tables at +\url{http://en.wikipedia.org/wiki/Letter_frequencies}. Solution: +\url{http://thinkpython2.com/code/most_frequent.py}. \index{letter + frequency} \index{frequency!letter} + +\end{exercise} + + +\begin{exercise} +\label{anagrams} +\index{anagram set} +\index{set!anagram} + +More anagrams! + +\begin{enumerate} + +\item Write a program +that reads a word list from a file (see Section~\ref{wordlist}) and +prints all the sets of words that are anagrams. + +Here is an example of what the output might look like: + +\begin{verbatim} +['deltas', 'desalt', 'lasted', 'salted', 'slated', 'staled'] +['retainers', 'ternaries'] +['generating', 'greatening'] +['resmelts', 'smelters', 'termless'] +\end{verbatim} +% +Hint: you might want to build a dictionary that maps from a +collection of letters to a list of words that can be spelled with those +letters. The question is, how can you represent the collection of +letters in a way that can be used as a key? + +\item Modify the previous program so that it prints the longest list +of anagrams first, followed by the second longest, and so on. +\index{Scrabble} +\index{bingo} + +\item In Scrabble a ``bingo'' is when you play all seven tiles in +your rack, along with a letter on the board, to form an eight-letter +word. What collection of 8 letters forms the most possible bingos? +Hint: there are seven. + +% (7, ['angriest', 'astringe', 'ganister', 'gantries', 'granites', +% 'ingrates', 'rangiest']) + +Solution: \url{http://thinkpython2.com/code/anagram_sets.py}. + +\end{enumerate} +\end{exercise} + +\begin{exercise} +\index{metathesis} + +Two words form a ``metathesis pair'' if you can transform one into the +other by swapping two letters; for example, ``converse'' and +``conserve''. Write a program that finds all of the metathesis pairs +in the dictionary. Hint: don't test all pairs of words, and don't +test all possible swaps. Solution: +\url{http://thinkpython2.com/code/metathesis.py}. Credit: This +exercise is inspired by an example at \url{http://puzzlers.org}. + +\end{exercise} + + +\begin{exercise} +\index{Car Talk} +\index{Puzzler} + +Here's another Car Talk Puzzler +(\url{http://www.cartalk.com/content/puzzlers}): + +\begin{quote} +What is the longest English word, that remains a valid English word, +as you remove its letters one at a time? + +Now, letters can be removed from either end, or the middle, but you +can't rearrange any of the letters. Every time you drop a letter, you +wind up with another English word. If you do that, you're eventually +going to wind up with one letter and that too is going to be an +English word---one that's found in the dictionary. I want to know +what's the longest word and how many letters does it +have? + +I'm going to give you a little modest example: Sprite. Ok? You start +off with sprite, you take a letter off, one from the interior of the +word, take the r away, and we're left with the word spite, then we +take the e off the end, we're left with spit, we take the s off, we're +left with pit, it, and I. +\end{quote} +\index{reducible word} +\index{word, reducible} + +Write a program to find all words that can be reduced in this way, +and then find the longest one. + +This exercise is a little more challenging than most, so here are +some suggestions: + +\begin{enumerate} + +\item You might want to write a function that takes a word and + computes a list of all the words that can be formed by removing one + letter. These are the ``children'' of the word. +\index{recursive definition} +\index{definition!recursive} + +\item Recursively, a word is reducible if any of its children +are reducible. As a base case, you can consider the empty +string reducible. + +\item The wordlist I provided, {\tt words.txt}, doesn't +contain single letter words. So you might want to add +``I'', ``a'', and the empty string. + +\item To improve the performance of your program, you might want +to memoize the words that are known to be reducible. + +\end{enumerate} + +Solution: \url{http://thinkpython2.com/code/reducible.py}. + +\end{exercise} + + + + +%\begin{exercise} +%\url{http://en.wikipedia.org/wiki/Word_Ladder} +%\end{exercise} + + + + +\chapter{Case study: data structure selection} + +At this point you have learned about Python's core data structures, +and you have seen some of the algorithms that use them. +If you would like to know more about algorithms, this might be a good +time to read Chapter~\ref{algorithms}. +But you don't have to read it before you go on; you can read +it whenever you are interested. + +This chapter presents a case study with exercises that let +you think about choosing data structures and practice using them. + + +\section{Word frequency analysis} +\label{analysis} + +As usual, you should at least attempt the exercises +before you read my solutions. + +\begin{exercise} + +Write a program that reads a file, breaks each line into +words, strips whitespace and punctuation from the words, and +converts them to lowercase. +\index{string module} +\index{module!string} + +Hint: The {\tt string} module provides a string named {\tt whitespace}, +which contains space, tab, newline, etc., and {\tt + punctuation} which contains the punctuation characters. Let's see +if we can make Python swear: + +\begin{verbatim} +>>> import string +>>> string.punctuation +'!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~' +\end{verbatim} +% +Also, you might consider using the string methods {\tt strip}, +{\tt replace} and {\tt translate}. +\index{strip method} +\index{method!strip} +\index{replace method} +\index{method!replace} +\index{translate method} +\index{method!translate} + +\end{exercise} + + +\begin{exercise} +\index{Project Gutenberg} + +Go to Project Gutenberg (\url{http://gutenberg.org}) and download +your favorite out-of-copyright book in plain text format. +\index{plain text} +\index{text!plain} + +Modify your program from the previous exercise to read the book +you downloaded, skip over the header information at the beginning +of the file, and process the rest of the words as before. + +Then modify the program to count the total number of words in +the book, and the number of times each word is used. +\index{word frequency} +\index{frequency!word} + +Print the number of different words used in the book. Compare +different books by different authors, written in different eras. +Which author uses the most extensive vocabulary? +\end{exercise} + + +\begin{exercise} + +Modify the program from the previous exercise to print the +20 most frequently used words in the book. + +\end{exercise} + + +\begin{exercise} + +Modify the previous program to read a word list (see +Section~\ref{wordlist}) and then print all the words in the book that +are not in the word list. How many of them are typos? How many of +them are common words that {\em should} be in the word list, and how +many of them are really obscure? + +\end{exercise} + + +\section{Random numbers} +\index{random number} +\index{number, random} +\index{deterministic} +\index{pseudorandom} + +Given the same inputs, most computer programs generate the same +outputs every time, so they are said to be {\bf deterministic}. +Determinism is usually a good thing, since we expect the same +calculation to yield the same result. For some applications, though, +we want the computer to be unpredictable. Games are an obvious +example, but there are more. + +Making a program truly nondeterministic turns out to be difficult, +but there are ways to make it at least seem nondeterministic. One of +them is to use algorithms that generate {\bf pseudorandom} numbers. +Pseudorandom numbers are not truly random because they are generated +by a deterministic computation, but just by looking at the numbers it +is all but impossible to distinguish them from random. +\index{random module} +\index{module!random} + +The {\tt random} module provides functions that generate +pseudorandom numbers (which I will simply call ``random'' from +here on). +\index{random function} +\index{function!random} + +The function {\tt random} returns a random float +between 0.0 and 1.0 (including 0.0 but not 1.0). Each time you +call {\tt random}, you get the next number in a long series. To see a +sample, run this loop: + +\begin{verbatim} +import random + +for i in range(10): + x = random.random() + print(x) +\end{verbatim} +% +The function {\tt randint} takes parameters {\tt low} and +{\tt high} and returns an integer between {\tt low} and +{\tt high} (including both). +\index{randint function} +\index{function!randint} + +\begin{verbatim} +>>> random.randint(5, 10) +5 +>>> random.randint(5, 10) +9 +\end{verbatim} +% +To choose an element from a sequence at random, you can use +{\tt choice}: +\index{choice function} +\index{function!choice} + +\begin{verbatim} +>>> t = [1, 2, 3] +>>> random.choice(t) +2 +>>> random.choice(t) +3 +\end{verbatim} +% +The {\tt random} module also provides functions to generate +random values from continuous distributions including +Gaussian, exponential, gamma, and a few more. + +\begin{exercise} +\index{histogram!random choice} + +Write a function named \verb"choose_from_hist" that takes +a histogram as defined in Section~\ref{histogram} and returns a +random value from the histogram, chosen with probability +in proportion to frequency. For example, for this histogram: + +\begin{verbatim} +>>> t = ['a', 'a', 'b'] +>>> hist = histogram(t) +>>> hist +{'a': 2, 'b': 1} +\end{verbatim} +% +your function should return \verb"'a'" with probability $2/3$ and \verb"'b'" +with probability $1/3$. +\end{exercise} + + +\section{Word histogram} + +You should attempt the previous exercises before you go on. +You can download my solution from + \url{http://thinkpython2.com/code/analyze_book1.py}. You will +also need \url{http://thinkpython2.com/code/emma.txt}. + +Here is a program that reads a file and builds a histogram of the +words in the file: +\index{histogram!word frequencies} + +\begin{verbatim} +import string + +def process_file(filename): + hist = dict() + fp = open(filename) + for line in fp: + process_line(line, hist) + return hist + +def process_line(line, hist): + line = line.replace('-', ' ') + + for word in line.split(): + word = word.strip(string.punctuation + string.whitespace) + word = word.lower() + hist[word] = hist.get(word, 0) + 1 + +hist = process_file('emma.txt') +\end{verbatim} +% +This program reads {\tt emma.txt}, which contains the text of {\em + Emma} by Jane Austen. +\index{Austin, Jane} + +\verb"process_file" loops through the lines of the file, +passing them one at a time to \verb"process_line". The histogram +{\tt hist} is being used as an accumulator. +\index{accumulator!histogram} +\index{traversal} + +\verb"process_line" uses the string method {\tt replace} to replace +hyphens with spaces before using {\tt split} to break the line into a +list of strings. It traverses the list of words and uses {\tt strip} +and {\tt lower} to remove punctuation and convert to lower case. (It +is a shorthand to say that strings are ``converted''; remember that +strings are immutable, so methods like {\tt strip} and {\tt lower} +return new strings.) + +Finally, \verb"process_line" updates the histogram by creating a new +item or incrementing an existing one. +\index{update!histogram} + +To count the total number of words in the file, we can add up +the frequencies in the histogram: + +\begin{verbatim} +def total_words(hist): + return sum(hist.values()) +\end{verbatim} +% +The number of different words is just the number of items in +the dictionary: + +\begin{verbatim} +def different_words(hist): + return len(hist) +\end{verbatim} +% +Here is some code to print the results: + +\begin{verbatim} +print('Total number of words:', total_words(hist)) +print('Number of different words:', different_words(hist)) +\end{verbatim} +% +And the results: + +\begin{verbatim} +Total number of words: 161080 +Number of different words: 7214 +\end{verbatim} +% + +\section{Most common words} + +To find the most common words, we can make a list of tuples, +where each tuple contains a word and its frequency, +and sort it. + +The following function takes a histogram and returns a list of +word-frequency tuples: + +\begin{verbatim} +def most_common(hist): + t = [] + for key, value in hist.items(): + t.append((value, key)) + + t.sort(reverse=True) + return t +\end{verbatim} + +In each tuple, the frequency appears first, so the resulting list is +sorted by frequency. Here is a loop that prints the ten most common +words: + +\begin{verbatim} +t = most_common(hist) +print('The most common words are:') +for freq, word in t[:10]: + print(word, freq, sep='\t') +\end{verbatim} +% +I use the keyword argument {\tt sep} to tell {\tt print} to use a tab +character as a ``separator'', rather than a space, so the second +column is lined up. Here are the results from {\em Emma}: + +\begin{verbatim} +The most common words are: +to 5242 +the 5205 +and 4897 +of 4295 +i 3191 +a 3130 +it 2529 +her 2483 +was 2400 +she 2364 +\end{verbatim} +% +This code can be simplified using the {\tt key} parameter of +the {\tt sort} function. If you are curious, you can read about it +at \url{https://wiki.python.org/moin/HowTo/Sorting}. + + +\section{Optional parameters} +\index{optional parameter} +\index{parameter!optional} + +We have seen built-in functions and methods that take optional +arguments. It is possible to write programmer-defined functions +with optional arguments, too. For example, here is a function that +prints the most common words in a histogram +\index{programmer-defined function} +\index{function!programmer defined} + +\begin{verbatim} +def print_most_common(hist, num=10): + t = most_common(hist) + print('The most common words are:') + for freq, word in t[:num]: + print(word, freq, sep='\t') +\end{verbatim} + +The first parameter is required; the second is optional. +The {\bf default value} of {\tt num} is 10. +\index{default value} +\index{value!default} + +If you only provide one argument: + +\begin{verbatim} +print_most_common(hist) +\end{verbatim} + +{\tt num} gets the default value. If you provide two arguments: + +\begin{verbatim} +print_most_common(hist, 20) +\end{verbatim} + +{\tt num} gets the value of the argument instead. In other +words, the optional argument {\bf overrides} the default value. +\index{override} + +If a function has both required and optional parameters, all +the required parameters have to come first, followed by the +optional ones. + + +\section{Dictionary subtraction} +\label{dictsub} +\index{dictionary!subtraction} +\index{subtraction!dictionary} + +Finding the words from the book that are not in the word list +from {\tt words.txt} is a problem you might recognize as set +subtraction; that is, we want to find all the words from one +set (the words in the book) that are not in the other (the +words in the list). + +{\tt subtract} takes dictionaries {\tt d1} and {\tt d2} and returns a +new dictionary that contains all the keys from {\tt d1} that are not +in {\tt d2}. Since we don't really care about the values, we +set them all to None. + +\begin{verbatim} +def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res +\end{verbatim} +% +To find the words in the book that are not in {\tt words.txt}, +we can use \verb"process_file" to build a histogram for +{\tt words.txt}, and then subtract: + +\begin{verbatim} +words = process_file('words.txt') +diff = subtract(hist, words) + +print("Words in the book that aren't in the word list:") +for word in diff: + print(word, end=' ') +\end{verbatim} +% +Here are some of the results from {\em Emma}: + +\begin{verbatim} +Words in the book that aren't in the word list: +rencontre jane's blanche woodhouses disingenuousness +friend's venice apartment ... +\end{verbatim} +% +Some of these words are names and possessives. Others, like +``rencontre'', are no longer in common use. But a few are common +words that should really be in the list! + +\begin{exercise} +\index{set} +\index{type!set} + +Python provides a data structure called {\tt set} that provides many +common set operations. You can read about them in Section~\ref{sets}, +or read the documentation at +\url{http://docs.python.org/3/library/stdtypes.html#types-set}. + +Write a program that uses set subtraction to find words in the book +that are not in the word list. Solution: +\url{http://thinkpython2.com/code/analyze_book2.py}. + +\end{exercise} + + +\section{Random words} +\label{randomwords} +\index{histogram!random choice} + +To choose a random word from the histogram, the simplest algorithm +is to build a list with multiple copies of each word, according +to the observed frequency, and then choose from the list: + +\begin{verbatim} +def random_word(h): + t = [] + for word, freq in h.items(): + t.extend([word] * freq) + + return random.choice(t) +\end{verbatim} +% +The expression {\tt [word] * freq} creates a list with {\tt freq} +copies of the string {\tt word}. The {\tt extend} +method is similar to {\tt append} except that the argument is +a sequence. + +This algorithm works, but it is not very efficient; each time you +choose a random word, it rebuilds the list, which is as big as +the original book. An obvious improvement is to build the list +once and then make multiple selections, but the list is still big. + +An alternative is: + +\begin{enumerate} + +\item Use {\tt keys} to get a list of the words in the book. + +\item Build a list that contains the cumulative sum of the word + frequencies (see Exercise~\ref{cumulative}). The last item + in this list is the total number of words in the book, $n$. + +\item Choose a random number from 1 to $n$. Use a bisection search + (See Exercise~\ref{bisection}) to find the index where the random + number would be inserted in the cumulative sum. + +\item Use the index to find the corresponding word in the word list. + +\end{enumerate} + +\begin{exercise} +\label{randhist} +\index{algorithm} + +Write a program that uses this algorithm to choose a random word from +the book. Solution: +\url{http://thinkpython2.com/code/analyze_book3.py}. + +\end{exercise} + + + +\section{Markov analysis} +\label{markov} +\index{Markov analysis} + +If you choose words from the book at random, you can get a +sense of the vocabulary, but you probably won't get a sentence: + +\begin{verbatim} +this the small regard harriet which knightley's it most things +\end{verbatim} +% +A series of random words seldom makes sense because there +is no relationship between successive words. For example, in +a real sentence you would expect an article like ``the'' to +be followed by an adjective or a noun, and probably not a verb +or adverb. + +One way to measure these kinds of relationships is Markov +analysis, which +characterizes, for a given sequence of words, the probability of the +words that might come next. For example, the song {\em Eric, the Half a + Bee} begins: + +\begin{quote} +Half a bee, philosophically, \\ +Must, ipso facto, half not be. \\ +But half the bee has got to be \\ +Vis a vis, its entity. D'you see? \\ +\\ +But can a bee be said to be \\ +Or not to be an entire bee \\ +When half the bee is not a bee \\ +Due to some ancient injury? \\ +\end{quote} +% +In this text, +the phrase ``half the'' is always followed by the word ``bee'', +but the phrase ``the bee'' might be followed by either +``has'' or ``is''. +\index{prefix} +\index{suffix} +\index{mapping} + +The result of Markov analysis is a mapping from each prefix +(like ``half the'' and ``the bee'') to all possible suffixes +(like ``has'' and ``is''). +\index{random text} +\index{text!random} + +Given this mapping, you can generate a random text by +starting with any prefix and choosing at random from the +possible suffixes. Next, you can combine the end of the +prefix and the new suffix to form the next prefix, and repeat. + +For example, if you start with the prefix ``Half a'', then the +next word has to be ``bee'', because the prefix only appears +once in the text. The next prefix is ``a bee'', so the +next suffix might be ``philosophically'', ``be'' or ``due''. + +In this example the length of the prefix is always two, but +you can do Markov analysis with any prefix length. + +\begin{exercise} + +Markov analysis: + +\begin{enumerate} + +\item Write a program to read a text from a file and perform Markov +analysis. The result should be a dictionary that maps from +prefixes to a collection of possible suffixes. The collection +might be a list, tuple, or dictionary; it is up to you to make +an appropriate choice. You can test your program with prefix +length two, but you should write the program in a way that makes +it easy to try other lengths. + +\item Add a function to the previous program to generate random text +based on the Markov analysis. Here is an example from {\em Emma} +with prefix length 2: + +\begin{quote} +He was very clever, be it sweetness or be angry, ashamed or only +amused, at such a stroke. She had never thought of Hannah till you +were never meant for me?" "I cannot make speeches, Emma:" he soon cut +it all himself. +\end{quote} + +For this example, I left the punctuation attached to the words. +The result is almost syntactically correct, but not quite. +Semantically, it almost makes sense, but not quite. + +What happens if you increase the prefix length? Does the random +text make more sense? + +\item Once your program is working, you might want to try a mash-up: +if you combine text from two or more books, the random +text you generate will blend the vocabulary and phrases from +the sources in interesting ways. +\index{mash-up} + +\end{enumerate} + +Credit: This case study is based on an example from Kernighan and +Pike, {\em The Practice of Programming}, Addison-Wesley, 1999. + +\end{exercise} + +You should attempt this exercise before you go on; then you can can +download my solution from \url{http://thinkpython2.com/code/markov.py}. +You will also need \url{http://thinkpython2.com/code/emma.txt}. + + +\section{Data structures} +\index{data structure} + +Using Markov analysis to generate random text is fun, but there is +also a point to this exercise: data structure selection. In your +solution to the previous exercises, you had to choose: + +\begin{itemize} + +\item How to represent the prefixes. + +\item How to represent the collection of possible suffixes. + +\item How to represent the mapping from each prefix to +the collection of possible suffixes. + +\end{itemize} + +The last one is easy: a dictionary is the obvious choice +for a mapping from keys to corresponding values. + +For the prefixes, the most obvious options are string, +list of strings, or tuple of strings. + +For the suffixes, +one option is a list; another is a histogram (dictionary). +\index{implementation} + +How should you choose? The first step is to think about +the operations you will need to implement for each data structure. +For the prefixes, we need to be able to remove words from +the beginning and add to the end. For example, if the current +prefix is ``Half a'', and the next word is ``bee'', you need +to be able to form the next prefix, ``a bee''. +\index{tuple!as key in dictionary} + +Your first choice might be a list, since it is easy to add +and remove elements, but we also need to be able to use the +prefixes as keys in a dictionary, so that rules out lists. +With tuples, you can't append or remove, but you can use +the addition operator to form a new tuple: + +\begin{verbatim} +def shift(prefix, word): + return prefix[1:] + (word,) +\end{verbatim} +% +{\tt shift} takes a tuple of words, {\tt prefix}, and a string, +{\tt word}, and forms a new tuple that has all the words +in {\tt prefix} except the first, and {\tt word} added to +the end. + +For the collection of suffixes, the operations we need to +perform include adding a new suffix (or increasing the frequency +of an existing one), and choosing a random suffix. + +Adding a new suffix is equally easy for the list implementation +or the histogram. Choosing a random element from a list +is easy; choosing from a histogram is harder to do +efficiently (see Exercise~\ref{randhist}). + +So far we have been talking mostly about ease of implementation, +but there are other factors to consider in choosing data structures. +One is run time. Sometimes there is a theoretical reason to expect +one data structure to be faster than other; for example, I mentioned +that the {\tt in} operator is faster for dictionaries than for lists, +at least when the number of elements is large. + +But often you don't know ahead of time which implementation will +be faster. One option is to implement both of them and see which +is better. This approach is called {\bf benchmarking}. A practical +alternative is to choose the data structure that is +easiest to implement, and then see if it is fast enough for the +intended application. If so, there is no need to go on. If not, +there are tools, like the {\tt profile} module, that can identify +the places in a program that take the most time. +\index{benchmarking} +\index{profile module} +\index{module!profile} + +The other factor to consider is storage space. For example, using a +histogram for the collection of suffixes might take less space because +you only have to store each word once, no matter how many times it +appears in the text. In some cases, saving space can also make your +program run faster, and in the extreme, your program might not run at +all if you run out of memory. But for many applications, space is a +secondary consideration after run time. + +One final thought: in this discussion, I have implied that +we should use one data structure for both analysis and generation. But +since these are separate phases, it would also be possible to use one +structure for analysis and then convert to another structure for +generation. This would be a net win if the time saved during +generation exceeded the time spent in conversion. + + +\section{디버깅} +%Debugging +\index{debugging} + +When you are debugging a program, and especially if you are +working on a hard bug, there are five things to try: + +\begin{description} + +\item[Reading:] Examine your code, read it back to yourself, and +check that it says what you meant to say. + +\item[Running:] Experiment by making changes and running different +versions. Often if you display the right thing at the right place +in the program, the problem becomes obvious, but sometimes you have to +build scaffolding. + +\item[Ruminating:] Take some time to think! What kind of error +is it: syntax, runtime, or semantic? What information can you get from +the error messages, or from the output of the program? What kind of +error could cause the problem you're seeing? What did you change +last, before the problem appeared? + +\item[Rubberducking:] If you explain the problem to someone else, you + sometimes find the answer before you finish asking the question. + Often you don't need the other person; you could just talk to a rubber + duck. And that's the origin of the well-known strategy called {\bf + rubber duck debugging}. I am not making this up; see + \url{https://en.wikipedia.org/wiki/Rubber_duck_debugging}. + +\item[Retreating:] At some point, the best thing to do is back +off, undoing recent changes, until you get back to a program that +works and that you understand. Then you can start rebuilding. + +\end{description} + +Beginning programmers sometimes get stuck on one of these activities +and forget the others. Each activity comes with its own failure +mode. +\index{typographical error} + +For example, reading your code might help if the problem is a +typographical error, but not if the problem is a conceptual +misunderstanding. If you don't understand what your program does, you +can read it 100 times and never see the error, because the error is in +your head. +\index{experimental debugging} + +Running experiments can help, especially if you run small, simple +tests. But if you run experiments without thinking or reading your +code, you might fall into a pattern I call ``random walk programming'', +which is the process of making random changes until the program +does the right thing. Needless to say, random walk programming +can take a long time. +\index{random walk programming} +\index{development plan!random walk programming} + +You have to take time to think. Debugging is like an +experimental science. You should have at least one hypothesis about +what the problem is. If there are two or more possibilities, try to +think of a test that would eliminate one of them. + +But even the best debugging techniques will fail if there are too many +errors, or if the code you are trying to fix is too big and +complicated. Sometimes the best option is to retreat, simplifying the +program until you get to something that works and that you +understand. + +Beginning programmers are often reluctant to retreat because +they can't stand to delete a line of code (even if it's wrong). +If it makes you feel better, copy your program into another file +before you start stripping it down. Then you can copy the pieces +back one at a time. + +Finding a hard bug requires reading, running, ruminating, and +sometimes retreating. If you get stuck on one of these activities, +try the others. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[deterministic:] Pertaining to a program that does the same +thing each time it runs, given the same inputs. +\index{deterministic} + +\item[pseudorandom:] Pertaining to a sequence of numbers that appears +to be random, but is generated by a deterministic program. +\index{pseudorandom} + +\item[default value:] The value given to an optional parameter if no +argument is provided. +\index{default value} + +\item[override:] To replace a default value with an argument. +\index{override} + +\item[benchmarking:] The process of choosing between data structures +by implementing alternatives and testing them on a sample of the +possible inputs. +\index{benchmarking} + +\item[rubber duck debugging:] Debugging by explaining your problem +to an inanimate object such as a rubber duck. Articulating the +problem can help you solve it, even if the rubber duck doesn't know +Python. +\index{rubber duck debugging} +\index{debugging!rubber duck} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +\index{word frequency} +\index{frequency!word} +\index{Zipf's law} + +The ``rank'' of a word is its position in a list of words +sorted by frequency: the most common word has rank 1, the +second most common has rank 2, etc. + +Zipf's law describes a relationship between the ranks and frequencies +of words in natural languages +(\url{http://en.wikipedia.org/wiki/Zipf's_law}). Specifically, it +predicts that the frequency, $f$, of the word with rank $r$ is: + +\[ f = c r^{-s} \] +% +where $s$ and $c$ are parameters that depend on the language and the +text. If you take the logarithm of both sides of this equation, you +get: +\index{logarithm} + +\[ \log f = \log c - s \log r \] +% +So if you plot log $f$ versus log $r$, you should get +a straight line with slope $-s$ and intercept log $c$. + +Write a program that reads a text from a file, counts +word frequencies, and prints one line +for each word, in descending order of frequency, with +log $f$ and log $r$. Use the graphing program of your +choice to plot the results and check whether they form +a straight line. Can you estimate the value of $s$? + +Solution: \url{http://thinkpython2.com/code/zipf.py}. +To run my solution, you need the plotting module {\tt matplotlib}. +If you installed Anaconda, you already have {\tt matplotlib}; +otherwise you might have to install it. +\index{matplotlib} + +\end{exercise} + + + +\chapter{Files} + +This chapter introduces the idea of ``persistent'' programs that +keep data in permanent storage, and shows how to use different +kinds of permanent storage, like files and databases. + + +\section{Persistence} +\index{file} +\index{type!file} +\index{persistence} + +Most of the programs we have seen so far are transient in the +sense that they run for a short time and produce some output, +but when they end, their data disappears. If you run the program +again, it starts with a clean slate. + +Other programs are {\bf persistent}: they run for a long time +(or all the time); they keep at least some of their data +in permanent storage (a hard drive, for example); and +if they shut down and restart, they pick up where they left off. + +Examples of persistent programs are operating systems, which +run pretty much whenever a computer is on, and web servers, +which run all the time, waiting for requests to come in on +the network. + +One of the simplest ways for programs to maintain their data +is by reading and writing text files. We have already seen +programs that read text files; in this chapter we will see programs +that write them. + +An alternative is to store the state of the program in a database. +In this chapter I will present a simple database and a module, +{\tt pickle}, that makes it easy to store program data. +\index{pickle module} +\index{module!pickle} + + +\section{Reading and writing} +\index{file!reading and writing} + +A text file is a sequence of characters stored on a permanent +medium like a hard drive, flash memory, or CD-ROM. We saw how +to open and read a file in Section~\ref{wordlist}. +\index{open function} +\index{function!open} + +To write a file, you have to open it with mode \verb"'w'" as a second +parameter: + +\begin{verbatim} +>>> fout = open('output.txt', 'w') +\end{verbatim} +% +If the file already exists, opening it in write mode clears out +the old data and starts fresh, so be careful! +If the file doesn't exist, a new one is created. + +{\tt open} returns a file object that provides methods for working +with the file. +The {\tt write} method puts data into the file. + +\begin{verbatim} +>>> line1 = "This here's the wattle,\n" +>>> fout.write(line1) +24 +\end{verbatim} +% +The return value is the number of characters that were written. +The file object keeps track of where it is, so if +you call {\tt write} again, it adds the new data to the end of +the file. + +\begin{verbatim} +>>> line2 = "the emblem of our land.\n" +>>> fout.write(line2) +24 +\end{verbatim} +% +When you are done writing, you should close the file. + +\begin{verbatim} +>>> fout.close() +\end{verbatim} +% +\index{close method} +\index{method!close} +% +If you don't close the file, it gets closed for you when the +program ends. + + +\section{Format operator} +\index{format operator} +\index{operator!format} + +The argument of {\tt write} has to be a string, so if we want +to put other values in a file, we have to convert them to +strings. The easiest way to do that is with {\tt str}: + +\begin{verbatim} +>>> x = 52 +>>> fout.write(str(x)) +\end{verbatim} +% +An alternative is to use the {\bf format operator}, {\tt \%}. When +applied to integers, {\tt \%} is the modulus operator. But +when the first operand is a string, {\tt \%} is the format operator. +\index{format string} + +The first operand is the {\bf format string}, which contains +one or more {\bf format sequences}, which +specify how +the second operand is formatted. The result is a string. +\index{format sequence} + +For example, the format sequence \verb"'%d'" means that +the second operand should be formatted as a decimal +integer: + +\begin{verbatim} +>>> camels = 42 +>>> '%d' % camels +'42' +\end{verbatim} +% +The result is the string \verb"'42'", which is not to be confused +with the integer value {\tt 42}. + +A format sequence can appear anywhere in the string, +so you can embed a value in a sentence: + +\begin{verbatim} +>>> 'I have spotted %d camels.' % camels +'I have spotted 42 camels.' +\end{verbatim} +% +If there is more than one format sequence in the string, +the second argument has to be a tuple. Each format sequence is +matched with an element of the tuple, in order. + +The following example uses \verb"'%d'" to format an integer, +\verb"'%g'" to format a floating-point number, and +\verb"'%s'" to format a string: + +\begin{verbatim} +>>> 'In %d years I have spotted %g %s.' % (3, 0.1, 'camels') +'In 3 years I have spotted 0.1 camels.' +\end{verbatim} +% +The number of elements in the tuple has to match the number +of format sequences in the string. Also, the types of the +elements have to match the format sequences: +\index{exception!TypeError} +\index{TypeError} + +\begin{verbatim} +>>> '%d %d %d' % (1, 2) +TypeError: not enough arguments for format string +>>> '%d' % 'dollars' +TypeError: %d format: a number is required, not str +\end{verbatim} +% +In the first example, there aren't enough elements; in the +second, the element is the wrong type. + +For more information on the format operator, see +\url{https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting}. A more powerful alternative is the string +format method, which you can read about at +\url{https://docs.python.org/3/library/stdtypes.html#str.format}. + +% You can specify the number of digits as part of the format sequence. +% For example, the sequence \verb"'%8.2f'" +% formats a floating-point number to be 8 characters long, with +% 2 digits after the decimal point: + +% % \begin{verbatim} +% >>> '%8.2f' % 3.14159 +% ' 3.14' +% \end{verbatim} +% \afterverb +% % +% The result takes up eight spaces with two +% digits after the decimal point. + + +\section{Filenames and paths} +\label{paths} +\index{filename} +\index{path} +\index{directory} +\index{folder} + +Files are organized into {\bf directories} (also called ``folders''). +Every running program has a ``current directory'', which is the +default directory for most operations. +For example, when you open a file for reading, Python looks for it in the +current directory. +\index{os module} +\index{module!os} + +The {\tt os} module provides functions for working with files and +directories (``os'' stands for ``operating system''). {\tt os.getcwd} +returns the name of the current directory: +\index{getcwd function} +\index{function!getcwd} + +\begin{verbatim} +>>> import os +>>> cwd = os.getcwd() +>>> cwd +'/home/dinsdale' +\end{verbatim} +% +{\tt cwd} stands for ``current working directory''. The result in +this example is {\tt /home/dinsdale}, which is the home directory of a +user named {\tt dinsdale}. +\index{working directory} +\index{directory!working} + +A string like \verb"'/home/dinsdale'" that identifies a file or +directory is called a {\bf path}. + +A simple filename, like {\tt memo.txt} is also considered a path, +but it is a {\bf relative path} because it relates to the current +directory. If the current directory is {\tt /home/dinsdale}, the +filename {\tt memo.txt} would refer to {\tt /home/dinsdale/memo.txt}. +\index{relative path} \index{path!relative} +\index{absolute path} \index{path!absolute} + +A path that begins with {\tt /} does not depend on the current +directory; it is called an {\bf absolute path}. To find the absolute +path to a file, you can use {\tt os.path.abspath}: + +\begin{verbatim} +>>> os.path.abspath('memo.txt') +'/home/dinsdale/memo.txt' +\end{verbatim} +% +{\tt os.path} provides other functions for working with filenames +and paths. For example, +{\tt os.path.exists} checks +whether a file or directory exists: +\index{exists function} +\index{function!exists} + +\begin{verbatim} +>>> os.path.exists('memo.txt') +True +\end{verbatim} +% +If it exists, {\tt os.path.isdir} checks whether it's a directory: + +\begin{verbatim} +>>> os.path.isdir('memo.txt') +False +>>> os.path.isdir('/home/dinsdale') +True +\end{verbatim} +% +Similarly, {\tt os.path.isfile} checks whether it's a file. + +{\tt os.listdir} returns a list of the files (and other directories) +in the given directory: + +\begin{verbatim} +>>> os.listdir(cwd) +['music', 'photos', 'memo.txt'] +\end{verbatim} +% +To demonstrate these functions, the following example +``walks'' through a directory, prints +the names of all the files, and calls itself recursively on +all the directories. +\index{walk, directory} +\index{directory!walk} + +\begin{verbatim} +def walk(dirname): + for name in os.listdir(dirname): + path = os.path.join(dirname, name) + + if os.path.isfile(path): + print(path) + else: + walk(path) +\end{verbatim} +% +{\tt os.path.join} takes a directory and a file name and joins +them into a complete path. + +The {\tt os} module provides a function called {\tt walk} that is +similar to this one but more versatile. As an exercise, read the +documentation and use it to print the names of the files in a given +directory and its subdirectories. You can download my solution from +\url{http://thinkpython2.com/code/walk.py}. + + +\section{Catching exceptions} +\label{catch} + +A lot of things can go wrong when you try to read and write +files. If you try to open a file that doesn't exist, you get an +{\tt IOError}: +\index{open function} +\index{function!open} +\index{exception!IOError} +\index{IOError} + +\begin{verbatim} +>>> fin = open('bad_file') +IOError: [Errno 2] No such file or directory: 'bad_file' +\end{verbatim} +% +If you don't have permission to access a file: +\index{file!permission} +\index{permission, file} + +\begin{verbatim} +>>> fout = open('/etc/passwd', 'w') +PermissionError: [Errno 13] Permission denied: '/etc/passwd' +\end{verbatim} +% +And if you try to open a directory for reading, you get + +\begin{verbatim} +>>> fin = open('/home') +IsADirectoryError: [Errno 21] Is a directory: '/home' +\end{verbatim} +% +To avoid these errors, you could use functions like {\tt os.path.exists} +and {\tt os.path.isfile}, but it would take a lot of time and code +to check all the possibilities (if ``{\tt Errno 21}'' is any +indication, there are at least 21 things that can go wrong). +\index{exception, catching} +\index{try statement} +\index{statement!try} + +It is better to go ahead and try---and deal with problems if they +happen---which is exactly what the {\tt try} statement does. The +syntax is similar to an {\tt if...else} statement: + +\begin{verbatim} +try: + fin = open('bad_file') +except: + print('Something went wrong.') +\end{verbatim} +% +Python starts by executing the {\tt try} clause. If all goes +well, it skips the {\tt except} clause and proceeds. If an +exception occurs, it jumps out of the {\tt try} clause and +runs the {\tt except} clause. + +Handling an exception with a {\tt try} statement is called {\bf +catching} an exception. In this example, the {\tt except} clause +prints an error message that is not very helpful. In general, +catching an exception gives you a chance to fix the problem, or try +again, or at least end the program gracefully. + + +\section{Databases} +\index{database} + +A {\bf database} is a file that is organized for storing data. Many +databases are organized like a dictionary in the sense that they map +from keys to values. The biggest difference between a database and a +dictionary is that the database is on disk (or other permanent +storage), so it persists after the program ends. \index{dbm + module} \index{module!dbm} + +The module {\tt dbm} provides an interface for creating +and updating database files. +As an example, I'll create a database +that contains captions for image files. +\index{open function} +\index{function!open} + +Opening a database is similar to opening other files: + +\begin{verbatim} +>>> import dbm +>>> db = dbm.open('captions', 'c') +\end{verbatim} +% +The mode \verb"'c'" means that the database should be created if +it doesn't already exist. The result is a database object +that can be used (for most operations) like a dictionary. +\index{database object} +\index{object!database} + +When you create a new item, {\tt dbm} updates the database file. +\index{update!database} + +\begin{verbatim} +>>> db['cleese.png'] = 'Photo of John Cleese.' +\end{verbatim} +% +When you access one of the items, {\tt dbm} reads the file: + +\begin{verbatim} +>>> db['cleese.png'] +b'Photo of John Cleese.' +\end{verbatim} +% +The result is a {\bf bytes object}, which is why it begins with {\tt + b}. A bytes object is similar to a string in many ways. When you +get farther into Python, the difference becomes important, but for now +we can ignore it. +\index{bytes object} +\index{object!bytes} + +If you make another assignment to an existing key, {\tt dbm} replaces +the old value: + +\begin{verbatim} +>>> db['cleese.png'] = 'Photo of John Cleese doing a silly walk.' +>>> db['cleese.png'] +b'Photo of John Cleese doing a silly walk.' +\end{verbatim} +% + +Some dictionary methods, like {\tt keys} and {\tt items}, don't +work with database objects. But iteration with a {\tt for} +loop works: +\index{dictionary methods!dbm module} + +\begin{verbatim} +for key in db: + print(key, db[key]) +\end{verbatim} +% +As with other files, you should close the database when you are +done: + +\begin{verbatim} +>>> db.close() +\end{verbatim} +% +\index{close method} +\index{method!close} + + +\section{Pickling} +\index{pickling} + +A limitation of {\tt dbm} is that the keys and values have to be +strings or bytes. If you try to use any other type, you get an error. +\index{pickle module} \index{module!pickle} + +The {\tt pickle} module can help. It translates +almost any type of object into a string suitable for storage in a +database, and then translates strings back into objects. + +{\tt pickle.dumps} takes an object as a parameter and returns +a string representation ({\tt dumps} is short for ``dump string''): + +\begin{verbatim} +>>> import pickle +>>> t = [1, 2, 3] +>>> pickle.dumps(t) +b'\x80\x03]q\x00(K\x01K\x02K\x03e.' +\end{verbatim} +% +The format isn't obvious to human readers; it is meant to be +easy for {\tt pickle} to interpret. {\tt pickle.loads} +(``load string'') reconstitutes the object: + +\begin{verbatim} +>>> t1 = [1, 2, 3] +>>> s = pickle.dumps(t1) +>>> t2 = pickle.loads(s) +>>> t2 +[1, 2, 3] +\end{verbatim} +% +Although the new object has the same value as the old, it is +not (in general) the same object: + +\begin{verbatim} +>>> t1 == t2 +True +>>> t1 is t2 +False +\end{verbatim} +% +In other words, pickling and then unpickling has the same effect +as copying the object. + +You can use {\tt pickle} to store non-strings in a database. +In fact, this combination is so common that it has been +encapsulated in a module called {\tt shelve}. +\index{shelve module} +\index{module!shelve} + + +\section{Pipes} +\index{shell} +\index{pipe} + +Most operating systems provide a command-line interface, +also known as a {\bf shell}. Shells usually provide commands +to navigate the file system and launch applications. For +example, in Unix you can change directories with {\tt cd}, +display the contents of a directory with {\tt ls}, and launch +a web browser by typing (for example) {\tt firefox}. +\index{ls (Unix command)} +\index{Unix command!ls} + +Any program that you can launch from the shell can also be +launched from Python using a {\bf pipe object}, which +represents a running program. + +For example, the Unix command {\tt ls -l} normally displays the +contents of the current directory in long format. You can +launch {\tt ls} with {\tt os.popen}\footnote{{\tt popen} is deprecated +now, which means we are supposed to stop using it and start using +the {\tt subprocess} module. But for simple cases, I find +{\tt subprocess} more complicated than necessary. So I am going +to keep using {\tt popen} until they take it away.}: +\index{popen function} +\index{function!popen} + +\begin{verbatim} +>>> cmd = 'ls -l' +>>> fp = os.popen(cmd) +\end{verbatim} +% +The argument is a string that contains a shell command. The +return value is an object that behaves like an open +file. You can read the output from the {\tt ls} process one +line at a time with {\tt readline} or get the whole thing at +once with {\tt read}: +\index{readline method} +\index{method!readline} +\index{read method} +\index{method!read} + +\begin{verbatim} +>>> res = fp.read() +\end{verbatim} +% +When you are done, you close the pipe like a file: +\index{close method} +\index{method!close} + +\begin{verbatim} +>>> stat = fp.close() +>>> print(stat) +None +\end{verbatim} +% +The return value is the final status of the {\tt ls} process; +{\tt None} means that it ended normally (with no errors). + +For example, most Unix systems provide a command called {\tt md5sum} +that reads the contents of a file and computes a ``checksum''. +You can read about MD5 at \url{http://en.wikipedia.org/wiki/Md5}. This +command provides an efficient way to check whether two files +have the same contents. The probability that different contents +yield the same checksum is very small (that is, unlikely to happen +before the universe collapses). +\index{md5} +\index{checksum} + +You can use a pipe to run {\tt md5sum} from Python and get the result: + +\begin{verbatim} +>>> filename = 'book.tex' +>>> cmd = 'md5sum ' + filename +>>> fp = os.popen(cmd) +>>> res = fp.read() +>>> stat = fp.close() +>>> print(res) +1e0033f0ed0656636de0d75144ba32e0 book.tex +>>> print(stat) +None +\end{verbatim} + + + +\section{Writing modules} +\label{modules} +\index{module, writing} +\index{word count} + +Any file that contains Python code can be imported as a module. +For example, suppose you have a file named {\tt wc.py} with the following +code: + +\begin{verbatim} +def linecount(filename): + count = 0 + for line in open(filename): + count += 1 + return count + +print(linecount('wc.py')) +\end{verbatim} +% +If you run this program, it reads itself and prints the number +of lines in the file, which is 7. +You can also import it like this: + +\begin{verbatim} +>>> import wc +7 +\end{verbatim} +% +Now you have a module object {\tt wc}: +\index{module object} +\index{object!module} + +\begin{verbatim} +>>> wc + +\end{verbatim} +% +The module object provides \verb"linecount": + +\begin{verbatim} +>>> wc.linecount('wc.py') +7 +\end{verbatim} +% +So that's how you write modules in Python. + +The only problem with this example is that when you import +the module it runs the test code at the bottom. Normally +when you import a module, it defines new functions but it +doesn't run them. +\index{import statement} +\index{statement!import} + +Programs that will be imported as modules often +use the following idiom: + +\begin{verbatim} +if __name__ == '__main__': + print(linecount('wc.py')) +\end{verbatim} +% +\verb"__name__" is a built-in variable that is set when the +program starts. If the program is running as a script, +\verb"__name__" has the value \verb"'__main__'"; in that +case, the test code runs. Otherwise, +if the module is being imported, the test code is skipped. + +\index{name built-in variable} +\index{main} + +As an exercise, type this example into a file named {\tt wc.py} and run +it as a script. Then run the Python interpreter and +{\tt import wc}. What is the value of \verb"__name__" +when the module is being imported? + +Warning: If you import a module that has already been imported, +Python does nothing. It does not re-read the file, even if it has +changed. +\index{module!reload} +\index{reload function} +\index{function!reload} + +If you want to reload a module, you can use the built-in function +{\tt reload}, but it can be tricky, so the safest thing to do is +restart the interpreter and then import the module again. + + +\section{디버깅} +%Debugging +\index{debugging} +\index{whitespace} + +When you are reading and writing files, you might run into problems +with whitespace. These errors can be hard to debug because spaces, +tabs and newlines are normally invisible: + +\begin{verbatim} +>>> s = '1 2\t 3\n 4' +>>> print(s) +1 2 3 + 4 +\end{verbatim} +\index{repr function} +\index{function!repr} +\index{string representation} + +The built-in function {\tt repr} can help. It takes any object as an +argument and returns a string representation of the object. For +strings, it represents whitespace +characters with backslash sequences: + +\begin{verbatim} +>>> print(repr(s)) +'1 2\t 3\n 4' +\end{verbatim} + +This can be helpful for debugging. + +One other problem you might run into is that different systems +use different characters to indicate the end of a line. Some +systems use a newline, represented \verb"\n". Others use +a return character, represented \verb"\r". Some use both. +If you move files between different systems, these inconsistencies +can cause problems. +\index{end of line character} + +For most systems, there are applications to convert from one +format to another. You can find them (and read more about this +issue) at \url{http://en.wikipedia.org/wiki/Newline}. Or, of course, you +could write one yourself. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[persistent:] Pertaining to a program that runs indefinitely +and keeps at least some of its data in permanent storage. +\index{persistence} + +\item[format operator:] An operator, {\tt \%}, that takes a format +string and a tuple and generates a string that includes +the elements of the tuple formatted as specified by the format string. +\index{format operator} +\index{operator!format} + +\item[format string:] A string, used with the format operator, that +contains format sequences. +\index{format string} + +\item[format sequence:] A sequence of characters in a format string, +like {\tt \%d}, that specifies how a value should be formatted. +\index{format sequence} + +\item[text file:] A sequence of characters stored in permanent +storage like a hard drive. +\index{text file} + +\item[directory:] A named collection of files, also called a folder. +\index{directory} + +\item[path:] A string that identifies a file. +\index{path} + +\item[relative path:] A path that starts from the current directory. +\index{relative path} + +\item[absolute path:] A path that starts from the topmost directory +in the file system. +\index{absolute path} + +\item[catch:] To prevent an exception from terminating +a program using the {\tt try} +and {\tt except} statements. +\index{catch} + +\item[database:] A file whose contents are organized like a dictionary +with keys that correspond to values. +\index{database} + +\item[bytes object:] An object similar to a string. +\index{bytes object} +\index{object!bytes} + +\item[shell:] A program that allows users to type commands and then +executes them by starting other programs. +\index{shell} + +\item[pipe object:] An object that represents a running program, allowing +a Python program to run commands and read the results. +\index{pipe object} +\index{object!pipe} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +Write a function called {\tt sed} that takes as arguments a pattern string, +a replacement string, and two filenames; it should read the first file +and write the contents into the second file (creating it if +necessary). If the pattern string appears anywhere in the file, it +should be replaced with the replacement string. + +If an error occurs while opening, reading, writing or closing files, +your program should catch the exception, print an error message, and +exit. Solution: \url{http://thinkpython2.com/code/sed.py}. + +\end{exercise} + + +\begin{exercise} +\index{anagram set} +\index{set!anagram} + +If you download my solution to Exercise~\ref{anagrams} from +\url{http://thinkpython2.com/code/anagram_sets.py}, you'll see that it creates +a dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, +\verb"'opst'" maps to the list +\verb"['opts', 'post', 'pots', 'spot', 'stop', 'tops']". + +Write a module that imports \verb"anagram_sets" and provides +two new functions: \verb"store_anagrams" should store the +anagram dictionary in a ``shelf''; \verb"read_anagrams" should +look up a word and return a list of its anagrams. +Solution: \url{http://thinkpython2.com/code/anagram_db.py}. + +\end{exercise} + + +\begin{exercise} +\label{checksum} +\index{MP3} + +In a large collection of MP3 files, there may be more than one +copy of the same song, stored in different directories or with +different file names. The goal of this exercise is to search for +duplicates. + +\begin{enumerate} + +\item Write a program that searches a directory and all of its +subdirectories, recursively, and returns a list of complete paths +for all files with a given suffix (like {\tt .mp3}). +Hint: {\tt os.path} provides several useful functions for +manipulating file and path names. +\index{duplicate} +\index{MD5 algorithm} +\index{algorithm!MD5} +\index{checksum} + +\item To recognize duplicates, you can use {\tt md5sum} +to compute a ``checksum'' for each files. If two files have +the same checksum, they probably have the same contents. +\index{md5sum} + +\item To double-check, you can use the Unix command {\tt diff}. +\index{diff} + +\end{enumerate} + +Solution: \url{http://thinkpython2.com/code/find_duplicates.py}. + +\end{exercise} + + + +\chapter{Classes and objects} +\label{clobjects} + +At this point you know how to use +functions to organize code and +built-in types to organize data. The next step is to learn +``object-oriented programming'', which uses programmer-defined types +to organize both code and data. Object-oriented programming is +a big topic; it will take a few chapters to get there. +\index{object-oriented programming} + +Code examples from this chapter are available from +\url{http://thinkpython2.com/code/Point1.py}; solutions +to the exercises are available from +\url{http://thinkpython2.com/code/Point1_soln.py}. + + +\section{Programmer-defined types} +\label{point} +\index{programmer-defined type} +\index{type!programmer-defined} + +We have used many of Python's built-in types; now we are going +to define a new type. As an example, we will create a type +called {\tt Point} that represents a point in two-dimensional +space. +\index{point, mathematical} + +In mathematical notation, points are often written in +parentheses with a comma separating the coordinates. For example, +$(0,0)$ represents the origin, and $(x,y)$ represents the +point $x$ units to the right and $y$ units up from the origin. + +There are several ways we might represent points in Python: + +\begin{itemize} + +\item We could store the coordinates separately in two +variables, {\tt x} and {\tt y}. + +\item We could store the coordinates as elements in a list +or tuple. + +\item We could create a new type to represent points as +objects. + +\end{itemize} +\index{representation} + +Creating a new type +is more complicated than the other options, but +it has advantages that will be apparent soon. + +A programmer-defined type is also called a {\bf class}. +A class definition looks like this: +\index{class} +\index{object!class} +\index{class definition} +\index{definition!class} + +\begin{verbatim} +class Point: + """Represents a point in 2-D space.""" +\end{verbatim} +% +The header indicates that the new class is called {\tt Point}. +The body is a docstring that explains what the class is for. +You can define variables and methods inside a class definition, +but we will get back to that later. +\index{Point class} +\index{class!Point} +\index{docstring} + +Defining a class named {\tt Point} creates a {\bf class object}. + +\begin{verbatim} +>>> Point + +\end{verbatim} +% +Because {\tt Point} is defined at the top level, its ``full +name'' is \verb"__main__.Point". +\index{object!class} +\index{class object} + +The class object is like a factory for creating objects. To create a +Point, you call {\tt Point} as if it were a function. + +\begin{verbatim} +>>> blank = Point() +>>> blank +<__main__.Point object at 0xb7e9d3ac> +\end{verbatim} +% +The return value is a reference to a Point object, which we +assign to {\tt blank}. + +Creating a new object is called +{\bf instantiation}, and the object is an {\bf instance} of +the class. +\index{instance} +\index{instantiation} + +When you print an instance, Python tells you what class it +belongs to and where it is stored in memory (the prefix +{\tt 0x} means that the following number is in hexadecimal). +\index{hexadecimal} + +Every object is an instance of some class, so ``object'' and +``instance'' are interchangeable. But in this chapter I use +``instance'' to indicate that I am talking about a programmer-defined +type. + + +\section{Attributes} +\label{attributes} +\index{instance attribute} +\index{attribute!instance} +\index{dot notation} + +You can assign values to an instance using dot notation: + +\begin{verbatim} +>>> blank.x = 3.0 +>>> blank.y = 4.0 +\end{verbatim} +% +This syntax is similar to the syntax for selecting a variable from a +module, such as {\tt math.pi} or {\tt string.whitespace}. In this case, +though, we are assigning values to named elements of an object. +These elements are called {\bf attributes}. + +As a noun, ``AT-trib-ute'' is pronounced with emphasis on the first +syllable, as opposed to ``a-TRIB-ute'', which is a verb. + +The following diagram shows the result of these assignments. +A state diagram that shows an object and its attributes is +called an {\bf object diagram}; see Figure~\ref{fig.point}. +\index{state diagram} +\index{diagram!state} +\index{object diagram} +\index{diagram!object} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/point.pdf}} +\caption{Object diagram.} +\label{fig.point} +\end{figure} + +The variable {\tt blank} refers to a Point object, which +contains two attributes. Each attribute refers to a +floating-point number. + +You can read the value of an attribute using the same syntax: + +\begin{verbatim} +>>> blank.y +4.0 +>>> x = blank.x +>>> x +3.0 +\end{verbatim} +% +The expression {\tt blank.x} means, ``Go to the object {\tt blank} +refers to and get the value of {\tt x}.'' In the example, we assign that +value to a variable named {\tt x}. There is no conflict between +the variable {\tt x} and the attribute {\tt x}. + +You can use dot notation as part of any expression. For example: + +\begin{verbatim} +>>> '(%g, %g)' % (blank.x, blank.y) +'(3.0, 4.0)' +>>> distance = math.sqrt(blank.x**2 + blank.y**2) +>>> distance +5.0 +\end{verbatim} +% +You can pass an instance as an argument in the usual way. +For example: +\index{instance!as argument} + +\begin{verbatim} +def print_point(p): + print('(%g, %g)' % (p.x, p.y)) +\end{verbatim} +% +\verb"print_point" takes a point as an argument and displays it in +mathematical notation. To invoke it, you can pass {\tt blank} as +an argument: + +\begin{verbatim} +>>> print_point(blank) +(3.0, 4.0) +\end{verbatim} +% +Inside the function, {\tt p} is an alias for {\tt blank}, so if +the function modifies {\tt p}, {\tt blank} changes. +\index{aliasing} + +As an exercise, write a function called \verb"distance_between_points" +that takes two Points as arguments and returns the distance between +them. + + +\section{Rectangles} +\label{rectangles} + +Sometimes it is obvious what the attributes of an object should be, +but other times you have to make decisions. For example, imagine you +are designing a class to represent rectangles. What attributes would +you use to specify the location and size of a rectangle? You can +ignore angle; to keep things simple, assume that the rectangle is +either vertical or horizontal. +\index{representation} + +There are at least two possibilities: + +\begin{itemize} + +\item You could specify one corner of the rectangle +(or the center), the width, and the height. + +\item You could specify two opposing corners. + +\end{itemize} + +At this point it is hard to say whether either is better than +the other, so we'll implement the first one, just as an example. +\index{Rectangle class} +\index{class!Rectangle} + +Here is the class definition: + +\begin{verbatim} +class Rectangle: + """Represents a rectangle. + + attributes: width, height, corner. + """ +\end{verbatim} +% +The docstring lists the attributes: {\tt width} and +{\tt height} are numbers; {\tt corner} is a Point object that +specifies the lower-left corner. + +To represent a rectangle, you have to instantiate a Rectangle +object and assign values to the attributes: + +\begin{verbatim} +box = Rectangle() +box.width = 100.0 +box.height = 200.0 +box.corner = Point() +box.corner.x = 0.0 +box.corner.y = 0.0 +\end{verbatim} +% +The expression {\tt box.corner.x} means, +``Go to the object {\tt box} refers to and select the attribute named +{\tt corner}; then go to that object and select the attribute named +{\tt x}.'' + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/rectangle.pdf}} +\caption{Object diagram.} +\label{fig.rectangle} +\end{figure} + + +Figure~\ref{fig.rectangle} shows the state of this object. +An object that is an attribute of another object is {\bf embedded}. +\index{state diagram} +\index{diagram!state} +\index{object diagram} +\index{diagram!object} +\index{embedded object} +\index{object!embedded} + + +\section{Instances as return values} +\index{instance!as return value} +\index{return value} + +Functions can return instances. For example, \verb"find_center" +takes a {\tt Rectangle} as an argument and returns a {\tt Point} +that contains the coordinates of the center of the {\tt Rectangle}: + +\begin{verbatim} +def find_center(rect): + p = Point() + p.x = rect.corner.x + rect.width/2 + p.y = rect.corner.y + rect.height/2 + return p +\end{verbatim} +% +Here is an example that passes {\tt box} as an argument and assigns +the resulting Point to {\tt center}: + +\begin{verbatim} +>>> center = find_center(box) +>>> print_point(center) +(50, 100) +\end{verbatim} +% + +\section{Objects are mutable} +\index{object!mutable} +\index{mutability} + +You can change the state of an object by making an assignment to one of +its attributes. For example, to change the size of a rectangle +without changing its position, you can modify the values of {\tt +width} and {\tt height}: + +\begin{verbatim} +box.width = box.width + 50 +box.height = box.height + 100 +\end{verbatim} +% +You can also write functions that modify objects. For example, +\verb"grow_rectangle" takes a Rectangle object and two numbers, +{\tt dwidth} and {\tt dheight}, and adds the numbers to the +width and height of the rectangle: + +\begin{verbatim} +def grow_rectangle(rect, dwidth, dheight): + rect.width += dwidth + rect.height += dheight +\end{verbatim} +% +Here is an example that demonstrates the effect: + +\begin{verbatim} +>>> box.width, box.height +(150.0, 300.0) +>>> grow_rectangle(box, 50, 100) +>>> box.width, box.height +(200.0, 400.0) +\end{verbatim} +% +Inside the function, {\tt rect} is an +alias for {\tt box}, so when the function modifies {\tt rect}, +{\tt box} changes. + +As an exercise, write a function named \verb"move_rectangle" that takes +a Rectangle and two numbers named {\tt dx} and {\tt dy}. It +should change the location of the rectangle by adding {\tt dx} +to the {\tt x} coordinate of {\tt corner} and adding {\tt dy} +to the {\tt y} coordinate of {\tt corner}. + + +\section{Copying} +\label{copying} +\index{aliasing} + +Aliasing can make a program difficult to read because changes +in one place might have unexpected effects in another place. +It is hard to keep track of all the variables that might refer +to a given object. +\index{copying objects} +\index{object!copying} +\index{copy module} +\index{module!copy} + +Copying an object is often an alternative to aliasing. +The {\tt copy} module contains a function called {\tt copy} that +can duplicate any object: + +\begin{verbatim} +>>> p1 = Point() +>>> p1.x = 3.0 +>>> p1.y = 4.0 + +>>> import copy +>>> p2 = copy.copy(p1) +\end{verbatim} +% +{\tt p1} and {\tt p2} contain the same data, but they are +not the same Point. + +\begin{verbatim} +>>> print_point(p1) +(3, 4) +>>> print_point(p2) +(3, 4) +>>> p1 is p2 +False +>>> p1 == p2 +False +\end{verbatim} +% +The {\tt is} operator indicates that {\tt p1} and {\tt p2} are not the +same object, which is what we expected. But you might have expected +{\tt ==} to yield {\tt True} because these points contain the same +data. In that case, you will be disappointed to learn that for +instances, the default behavior of the {\tt ==} operator is the same +as the {\tt is} operator; it checks object identity, not object +equivalence. That's because for programmer-defined types, Python doesn't +know what should be considered equivalent. At least, not yet. +\index{is operator} +\index{operator!is} +\index{identity} +\index{equivalence} + +If you use {\tt copy.copy} to duplicate a Rectangle, you will find +that it copies the Rectangle object but not the embedded Point. +\index{embedded object!copying} + +\begin{verbatim} +>>> box2 = copy.copy(box) +>>> box2 is box +False +>>> box2.corner is box.corner +True +\end{verbatim} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/rectangle2.pdf}} +\caption{Object diagram.} +\label{fig.rectangle2} +\end{figure} + +Figure~\ref{fig.rectangle2} shows what the object diagram looks like. +\index{state diagram} +\index{diagram!state} +\index{object diagram} +\index{diagram!object} +This operation is called a {\bf shallow copy} because it copies the +object and any references it contains, but not the embedded objects. +\index{shallow copy} +\index{copy!shallow} + +For most applications, this is not what you want. In this example, +invoking \verb"grow_rectangle" on one of the Rectangles would not +affect the other, but invoking \verb"move_rectangle" on either would +affect both! This behavior is confusing and error-prone. +\index{deep copy} +\index{copy!deep} + +Fortunately, the {\tt copy} module provides a method named {\tt +deepcopy} that copies not only the object but also +the objects it refers to, and the objects {\em they} refer to, +and so on. +You will not be surprised to learn that this operation is +called a {\bf deep copy}. +\index{deepcopy function} +\index{function!deepcopy} + +\begin{verbatim} +>>> box3 = copy.deepcopy(box) +>>> box3 is box +False +>>> box3.corner is box.corner +False +\end{verbatim} +% +{\tt box3} and {\tt box} are completely separate objects. + +As an exercise, write a version of \verb"move_rectangle" that creates and +returns a new Rectangle instead of modifying the old one. + + +\section{디버깅} +%Debugging +\label{hasattr} +\index{debugging} + +When you start working with objects, you are likely to encounter +some new exceptions. If you try to access an attribute +that doesn't exist, you get an {\tt AttributeError}: +\index{exception!AttributeError} +\index{AttributeError} + +\begin{verbatim} +>>> p = Point() +>>> p.x = 3 +>>> p.y = 4 +>>> p.z +AttributeError: Point instance has no attribute 'z' +\end{verbatim} +% +If you are not sure what type an object is, you can ask: +\index{type function} +\index{function!type} + +\begin{verbatim} +>>> type(p) + +\end{verbatim} +% +You can also use {\tt isinstance} to check whether an object +is an instance of a class: +\index{isinstance function} +\index{function!isinstance} + +\begin{verbatim} +>>> isinstance(p, Point) +True +\end{verbatim} +% +If you are not sure whether an object has a particular attribute, +you can use the built-in function {\tt hasattr}: +\index{hasattr function} +\index{function!hasattr} + +\begin{verbatim} +>>> hasattr(p, 'x') +True +>>> hasattr(p, 'z') +False +\end{verbatim} +% +The first argument can be any object; the second argument is a {\em +string} that contains the name of the attribute. +\index{attribute} + +You can also use a {\tt try} statement to see if the object has the +attributes you need: +\index{try statement} +\index{statement!try} + +\begin{verbatim} +try: + x = p.x +except AttributeError: + x = 0 +\end{verbatim} + +This approach can make it easier to write functions that work with +different types; more on that topic is +coming up in Section~\ref{polymorphism}. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[class:] A programmer-defined type. A class definition creates a new +class object. +\index{class} +\index{programmer-defined type} +\index{type!programmer-defined} + +\item[class object:] An object that contains information about a +programmer-defined type. The class object can be used to create instances +of the type. +\index{class object} +\index{object!class} + +\item[instance:] An object that belongs to a class. +\index{instance} + +\item[instantiate:] To create a new object. +\index{instantiate} + +\item[attribute:] One of the named values associated with an object. +\index{attribute!instance} +\index{instance attribute} + +\item[embedded object:] An object that is stored as an attribute +of another object. +\index{embedded object} +\index{object!embedded} + +\item[shallow copy:] To copy the contents of an object, including +any references to embedded objects; +implemented by the {\tt copy} function in the {\tt copy} module. +\index{shallow copy} + +\item[deep copy:] To copy the contents of an object as well as any +embedded objects, and any objects embedded in them, and so on; +implemented by the {\tt deepcopy} function in the {\tt copy} module. +\index{deep copy} + +\item[object diagram:] A diagram that shows objects, their +attributes, and the values of the attributes. +\index{object diagram} +\index{diagram!object} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +Write a definition for a class named {\tt Circle} with attributes +{\tt center} and {\tt radius}, where {\tt center} is a Point object +and radius is a number. + +Instantiate a Circle object that represents a circle with its center +at $(150, 100)$ and radius 75. + +Write a function named \verb"point_in_circle" that takes a Circle and +a Point and returns True if the Point lies in or on the boundary of +the circle. + +Write a function named \verb"rect_in_circle" that takes a Circle and a +Rectangle and returns True if the Rectangle lies entirely in or on the boundary +of the circle. + +Write a function named \verb"rect_circle_overlap" that takes a Circle +and a Rectangle and returns True if any of the corners of the Rectangle fall +inside the circle. Or as a more challenging version, return True if +any part of the Rectangle falls inside the circle. + +Solution: \url{http://thinkpython2.com/code/Circle.py}. + +\end{exercise} + + +\begin{exercise} + +Write a function called \verb"draw_rect" that takes a Turtle object +and a Rectangle and uses the Turtle to draw the Rectangle. See +Chapter~\ref{turtlechap} for examples using Turtle objects. + +Write a function called \verb"draw_circle" that takes a Turtle and +a Circle and draws the Circle. + +Solution: \url{http://thinkpython2.com/code/draw.py}. + +\end{exercise} + + + +\chapter{Classes and functions} +\label{time} + +Now that we know how to create new types, the next +step is to write functions that take programmer-defined objects +as parameters and return them as results. In this chapter I +also present ``functional programming style'' and two new +program development plans. + +Code examples from this chapter are available from +\url{http://thinkpython2.com/code/Time1.py}. +Solutions to the exercises are at +\url{http://thinkpython2.com/code/Time1_soln.py}. + + +\section{Time} +\label{isafter} + +As another example of a programmer-defined type, we'll define a class +called {\tt Time} that records the time of day. The class definition +looks like this: \index{programmer-defined type} +\index{type!programmer-defined} \index{Time class} \index{class!Time} + +\begin{verbatim} +class Time: + """Represents the time of day. + + attributes: hour, minute, second + """ +\end{verbatim} +% +We can create a new {\tt Time} object and assign +attributes for hours, minutes, and seconds: + +\begin{verbatim} +time = Time() +time.hour = 11 +time.minute = 59 +time.second = 30 +\end{verbatim} +% +The state diagram for the {\tt Time} object looks like Figure~\ref{fig.time}. +\index{state diagram} +\index{diagram!state} +\index{object diagram} +\index{diagram!object} + +As an exercise, write a function called \verb"print_time" that takes a +Time object and prints it in the form {\tt hour:minute:second}. +Hint: the format sequence \verb"'%.2d'" prints an integer using +at least two digits, including a leading zero if necessary. + +Write a boolean function called \verb"is_after" that +takes two Time objects, {\tt t1} and {\tt t2}, and +returns {\tt True} if {\tt t1} follows {\tt t2} chronologically and +{\tt False} otherwise. Challenge: don't use an {\tt if} statement. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/time.pdf}} +\caption{Object diagram.} +\label{fig.time} +\end{figure} + + +\section{Pure functions} +\index{prototype and patch} +\index{development plan!prototype and patch} + +In the next few sections, we'll write two functions that add time +values. They demonstrate two kinds of functions: pure functions and +modifiers. They also demonstrate a development plan I'll call {\bf + prototype and patch}, which is a way of tackling a complex problem +by starting with a simple prototype and incrementally dealing with the +complications. + +Here is a simple prototype of \verb"add_time": + +\begin{verbatim} +def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + return sum +\end{verbatim} +% +The function creates a new {\tt Time} object, initializes its +attributes, and returns a reference to the new object. This is called +a {\bf pure function} because it does not modify any of the objects +passed to it as arguments and it has no effect, +like displaying a value or getting user input, +other than returning a value. +\index{pure function} +\index{function type!pure} + +To test this function, I'll create two Time objects: {\tt start} +contains the start time of a movie, like {\em Monty Python and the +Holy Grail}, and {\tt duration} contains the run time of the movie, +which is one hour 35 minutes. +\index{Monty Python and the Holy Grail} + +\verb"add_time" figures out when the movie will be done. + +\begin{verbatim} +>>> start = Time() +>>> start.hour = 9 +>>> start.minute = 45 +>>> start.second = 0 + +>>> duration = Time() +>>> duration.hour = 1 +>>> duration.minute = 35 +>>> duration.second = 0 + +>>> done = add_time(start, duration) +>>> print_time(done) +10:80:00 +\end{verbatim} +% +The result, {\tt 10:80:00} might not be what you were hoping +for. The problem is that this function does not deal with cases where the +number of seconds or minutes adds up to more than sixty. When that +happens, we have to ``carry'' the extra seconds into the minute column +or the extra minutes into the hour column. +\index{carrying, addition with} + +Here's an improved version: + +\begin{verbatim} +def add_time(t1, t2): + sum = Time() + sum.hour = t1.hour + t2.hour + sum.minute = t1.minute + t2.minute + sum.second = t1.second + t2.second + + if sum.second >= 60: + sum.second -= 60 + sum.minute += 1 + + if sum.minute >= 60: + sum.minute -= 60 + sum.hour += 1 + + return sum +\end{verbatim} +% +Although this function is correct, it is starting to get big. +We will see a shorter alternative later. + + +\section{Modifiers} +\label{increment} +\index{modifier} +\index{function type!modifier} + +Sometimes it is useful for a function to modify the objects it gets as +parameters. In that case, the changes are visible to the caller. +Functions that work this way are called {\bf modifiers}. +\index{increment} + +{\tt increment}, which adds a given number of seconds to a {\tt Time} +object, can be written naturally as a +modifier. Here is a rough draft: + +\begin{verbatim} +def increment(time, seconds): + time.second += seconds + + if time.second >= 60: + time.second -= 60 + time.minute += 1 + + if time.minute >= 60: + time.minute -= 60 + time.hour += 1 +\end{verbatim} +% +The first line performs the basic operation; the remainder deals +with the special cases we saw before. +\index{special case} + +Is this function correct? What happens if {\tt seconds} +is much greater than sixty? + +In that case, it is not enough to carry once; we have to keep doing it +until {\tt time.second} is less than sixty. One solution is to +replace the {\tt if} statements with {\tt while} statements. That +would make the function correct, but not very efficient. As an +exercise, write a correct version of {\tt increment} that doesn't +contain any loops. + +Anything that can be done with modifiers can also be done with pure +functions. In fact, some programming languages only allow pure +functions. There is some evidence that programs that use pure +functions are faster to develop and less error-prone than programs +that use modifiers. But modifiers are convenient at times, +and functional programs tend to be less efficient. + +In general, I recommend that you write pure functions whenever it is +reasonable and resort to modifiers only if there is a compelling +advantage. This approach might be called a {\bf functional +programming style}. +\index{functional programming style} + +As an exercise, write a ``pure'' version of {\tt increment} that +creates and returns a new Time object rather than modifying the +parameter. + + +\section{Prototyping versus planning} +\label{prototype} +\index{prototype and patch} +\index{development plan!prototype and patch} +\index{planned development} +\index{development plan!designed} + +The development plan I am demonstrating is called ``prototype and +patch''. For each function, I wrote a prototype that performed the +basic calculation and then tested it, patching errors along the +way. + +This approach can be effective, especially if you don't yet have a +deep understanding of the problem. But incremental corrections can +generate code that is unnecessarily complicated---since it deals with +many special cases---and unreliable---since it is hard to know if you +have found all the errors. + +An alternative is {\bf designed development}, in which high-level +insight into the problem can make the programming much easier. In +this case, the insight is that a Time object is really a three-digit +number in base 60 (see \url{http://en.wikipedia.org/wiki/Sexagesimal}.)! The +{\tt second} attribute is the ``ones column'', the {\tt minute} +attribute is the ``sixties column'', and the {\tt hour} attribute is +the ``thirty-six hundreds column''. +\index{sexagesimal} + +When we wrote \verb"add_time" and {\tt increment}, we were effectively +doing addition in base 60, which is why we had to carry from one +column to the next. +\index{carrying, addition with} + +This observation suggests another approach to the whole problem---we +can convert Time objects to integers and take advantage of the fact +that the computer knows how to do integer arithmetic. + +Here is a function that converts Times to integers: + +\begin{verbatim} +def time_to_int(time): + minutes = time.hour * 60 + time.minute + seconds = minutes * 60 + time.second + return seconds +\end{verbatim} +% +And here is a function that converts an integer to a Time +(recall that {\tt divmod} divides the first argument by the second +and returns the quotient and remainder as a tuple). +\index{divmod} + +\begin{verbatim} +def int_to_time(seconds): + time = Time() + minutes, time.second = divmod(seconds, 60) + time.hour, time.minute = divmod(minutes, 60) + return time +\end{verbatim} +% +You might have to think a bit, and run some tests, to convince +yourself that these functions are correct. One way to test them is to +check that \verb"time_to_int(int_to_time(x)) == x" for many values of +{\tt x}. This is an example of a consistency check. +\index{consistency check} + +Once you are convinced they are correct, you can use them to +rewrite \verb"add_time": + +\begin{verbatim} +def add_time(t1, t2): + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) +\end{verbatim} +% +This version is shorter than the original, and easier to verify. As +an exercise, rewrite {\tt increment} using \verb"time_to_int" and +\verb"int_to_time". + +In some ways, converting from base 60 to base 10 and back is harder +than just dealing with times. Base conversion is more abstract; our +intuition for dealing with time values is better. + +But if we have the insight to treat times as base 60 numbers and make +the investment of writing the conversion functions (\verb"time_to_int" +and \verb"int_to_time"), we get a program that is shorter, easier to +read and debug, and more reliable. + +It is also easier to add features later. For example, imagine +subtracting two Times to find the duration between them. The +naive approach would be to implement subtraction with borrowing. +Using the conversion functions would be easier and more likely to be +correct. +\index{subtraction with borrowing} +\index{borrowing, subtraction with} +\index{generalization} + +Ironically, sometimes making a problem harder (or more general) makes it +easier (because there are fewer special cases and fewer opportunities +for error). + + +\section{디버깅} +%Debugging +\index{debugging} + +A Time object is well-formed if the values of {\tt minute} and {\tt +second} are between 0 and 60 (including 0 but not 60) and if +{\tt hour} is positive. {\tt hour} and {\tt minute} should be +integral values, but we might allow {\tt second} to have a +fraction part. +\index{invariant} + +Requirements like these are called {\bf invariants} because +they should always be true. To put it a different way, if they +are not true, something has gone wrong. + +Writing code to check invariants can help detect errors +and find their causes. For example, you might have a function +like \verb"valid_time" that takes a Time object and returns +{\tt False} if it violates an invariant: + +\begin{verbatim} +def valid_time(time): + if time.hour < 0 or time.minute < 0 or time.second < 0: + return False + if time.minute >= 60 or time.second >= 60: + return False + return True +\end{verbatim} +% +At the beginning of each function you could check the +arguments to make sure they are valid: +\index{raise statement} +\index{statement!raise} + +\begin{verbatim} +def add_time(t1, t2): + if not valid_time(t1) or not valid_time(t2): + raise ValueError('invalid Time object in add_time') + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) +\end{verbatim} +% +Or you could use an {\bf assert statement}, which checks a given invariant +and raises an exception if it fails: +\index{assert statement} +\index{statement!assert} + +\begin{verbatim} +def add_time(t1, t2): + assert valid_time(t1) and valid_time(t2) + seconds = time_to_int(t1) + time_to_int(t2) + return int_to_time(seconds) +\end{verbatim} +% +{\tt assert} statements are useful because they distinguish +code that deals with normal conditions from code +that checks for errors. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[prototype and patch:] A development plan that involves +writing a rough draft of a program, testing, and correcting errors as +they are found. +\index{prototype and patch} + +\item[designed development:] A development plan that involves +high-level insight into the problem and more planning than incremental +development or prototype development. +\index{designed development} + +\item[pure function:] A function that does not modify any of the objects it +receives as arguments. Most pure functions are fruitful. +\index{pure function} + +\item[modifier:] A function that changes one or more of the objects it + receives as arguments. Most modifiers are void; that is, they + return {\tt None}. \index{modifier} + +\item[functional programming style:] A style of program design in which the +majority of functions are pure. +\index{functional programming style} + +\item[invariant:] A condition that should always be true during the +execution of a program. +\index{invariant} + +\item[assert statement:] A statement that check a condition and raises +an exception if it fails. +\index{assert statement} +\index{statement!assert} + +\end{description} + + +\section{연습 문제} +%Exercises + +Code examples from this chapter are available from +\url{http://thinkpython2.com/code/Time1.py}; solutions to the +exercises are available from \url{http://thinkpython2.com/code/Time1_soln.py}. + +\begin{exercise} + +Write a function called \verb"mul_time" that takes a Time object +and a number and returns a new Time object that contains +the product of the original Time and the number. + +Then use \verb"mul_time" to write a function that takes a Time +object that represents the finishing time in a race, and a number +that represents the distance, and returns a Time object that represents +the average pace (time per mile). +\index{running pace} + +\end{exercise} + + +\begin{exercise} +\index{datetime module} +\index{module!datetime} + +The {\tt datetime} module provides {\tt time} objects +that are similar to the Time objects in this chapter, but +they provide a rich set of methods and operators. Read the +documentation at \url{http://docs.python.org/3/library/datetime.html}. + +\begin{enumerate} + +\item Use the {\tt datetime} module to write a program that gets the + current date and prints the day of the week. + +\item Write a program that takes a birthday as input and prints the + user's age and the number of days, hours, minutes and seconds until + their next birthday. +\index{birthday} + +\item For two people born on different days, there is a day when one + is twice as old as the other. That's their Double Day. Write a + program that takes two birthdays and computes their Double Day. + +\item For a little more challenge, write the more general version that + computes the day when one person is $n$ times older than the other. +\index{Double Day} + +\end{enumerate} + +Solution: \url{http://thinkpython2.com/code/double.py} + +\end{exercise} + + +\chapter{Classes and methods} + +Although we are using some of Python's object-oriented features, +the programs from the last two chapters are not really +object-oriented because they don't represent the relationships +between programmer-defined types and the functions that operate +on them. The next step is to transform those functions into +methods that make the relationships explicit. + +Code examples from this chapter are available from +\url{http://thinkpython2.com/code/Time2.py}, and solutions +to the exercises are in \url{http://thinkpython2.com/code/Point2_soln.py}. + + +\section{Object-oriented features} +\index{object-oriented programming} + +Python is an {\bf object-oriented programming language}, which means +that it provides features that support object-oriented +programming, which has these defining characteristics: + +\begin{itemize} + +\item Programs include class and method definitions. + +\item Most of the computation is expressed in terms of operations on + objects. + +\item Objects often represent things +in the real world, and methods often +correspond to the ways things in the real world interact. + +\end{itemize} + +For example, the {\tt Time} class defined in Chapter~\ref{time} +corresponds to the way people record the time of day, and the +functions we defined correspond to the kinds of things people do with +times. Similarly, the {\tt Point} and {\tt Rectangle} classes +in Chapter~\ref{clobjects} +correspond to the mathematical concepts of a point and a rectangle. + +So far, we have not taken advantage of the features Python provides to +support object-oriented programming. These +features are not strictly necessary; most of them provide +alternative syntax for things we have already done. But in many cases, +the alternative is more concise and more accurately conveys the +structure of the program. + +For example, in {\tt Time1.py} there is no obvious +connection between the class definition and the function definitions +that follow. With some examination, it is apparent that every function +takes at least one {\tt Time} object as an argument. +\index{method} +\index{function} + +This observation is the motivation for {\bf methods}; a method is +a function that is associated with a particular class. +We have seen methods for strings, lists, dictionaries and tuples. +In this chapter, we will define methods for programmer-defined types. +\index{syntax} +\index{semantics} +\index{programmer-defined type} +\index{type!programmer-defined} + +Methods are semantically the same as functions, but there are +two syntactic differences: + +\begin{itemize} + +\item Methods are defined inside a class definition in order +to make the relationship between the class and the method explicit. + +\item The syntax for invoking a method is different from the +syntax for calling a function. + +\end{itemize} + +In the next few sections, we will take the functions from the previous +two chapters and transform them into methods. This transformation is +purely mechanical; you can do it by following a sequence of +steps. If you are comfortable converting from one form to another, +you will be able to choose the best form for whatever you are doing. + + +\section{Printing objects} +\index{object!printing} + +In Chapter~\ref{time}, we defined a class named +{\tt Time} and in Section~\ref{isafter}, you +wrote a function named \verb"print_time": + +\begin{verbatim} +class Time: + """Represents the time of day.""" + +def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) +\end{verbatim} +% +To call this function, you have to pass a {\tt Time} object as an +argument: + +\begin{verbatim} +>>> start = Time() +>>> start.hour = 9 +>>> start.minute = 45 +>>> start.second = 00 +>>> print_time(start) +09:45:00 +\end{verbatim} +% +To make \verb"print_time" a method, all we have to do is +move the function definition inside the class definition. Notice +the change in indentation. +\index{indentation} + +\begin{verbatim} +class Time: + def print_time(time): + print('%.2d:%.2d:%.2d' % (time.hour, time.minute, time.second)) +\end{verbatim} +% +Now there are two ways to call \verb"print_time". The first +(and less common) way is to use function syntax: +\index{function syntax} +\index{dot notation} + +\begin{verbatim} +>>> Time.print_time(start) +09:45:00 +\end{verbatim} +% +In this use of dot notation, {\tt Time} is the name of the class, +and \verb"print_time" is the name of the method. {\tt start} is +passed as a parameter. + +The second (and more concise) way is to use method syntax: +\index{method syntax} + +\begin{verbatim} +>>> start.print_time() +09:45:00 +\end{verbatim} +% +In this use of dot notation, \verb"print_time" is the name of the +method (again), and {\tt start} is the object the method is +invoked on, which is called the {\bf subject}. Just as the +subject of a sentence is what the sentence is about, the subject +of a method invocation is what the method is about. +\index{subject} + +Inside the method, the subject is assigned to the first +parameter, so in this case {\tt start} is assigned +to {\tt time}. +\index{self (parameter name)} +\index{parameter!self} + +By convention, the first parameter of a method is +called {\tt self}, so it would be more common to write +\verb"print_time" like this: + +\begin{verbatim} +class Time: + def print_time(self): + print('%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)) +\end{verbatim} +% +The reason for this convention is an implicit metaphor: +\index{metaphor, method invocation} + +\begin{itemize} + +\item The syntax for a function call, \verb"print_time(start)", + suggests that the function is the active agent. It says something + like, ``Hey \verb"print_time"! Here's an object for you to print.'' + +\item In object-oriented programming, the objects are the active + agents. A method invocation like \verb"start.print_time()" says + ``Hey {\tt start}! Please print yourself.'' + +\end{itemize} + +This change in perspective might be more polite, but it is not obvious +that it is useful. In the examples we have seen so far, it may not +be. But sometimes shifting responsibility from the functions onto the +objects makes it possible to write more versatile functions (or +methods), and makes it easier to maintain and reuse code. + +As an exercise, rewrite \verb"time_to_int" (from +Section~\ref{prototype}) as a method. You might be tempted to +rewrite \verb"int_to_time" as a method, too, but that doesn't +really make sense because there would be no object to invoke +it on. + + +\section{Another example} +\index{increment} + +Here's a version of {\tt increment} (from Section~\ref{increment}) +rewritten as a method: + +\begin{verbatim} +# inside class Time: + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) +\end{verbatim} +% +This version assumes that \verb"time_to_int" is written +as a method. Also, note that +it is a pure function, not a modifier. + +Here's how you would invoke {\tt increment}: + +\begin{verbatim} +>>> start.print_time() +09:45:00 +>>> end = start.increment(1337) +>>> end.print_time() +10:07:17 +\end{verbatim} +% +The subject, {\tt start}, gets assigned to the first parameter, +{\tt self}. The argument, {\tt 1337}, gets assigned to the +second parameter, {\tt seconds}. + +This mechanism can be confusing, especially if you make an error. +For example, if you invoke {\tt increment} with two arguments, you +get: +\index{exception!TypeError} +\index{TypeError} + +\begin{verbatim} +>>> end = start.increment(1337, 460) +TypeError: increment() takes 2 positional arguments but 3 were given +\end{verbatim} +% +The error message is initially confusing, because there are +only two arguments in parentheses. But the subject is also +considered an argument, so all together that's three. + +By the way, a {\bf positional argument} is an argument that +doesn't have a parameter name; that is, it is not a keyword +argument. In this function call: +\index{positional argument} +\index{argument!positional} + +\begin{verbatim} +sketch(parrot, cage, dead=True) +\end{verbatim} + +{\tt parrot} and {\tt cage} are positional, and {\tt dead} is +a keyword argument. + + +\section{A more complicated example} + +Rewriting \verb"is_after" (from Section~\ref{isafter}) is slightly +more complicated because it takes two Time objects as parameters. In +this case it is conventional to name the first parameter {\tt self} +and the second parameter {\tt other}: \index{other (parameter name)} +\index{parameter!other} + +\begin{verbatim} +# inside class Time: + + def is_after(self, other): + return self.time_to_int() > other.time_to_int() +\end{verbatim} +% +To use this method, you have to invoke it on one object and pass +the other as an argument: + +\begin{verbatim} +>>> end.is_after(start) +True +\end{verbatim} +% +One nice thing about this syntax is that it almost reads +like English: ``end is after start?'' + + +\section{The init method} +\index{init method} +\index{method!init} + +The init method (short for ``initialization'') is +a special method that gets invoked when an object is instantiated. +Its full name is \verb"__init__" (two underscore characters, +followed by {\tt init}, and then two more underscores). An +init method for the {\tt Time} class might look like this: + +\begin{verbatim} +# inside class Time: + + def __init__(self, hour=0, minute=0, second=0): + self.hour = hour + self.minute = minute + self.second = second +\end{verbatim} +% +It is common for the parameters of \verb"__init__" +to have the same names as the attributes. The statement + +\begin{verbatim} + self.hour = hour +\end{verbatim} +% +stores the value of the parameter {\tt hour} as an attribute +of {\tt self}. +\index{optional parameter} +\index{parameter!optional} +\index{default value} +\index{override} + +The parameters are optional, so if you call {\tt Time} with +no arguments, you get the default values. + +\begin{verbatim} +>>> time = Time() +>>> time.print_time() +00:00:00 +\end{verbatim} +% +If you provide one argument, it overrides {\tt hour}: + +\begin{verbatim} +>>> time = Time (9) +>>> time.print_time() +09:00:00 +\end{verbatim} +% +If you provide two arguments, they override {\tt hour} and +{\tt minute}. + +\begin{verbatim} +>>> time = Time(9, 45) +>>> time.print_time() +09:45:00 +\end{verbatim} +% +And if you provide three arguments, they override all three +default values. + +As an exercise, write an init method for the {\tt Point} class that takes +{\tt x} and {\tt y} as optional parameters and assigns +them to the corresponding attributes. +\index{Point class} +\index{class!Point} + + +\section{The {\tt \_\_str\_\_} method} +\index{str method@\_\_str\_\_ method} +\index{method!\_\_str\_\_} + +\verb"__str__" is a special method, like \verb"__init__", +that is supposed to return a string representation of an object. +\index{string representation} + +For example, here is a {\tt str} method for Time objects: + +\begin{verbatim} +# inside class Time: + + def __str__(self): + return '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second) +\end{verbatim} +% +When you {\tt print} an object, Python invokes the {\tt str} method: +\index{print statement} +\index{statement!print} + +\begin{verbatim} +>>> time = Time(9, 45) +>>> print(time) +09:45:00 +\end{verbatim} +% +When I write a new class, I almost always start by writing +\verb"__init__", which makes it easier to instantiate objects, and +\verb"__str__", which is useful for debugging. + +As an exercise, write a {\tt str} method for the {\tt Point} class. +Create a Point object and print it. + + +\section{Operator overloading} +\label{operator.overloading} + +By defining other special methods, you can specify the behavior +of operators on programmer-defined types. For example, if you define +a method named \verb"__add__" for the {\tt Time} class, you can use the +{\tt +} operator on Time objects. +\index{programmer-defined type} +\index{type!programmer-defined} + +Here is what the definition might look like: +\index{add method} +\index{method!add} + +\begin{verbatim} +# inside class Time: + + def __add__(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) +\end{verbatim} +% +And here is how you could use it: + +\begin{verbatim} +>>> start = Time(9, 45) +>>> duration = Time(1, 35) +>>> print(start + duration) +11:20:00 +\end{verbatim} +% +When you apply the {\tt +} operator to Time objects, Python invokes +\verb"__add__". When you print the result, Python invokes +\verb"__str__". So there is a lot happening behind the scenes! +\index{operator overloading} + +Changing the behavior of an operator so that it works with +programmer-defined types is called {\bf operator overloading}. For every +operator in Python there is a corresponding special method, like +\verb"__add__". For more details, see +\url{http://docs.python.org/3/reference/datamodel.html#specialnames}. + +As an exercise, write an {\tt add} method for the Point class. + + +\section{Type-based dispatch} + +In the previous section we added two Time objects, but you +also might want to add an integer to a Time object. The +following is a version of \verb"__add__" +that checks the type of {\tt other} and invokes either +\verb"add_time" or {\tt increment}: + +\begin{verbatim} +# inside class Time: + + def __add__(self, other): + if isinstance(other, Time): + return self.add_time(other) + else: + return self.increment(other) + + def add_time(self, other): + seconds = self.time_to_int() + other.time_to_int() + return int_to_time(seconds) + + def increment(self, seconds): + seconds += self.time_to_int() + return int_to_time(seconds) +\end{verbatim} +% +The built-in function {\tt isinstance} takes a value and a +class object, and returns {\tt True} if the value is an instance +of the class. +\index{isinstance function} +\index{function!isinstance} + +If {\tt other} is a Time object, \verb"__add__" invokes +\verb"add_time". Otherwise it assumes that the parameter +is a number and invokes {\tt increment}. This operation is +called a {\bf type-based dispatch} because it dispatches the +computation to different methods based on the type of the +arguments. +\index{type-based dispatch} +\index{dispatch, type-based} + +Here are examples that use the {\tt +} operator with different +types: + +\begin{verbatim} +>>> start = Time(9, 45) +>>> duration = Time(1, 35) +>>> print(start + duration) +11:20:00 +>>> print(start + 1337) +10:07:17 +\end{verbatim} +% +Unfortunately, this implementation of addition is not commutative. +If the integer is the first operand, you get +\index{commutativity} + +\begin{verbatim} +>>> print(1337 + start) +TypeError: unsupported operand type(s) for +: 'int' and 'instance' +\end{verbatim} +% +The problem is, instead of asking the Time object to add an integer, +Python is asking an integer to add a Time object, and it doesn't know +how. But there is a clever solution for this problem: the +special method \verb"__radd__", which stands for ``right-side add''. +This method is invoked when a Time object appears on the right side of +the {\tt +} operator. Here's the definition: +\index{radd method} +\index{method!radd} + +\begin{verbatim} +# inside class Time: + + def __radd__(self, other): + return self.__add__(other) +\end{verbatim} +% +And here's how it's used: + +\begin{verbatim} +>>> print(1337 + start) +10:07:17 +\end{verbatim} +% + +As an exercise, write an {\tt add} method for Points that works with +either a Point object or a tuple: + +\begin{itemize} + +\item If the second operand is a Point, the method should return a new +Point whose $x$ coordinate is the sum of the $x$ coordinates of the +operands, and likewise for the $y$ coordinates. + +\item If the second operand is a tuple, the method should add the +first element of the tuple to the $x$ coordinate and the second +element to the $y$ coordinate, and return a new Point with the result. + +\end{itemize} + + + + +\section{Polymorphism} +\label{polymorphism} + +Type-based dispatch is useful when it is necessary, but (fortunately) +it is not always necessary. Often you can avoid it by writing functions +that work correctly for arguments with different types. +\index{type-based dispatch} +\index{dispatch!type-based} + +Many of the functions we wrote for strings also +work for other sequence types. +For example, in Section~\ref{histogram} +we used {\tt histogram} to count the number of times each letter +appears in a word. + +\begin{verbatim} +def histogram(s): + d = dict() + for c in s: + if c not in d: + d[c] = 1 + else: + d[c] = d[c]+1 + return d +\end{verbatim} +% +This function also works for lists, tuples, and even dictionaries, +as long as the elements of {\tt s} are hashable, so they can be used +as keys in {\tt d}. + +\begin{verbatim} +>>> t = ['spam', 'egg', 'spam', 'spam', 'bacon', 'spam'] +>>> histogram(t) +{'bacon': 1, 'egg': 1, 'spam': 4} +\end{verbatim} +% +Functions that work with several types are called {\bf polymorphic}. +Polymorphism can facilitate code reuse. For example, the built-in +function {\tt sum}, which adds the elements of a sequence, works +as long as the elements of the sequence support addition. +\index{polymorphism} + +Since Time objects provide an {\tt add} method, they work +with {\tt sum}: + +\begin{verbatim} +>>> t1 = Time(7, 43) +>>> t2 = Time(7, 41) +>>> t3 = Time(7, 37) +>>> total = sum([t1, t2, t3]) +>>> print(total) +23:01:00 +\end{verbatim} +% +In general, if all of the operations inside a function +work with a given type, the function works with that type. + +The best kind of polymorphism is the unintentional kind, where +you discover that a function you already wrote can be +applied to a type you never planned for. + + +\section{디버깅} +%Debugging +\index{debugging} + +It is legal to add attributes to objects at any point in the execution +of a program, but if you have objects with the same type that don't +have the same attributes, it is easy to make mistakes. +It is considered a good idea to +initialize all of an object's attributes in the init method. +\index{init method} +\index{attribute!initializing} + +If you are not sure whether an object has a particular attribute, you +can use the built-in function {\tt hasattr} (see Section~\ref{hasattr}). +\index{hasattr function} +\index{function!hasattr} +\index{dict attribute@\_\_dict\_\_ attribute} +\index{attribute!\_\_dict\_\_} + +Another way to access attributes is the built-in function {\tt vars}, +which takes an object and returns a dictionary that maps from +attribute names (as strings) to their values: + +\begin{verbatim} +>>> p = Point(3, 4) +>>> vars(p) +{'y': 4, 'x': 3} +\end{verbatim} +% +For purposes of debugging, you might find it useful to keep this +function handy: + +\begin{verbatim} +def print_attributes(obj): + for attr in vars(obj): + print(attr, getattr(obj, attr)) +\end{verbatim} +% +\verb"print_attributes" traverses the dictionary +and prints each attribute name and its corresponding value. +\index{traversal!dictionary} +\index{dictionary!traversal} + +The built-in function {\tt getattr} takes an object and an attribute +name (as a string) and returns the attribute's value. +\index{getattr function} +\index{function!getattr} + + +\section{Interface and implementation} + +One of the goals of object-oriented design is to make software more +maintainable, which means that you can keep the program working when +other parts of the system change, and modify the program to meet new +requirements. +\index{interface} +\index{implementation} +\index{maintainable} +\index{object-oriented design} + +A design principle that helps achieve that goal is to keep +interfaces separate from implementations. For objects, that means +that the methods a class provides should not depend on how the +attributes are represented. +\index{attribute} + +For example, in this chapter we developed a class that represents +a time of day. Methods provided by this class include +\verb"time_to_int", \verb"is_after", and \verb"add_time". + +We could implement those methods in several ways. The details of the +implementation depend on how we represent time. In this chapter, the +attributes of a {\tt Time} object are {\tt hour}, {\tt minute}, and +{\tt second}. + +As an alternative, we could replace these attributes with +a single integer representing the number of seconds +since midnight. This implementation would make some methods, +like \verb"is_after", easier to write, but it makes other methods +harder. + +After you deploy a new class, you might discover a better +implementation. If other parts of the program are using your +class, it might be time-consuming and error-prone to change the +interface. + +But if you designed the interface carefully, you can +change the implementation without changing the interface, which +means that other parts of the program don't have to change. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[object-oriented language:] A language that provides features, + such as programmer-defined types and methods, that facilitate + object-oriented programming. +\index{object-oriented language} + +\item[object-oriented programming:] A style of programming in which +data and the operations that manipulate it are organized into classes +and methods. +\index{object-oriented programming} + +\item[method:] A function that is defined inside a class definition and +is invoked on instances of that class. +\index{method} + +\item[subject:] The object a method is invoked on. +\index{subject} + +\item[positional argument:] An argument that does not include +a parameter name, so it is not a keyword argument. +\index{positional argument} +\index{argument!positional} + +\item[operator overloading:] Changing the behavior of an operator like +{\tt +} so it works with a programmer-defined type. +\index{overloading} +\index{operator!overloading} + +\item[type-based dispatch:] A programming pattern that checks the type +of an operand and invokes different functions for different types. +\index{type-based dispatch} + +\item[polymorphic:] Pertaining to a function that can work with more + than one type. +\index{polymorphism} + +\item[information hiding:] The principle that the interface provided +by an object should not depend on its implementation, in particular +the representation of its attributes. +\index{information hiding} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +Download the code from this chapter from +\url{http://thinkpython2.com/code/Time2.py}. Change the attributes of + {\tt Time} to be a single integer representing seconds since + midnight. Then modify the methods (and the function + \verb"int_to_time") to work with the new implementation. You + should not have to modify the test code in {\tt main}. When you + are done, the output should be the same as before. Solution: + \url{http://thinkpython2.com/code/Time2_soln.py}. + +\end{exercise} + + +\begin{exercise} +\label{kangaroo} +\index{default value!avoiding mutable} +\index{mutable object, as default value} +\index{worst bug} +\index{bug!worst} +\index{Kangaroo class} +\index{class!Kangaroo} + +This exercise is a cautionary tale about one of the most +common, and difficult to find, errors in Python. +Write a definition for a class named {\tt Kangaroo} with the following +methods: + +\begin{enumerate} + +\item An \verb"__init__" method that initializes an attribute named +\verb"pouch_contents" to an empty list. + +\item A method named \verb"put_in_pouch" that takes an object +of any type and adds it to \verb"pouch_contents". + +\item A \verb"__str__" method that returns a string representation +of the Kangaroo object and the contents of the pouch. + +\end{enumerate} +% +Test your code +by creating two {\tt Kangaroo} objects, assigning them to variables +named {\tt kanga} and {\tt roo}, and then adding {\tt roo} to the +contents of {\tt kanga}'s pouch. + +Download \url{http://thinkpython2.com/code/BadKangaroo.py}. It contains +a solution to the previous problem with one big, nasty bug. +Find and fix the bug. + +If you get stuck, you can download +\url{http://thinkpython2.com/code/GoodKangaroo.py}, which explains the +problem and demonstrates a solution. +\index{aliasing} +\index{embedded object} +\index{object!embedded} + +\end{exercise} + + + +\chapter{Inheritance} + +The language feature most often associated with object-oriented +programming is {\bf inheritance}. Inheritance is the ability to +define a new class that is a modified version of an existing class. +In this chapter I demonstrate inheritance using classes that represent +playing cards, decks of cards, and poker hands. +\index{deck} +\index{card, playing} +\index{poker} + +If you don't play +poker, you can read about it at +\url{http://en.wikipedia.org/wiki/Poker}, but you don't have to; I'll +tell you what you need to know for the exercises. + +Code examples from +this chapter are available from +\url{http://thinkpython2.com/code/Card.py}. + + +\section{Card objects} + +There are fifty-two cards in a deck, each of which belongs to one of +four suits and one of thirteen ranks. The suits are Spades, Hearts, +Diamonds, and Clubs (in descending order in bridge). The ranks are +Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King. Depending on +the game that you are playing, an Ace may be higher than King +or lower than 2. +\index{rank} +\index{suit} + +If we want to define a new object to represent a playing card, it is +obvious what the attributes should be: {\tt rank} and +{\tt suit}. It is not as obvious what type the attributes +should be. One possibility is to use strings containing words like +\verb"'Spade'" for suits and \verb"'Queen'" for ranks. One problem with +this implementation is that it would not be easy to compare cards to +see which had a higher rank or suit. +\index{encode} +\index{encrypt} +\index{map to} +\index{representation} + +An alternative is to use integers to {\bf encode} the ranks and suits. +In this context, ``encode'' means that we are going to define a mapping +between numbers and suits, or between numbers and ranks. This +kind of encoding is not meant to be a secret (that +would be ``encryption''). + +\newcommand{\mymapsto}{$\mapsto$} + +For example, this table shows the suits and the corresponding integer +codes: + +\begin{tabular}{l c l} +Spades & \mymapsto & 3 \\ +Hearts & \mymapsto & 2 \\ +Diamonds & \mymapsto & 1 \\ +Clubs & \mymapsto & 0 +\end{tabular} + +This code makes it easy to compare cards; because higher suits map to +higher numbers, we can compare suits by comparing their codes. + +The mapping for ranks is fairly obvious; each of the numerical ranks +maps to the corresponding integer, and for face cards: + +\begin{tabular}{l c l} +Jack & \mymapsto & 11 \\ +Queen & \mymapsto & 12 \\ +King & \mymapsto & 13 \\ +\end{tabular} + +I am using the \mymapsto~symbol to make it clear that these mappings +are not part of the Python program. They are part of the program +design, but they don't appear explicitly in the code. +\index{Card class} +\index{class!Card} + +The class definition for {\tt Card} looks like this: + +\begin{verbatim} +class Card: + """Represents a standard playing card.""" + + def __init__(self, suit=0, rank=2): + self.suit = suit + self.rank = rank +\end{verbatim} +% +As usual, the init method takes an optional +parameter for each attribute. The default card is +the 2 of Clubs. +\index{init method} +\index{method!init} + +To create a Card, you call {\tt Card} with the +suit and rank of the card you want. + +\begin{verbatim} +queen_of_diamonds = Card(1, 12) +\end{verbatim} +% + + +\section{Class attributes} +\label{class.attribute} +\index{class attribute} +\index{attribute!class} + +In order to print Card objects in a way that people can easily +read, we need a mapping from the integer codes to the corresponding +ranks and suits. A natural way to +do that is with lists of strings. We assign these lists to {\bf class +attributes}: + +\begin{verbatim} +# inside class Card: + + suit_names = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] + rank_names = [None, 'Ace', '2', '3', '4', '5', '6', '7', + '8', '9', '10', 'Jack', 'Queen', 'King'] + + def __str__(self): + return '%s of %s' % (Card.rank_names[self.rank], + Card.suit_names[self.suit]) +\end{verbatim} +% +Variables like \verb"suit_names" and \verb"rank_names", which are +defined inside a class but outside of any method, are called +class attributes because they are associated with the class object +{\tt Card}. +\index{instance attribute} +\index{attribute!instance} + +This term distinguishes them from variables like {\tt suit} and {\tt + rank}, which are called {\bf instance attributes} because they are +associated with a particular instance. +\index{dot notation} + +Both kinds of attribute are accessed using dot notation. For +example, in \verb"__str__", {\tt self} is a Card object, +and {\tt self.rank} is its rank. Similarly, {\tt Card} +is a class object, and \verb"Card.rank_names" is a +list of strings associated with the class. + +Every card has its own {\tt suit} and {\tt rank}, but there +is only one copy of \verb"suit_names" and \verb"rank_names". + +Putting it all together, the expression +\verb"Card.rank_names[self.rank]" means ``use the attribute {\tt rank} +from the object {\tt self} as an index into the list \verb"rank_names" +from the class {\tt Card}, and select the appropriate string.'' + +The first element of \verb"rank_names" is {\tt None} because there +is no card with rank zero. By including {\tt None} as a place-keeper, +we get a mapping with the nice property that the index 2 maps to the +string \verb"'2'", and so on. To avoid this tweak, we could have +used a dictionary instead of a list. + +With the methods we have so far, we can create and print cards: + +\begin{verbatim} +>>> card1 = Card(2, 11) +>>> print(card1) +Jack of Hearts +\end{verbatim} + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/card1.pdf}} +\caption{Object diagram.} +\label{fig.card1} +\end{figure} + +Figure~\ref{fig.card1} is a diagram of the {\tt Card} class object and +one Card instance. {\tt Card} is a class object; its type is {\tt + type}. {\tt card1} is an instance of {\tt Card}, so its type is +{\tt Card}. To save space, I didn't draw the contents of +\verb"suit_names" and \verb"rank_names". \index{state diagram} +\index{diagram!state} \index{object diagram} \index{diagram!object} + + +\section{Comparing cards} +\label{comparecard} +\index{operator!relational} +\index{relational operator} + +For built-in types, there are relational operators +({\tt <}, {\tt >}, {\tt ==}, etc.) +that compare +values and determine when one is greater than, less than, or equal to +another. For programmer-defined types, we can override the behavior of +the built-in operators by providing a method named +\verb"__lt__", which stands for ``less than''. +\index{programmer-defined type} +\index{type!programmer-defined} + +\verb"__lt__" takes two parameters, {\tt self} and {\tt other}, +and returns {\tt True} if {\tt self} is strictly less than {\tt other}. +\index{override} +\index{operator overloading} + +The correct ordering for cards is not obvious. +For example, which +is better, the 3 of Clubs or the 2 of Diamonds? One has a higher +rank, but the other has a higher suit. In order to compare +cards, you have to decide whether rank or suit is more important. + +The answer might depend on what game you are playing, but to keep +things simple, we'll make the arbitrary choice that suit is more +important, so all of the Spades outrank all of the Diamonds, +and so on. +\index{cmp method@\_\_cmp\_\_ method} +\index{method!\_\_cmp\_\_} + +With that decided, we can write \verb"__lt__": + +\begin{verbatim} +# inside class Card: + + def __lt__(self, other): + # check the suits + if self.suit < other.suit: return True + if self.suit > other.suit: return False + + # suits are the same... check ranks + return self.rank < other.rank +\end{verbatim} +% +You can write this more concisely using tuple comparison: +\index{tuple!comparison} +\index{comparison!tuple} + +\begin{verbatim} +# inside class Card: + + def __lt__(self, other): + t1 = self.suit, self.rank + t2 = other.suit, other.rank + return t1 < t2 +\end{verbatim} +% +As an exercise, write an \verb"__lt__" method for Time objects. You +can use tuple comparison, but you also might consider +comparing integers. + + +\section{Decks} +\index{list!of objects} +\index{deck, playing cards} + +Now that we have Cards, the next step is to define Decks. Since a +deck is made up of cards, it is natural for each Deck to contain a +list of cards as an attribute. +\index{init method} +\index{method!init} + +The following is a class definition for {\tt Deck}. The +init method creates the attribute {\tt cards} and generates +the standard set of fifty-two cards: +\index{composition} +\index{loop!nested} +\index{Deck class} +\index{class!Deck} + +\begin{verbatim} +class Deck: + + def __init__(self): + self.cards = [] + for suit in range(4): + for rank in range(1, 14): + card = Card(suit, rank) + self.cards.append(card) +\end{verbatim} +% +The easiest way to populate the deck is with a nested loop. The outer +loop enumerates the suits from 0 to 3. The inner loop enumerates the +ranks from 1 to 13. Each iteration +creates a new Card with the current suit and rank, +and appends it to {\tt self.cards}. +\index{append method} +\index{method!append} + + +\section{Printing the deck} +\label{printdeck} +\index{str method@\_\_str\_\_ method} +\index{method!\_\_str\_\_} + +Here is a \verb"__str__" method for {\tt Deck}: + +\begin{verbatim} +#inside class Deck: + + def __str__(self): + res = [] + for card in self.cards: + res.append(str(card)) + return '\n'.join(res) +\end{verbatim} +% +This method demonstrates an efficient way to accumulate a large +string: building a list of strings and then using the string method +{\tt join}. The built-in function {\tt str} invokes the +\verb"__str__" method on each card and returns the string +representation. \index{accumulator!string} \index{string!accumulator} +\index{join method} \index{method!join} \index{newline} + +Since we invoke {\tt join} on a newline character, the cards +are separated by newlines. Here's what the result looks like: + +\begin{verbatim} +>>> deck = Deck() +>>> print(deck) +Ace of Clubs +2 of Clubs +3 of Clubs +... +10 of Spades +Jack of Spades +Queen of Spades +King of Spades +\end{verbatim} +% +Even though the result appears on 52 lines, it is +one long string that contains newlines. + + +\section{Add, remove, shuffle and sort} + +To deal cards, we would like a method that +removes a card from the deck and returns it. +The list method {\tt pop} provides a convenient way to do that: +\index{pop method} +\index{method!pop} + +\begin{verbatim} +#inside class Deck: + + def pop_card(self): + return self.cards.pop() +\end{verbatim} +% +Since {\tt pop} removes the {\em last} card in the list, we are +dealing from the bottom of the deck. +\index{append method} +\index{method!append} + +To add a card, we can use the list method {\tt append}: + +\begin{verbatim} +#inside class Deck: + + def add_card(self, card): + self.cards.append(card) +\end{verbatim} +% +A method like this that uses another method without doing +much work is sometimes called a {\bf veneer}. The metaphor +comes from woodworking, where a veneer is a thin +layer of good quality wood glued to the surface of a cheaper piece of +wood to improve the appearance. +\index{veneer} + +In this case \verb"add_card" is a ``thin'' method that expresses +a list operation in terms appropriate for decks. It +improves the appearance, or interface, of the +implementation. + +As another example, we can write a Deck method named {\tt shuffle} +using the function {\tt shuffle} from the {\tt random} module: +\index{random module} +\index{module!random} +\index{shuffle function} +\index{function!shuffle} + +\begin{verbatim} +# inside class Deck: + + def shuffle(self): + random.shuffle(self.cards) +\end{verbatim} +% +Don't forget to import {\tt random}. + +As an exercise, write a Deck method named {\tt sort} that uses the +list method {\tt sort} to sort the cards in a {\tt Deck}. {\tt sort} +uses the \verb"__lt__" method we defined to determine the order. +\index{sort method} \index{method!sort} + + + +\section{Inheritance} +\index{inheritance} +\index{object-oriented programming} + +Inheritance is the ability to define a new class that is a modified +version of an existing class. As an example, let's say we want a +class to represent a ``hand'', that is, the cards held by one player. +A hand is similar to a deck: both are made up of a collection of +cards, and both require operations like adding and removing cards. + +A hand is also different from a deck; there are operations we want for +hands that don't make sense for a deck. For example, in poker we +might compare two hands to see which one wins. In bridge, we might +compute a score for a hand in order to make a bid. + +This relationship between classes---similar, but different---lends +itself to inheritance. +To define a new class that inherits from an existing class, +you put the name of the existing class in parentheses: +\index{parentheses!parent class in} +\index{parent class} +\index{class!parent} +\index{Hand class} +\index{class!Hand} + +\begin{verbatim} +class Hand(Deck): + """Represents a hand of playing cards.""" +\end{verbatim} +% +This definition indicates that {\tt Hand} inherits from {\tt Deck}; +that means we can use methods like \verb"pop_card" and \verb"add_card" +for Hands as well as Decks. + +When a new class inherits from an existing one, the existing +one is called the {\bf parent} and the new class is +called the {\bf child}. +\index{parent class} +\index{child class} +\index{class!child} + +In this example, {\tt Hand} inherits \verb"__init__" from {\tt Deck}, +but it doesn't really do what we want: instead of populating the hand +with 52 new cards, the init method for Hands should initialize {\tt + cards} with an empty list. \index{override} \index{init method} +\index{method!init} + +If we provide an init method in the {\tt Hand} class, it overrides the +one in the {\tt Deck} class: + +\begin{verbatim} +# inside class Hand: + + def __init__(self, label=''): + self.cards = [] + self.label = label +\end{verbatim} +% +When you create a Hand, Python invokes this init method, not the +one in {\tt Deck}. + +\begin{verbatim} +>>> hand = Hand('new hand') +>>> hand.cards +[] +>>> hand.label +'new hand' +\end{verbatim} +% +The other methods are inherited from {\tt Deck}, so we can use +\verb"pop_card" and \verb"add_card" to deal a card: + +\begin{verbatim} +>>> deck = Deck() +>>> card = deck.pop_card() +>>> hand.add_card(card) +>>> print(hand) +King of Spades +\end{verbatim} +% +A natural next step is to encapsulate this code in a method +called \verb"move_cards": +\index{encapsulation} + +\begin{verbatim} +#inside class Deck: + + def move_cards(self, hand, num): + for i in range(num): + hand.add_card(self.pop_card()) +\end{verbatim} +% +\verb"move_cards" takes two arguments, a Hand object and the number of +cards to deal. It modifies both {\tt self} and {\tt hand}, and +returns {\tt None}. + +In some games, cards are moved from one hand to another, +or from a hand back to the deck. You can use \verb"move_cards" +for any of these operations: {\tt self} can be either a Deck +or a Hand, and {\tt hand}, despite the name, can also be a {\tt Deck}. + +Inheritance is a useful feature. Some programs that would be +repetitive without inheritance can be written more elegantly +with it. Inheritance can facilitate code reuse, since you can +customize the behavior of parent classes without having to modify +them. In some cases, the inheritance structure reflects the natural +structure of the problem, which makes the design easier to +understand. + +On the other hand, inheritance can make programs difficult to read. +When a method is invoked, it is sometimes not clear where to find its +definition. The relevant code may be spread across several modules. +Also, many of the things that can be done using inheritance can be +done as well or better without it. + + +\section{Class diagrams} +\label{class.diagram} + +So far we have seen stack diagrams, which show the state of +a program, and object diagrams, which show the attributes +of an object and their values. These diagrams represent a snapshot +in the execution of a program, so they change as the program +runs. + +They are also highly detailed; for some purposes, too +detailed. A class diagram is a more abstract representation +of the structure of a program. Instead of showing individual +objects, it shows classes and the relationships between them. + +There are several kinds of relationship between classes: + +\begin{itemize} + +\item Objects in one class might contain references to objects +in another class. For example, each Rectangle contains a reference +to a Point, and each Deck contains references to many Cards. +This kind of relationship is called {\bf HAS-A}, as in, ``a Rectangle +has a Point.'' + +\item One class might inherit from another. This relationship +is called {\bf IS-A}, as in, ``a Hand is a kind of a Deck.'' + +\item One class might depend on another in the sense that objects +in one class take objects in the second class as parameters, or +use objects in the second class as part of a computation. This +kind of relationship is called a {\bf dependency}. + +\end{itemize} +\index{IS-A relationship} +\index{HAS-A relationship} +\index{class diagram} +\index{diagram!class} + +A {\bf class diagram} is a graphical representation of these +relationships. For example, Figure~\ref{fig.class1} shows the +relationships between {\tt Card}, {\tt Deck} and {\tt Hand}. + +\begin{figure} +\centerline +{\includegraphics[scale=0.8]{figs/class1.pdf}} +\caption{Class diagram.} +\label{fig.class1} +\end{figure} + +The arrow with a hollow triangle head represents an IS-A +relationship; in this case it indicates that Hand inherits +from Deck. + +The standard arrow head represents a HAS-A +relationship; in this case a Deck has references to Card +objects. +\index{multiplicity (in class diagram)} + +The star ({\tt *}) near the arrow head is a +{\bf multiplicity}; it indicates how many Cards a Deck has. +A multiplicity can be a simple number, like {\tt 52}, a range, +like {\tt 5..7} or a star, which indicates that a Deck can +have any number of Cards. + +There are no dependencies in this diagram. They would normally +be shown with a dashed arrow. Or if there are a lot of +dependencies, they are sometimes omitted. + +A more detailed diagram might show that a Deck actually +contains a {\em list} of Cards, but built-in types +like list and dict are usually not included in class diagrams. + + +\section{디버깅} +%Debugging +\index{debugging} + +Inheritance can make debugging difficult because when you invoke a +method on an object, it might be hard to figure out which method will +be invoked. +\index{inheritance} + +Suppose you are writing a function that works with Hand objects. +You would like it to work with all kinds of Hands, like +PokerHands, BridgeHands, etc. If you invoke a method like +{\tt shuffle}, you might get the one defined in {\tt Deck}, +but if any of the subclasses override this method, you'll +get that version instead. This behavior is usually a good +thing, but it can be confusing. + +Any time you are unsure about the flow of execution through your +program, the simplest solution is to add print statements at the +beginning of the relevant methods. If {\tt Deck.shuffle} prints a +message that says something like {\tt Running Deck.shuffle}, then as +the program runs it traces the flow of execution. +\index{flow of execution} + +As an alternative, you could use this function, which takes an +object and a method name (as a string) and returns the class that +provides the definition of the method: + +\begin{verbatim} +def find_defining_class(obj, meth_name): + for ty in type(obj).mro(): + if meth_name in ty.__dict__: + return ty +\end{verbatim} +% +Here's an example: + +\begin{verbatim} +>>> hand = Hand() +>>> find_defining_class(hand, 'shuffle') + +\end{verbatim} +% +So the {\tt shuffle} method for this Hand is the one in {\tt Deck}. +\index{mro method} +\index{method!mro} +\index{method resolution order} + +\verb"find_defining_class" uses the {\tt mro} method to get the list +of class objects (types) that will be searched for methods. ``MRO'' +stands for ``method resolution order'', which is the sequence of +classes Python searches to ``resolve'' a method name. + +Here's a design suggestion: when you override a method, +the interface of the new method should be the same as the old. It +should take the same parameters, return the same type, and obey the +same preconditions and postconditions. If you follow this rule, you +will find that any function designed to work with an instance of a +parent class, like a Deck, will also work with instances of child +classes like a Hand and PokerHand. +\index{override} +\index{interface} +\index{precondition} +\index{postcondition} + +If you violate this rule, which is called the ``Liskov substitution +principle'', your code will collapse like (sorry) a house of cards. +\index{Liskov substitution principle} + + +\section{Data encapsulation} + +The previous chapters demonstrate a development plan we might call +``object-oriented design''. We identified objects we needed---like +{\tt Point}, {\tt Rectangle} and {\tt Time}---and defined classes to +represent them. In each case there is an obvious correspondence +between the object and some entity in the real world (or at least a +mathematical world). +\index{development plan!data encapsulation} + +But sometimes it is less obvious what objects you need +and how they should interact. In that case you need a different +development plan. In the same way that we discovered function +interfaces by encapsulation and generalization, we can discover +class interfaces by {\bf data encapsulation}. +\index{data encapsulation} + +Markov analysis, from Section~\ref{markov}, provides a good example. +If you download my code from \url{http://thinkpython2.com/code/markov.py}, +you'll see that it uses two global variables---\verb"suffix_map" and +\verb"prefix"---that are read and written from several functions. + +\begin{verbatim} +suffix_map = {} +prefix = () +\end{verbatim} + +Because these variables are global, we can only run one analysis at a +time. If we read two texts, their prefixes and suffixes would be +added to the same data structures (which makes for some interesting +generated text). + +To run multiple analyses, and keep them separate, we can encapsulate +the state of each analysis in an object. +Here's what that looks like: + +\begin{verbatim} +class Markov: + + def __init__(self): + self.suffix_map = {} + self.prefix = () +\end{verbatim} + +Next, we transform the functions into methods. For example, +here's \verb"process_word": + +\begin{verbatim} + def process_word(self, word, order=2): + if len(self.prefix) < order: + self.prefix += (word,) + return + + try: + self.suffix_map[self.prefix].append(word) + except KeyError: + # if there is no entry for this prefix, make one + self.suffix_map[self.prefix] = [word] + + self.prefix = shift(self.prefix, word) +\end{verbatim} + +Transforming a program like this---changing the design without +changing the behavior---is another example of refactoring +(see Section~\ref{refactoring}). +\index{refactoring} + +This example suggests a development plan for designing objects and +methods: + +\begin{enumerate} + +\item Start by writing functions that read and write global +variables (when necessary). + +\item Once you get the program working, look for associations +between global variables and the functions that use them. + +\item Encapsulate related variables as attributes of an object. + +\item Transform the associated functions into methods of the new +class. + +\end{enumerate} + +As an exercise, download my Markov code from +\url{http://thinkpython2.com/code/markov.py}, and follow the steps +described above to encapsulate the global variables as attributes of a +new class called {\tt Markov}. Solution: +\url{http://thinkpython2.com/code/Markov.py} (note the capital M). + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[encode:] To represent one set of values using another +set of values by constructing a mapping between them. +\index{encode} + +\item[class attribute:] An attribute associated with a class +object. Class attributes are defined inside +a class definition but outside any method. +\index{class attribute} +\index{attribute!class} + +\item[instance attribute:] An attribute associated with an +instance of a class. +\index{instance attribute} +\index{attribute!instance} + +\item[veneer:] A method or function that provides a different +interface to another function without doing much computation. +\index{veneer} + +\item[inheritance:] The ability to define a new class that is a +modified version of a previously defined class. +\index{inheritance} + +\item[parent class:] The class from which a child class inherits. +\index{parent class} + +\item[child class:] A new class created by inheriting from an +existing class; also called a ``subclass''. +\index{child class} +\index{class!child} + +\item[IS-A relationship:] A relationship between a child class +and its parent class. +\index{IS-A relationship} + +\item[HAS-A relationship:] A relationship between two classes +where instances of one class contain references to instances of +the other. +\index{HAS-A relationship} + +\item[dependency:] A relationship between two classes +where instances of one class use instances of the other class, +but do not store them as attributes. +\index{HAS-A relationship} + +\item[class diagram:] A diagram that shows the classes in a program +and the relationships between them. +\index{class diagram} +\index{diagram!class} + +\item[multiplicity:] A notation in a class diagram that shows, for +a HAS-A relationship, how many references there are to instances +of another class. +\index{multiplicity (in class diagram)} + +\item[data encapsulation:] A program development plan that +involves a prototype using global variables and a final version +that makes the global variables into instance attributes. +\index{data encapsulation} +\index{development plan!data encapsulation} + +\end{description} + + +\section{연습 문제} +%Exercises + +\begin{exercise} +For the following program, draw a UML class diagram that shows +these classes and the relationships among them. + +\begin{verbatim} +class PingPongParent: + pass + +class Ping(PingPongParent): + def __init__(self, pong): + self.pong = pong + + +class Pong(PingPongParent): + def __init__(self, pings=None): + if pings is None: + self.pings = [] + else: + self.pings = pings + + def add_ping(self, ping): + self.pings.append(ping) + +pong = Pong() +ping = Ping(pong) +pong.add_ping(ping) +\end{verbatim} + + +\end{exercise} + + + +\begin{exercise} +Write a Deck method called \verb"deal_hands" that +takes two parameters, the number of hands and the number of cards per +hand. It should create the appropriate number of Hand objects, deal +the appropriate number of cards per hand, and return a list of Hands. +\end{exercise} + + +\begin{exercise} +\label{poker} + +The following are the possible hands in poker, in increasing order +of value and decreasing order of probability: +\index{poker} + +\begin{description} + +\item[pair:] two cards with the same rank +\vspace{-0.05in} + +\item[two pair:] two pairs of cards with the same rank +\vspace{-0.05in} + +\item[three of a kind:] three cards with the same rank +\vspace{-0.05in} + +\item[straight:] five cards with ranks in sequence (aces can +be high or low, so {\tt Ace-2-3-4-5} is a straight and so is {\tt +10-Jack-Queen-King-Ace}, but {\tt Queen-King-Ace-2-3} is not.) +\vspace{-0.05in} + +\item[flush:] five cards with the same suit +\vspace{-0.05in} + +\item[full house:] three cards with one rank, two cards with another +\vspace{-0.05in} + +\item[four of a kind:] four cards with the same rank +\vspace{-0.05in} + +\item[straight flush:] five cards in sequence (as defined above) and +with the same suit +\vspace{-0.05in} + +\end{description} +% +The goal of these exercises is to estimate +the probability of drawing these various hands. + +\begin{enumerate} + +\item Download the following files from \url{http://thinkpython2.com/code}: + +\begin{description} + +\item[{\tt Card.py}]: A complete version of the {\tt Card}, +{\tt Deck} and {\tt Hand} classes in this chapter. + +\item[{\tt PokerHand.py}]: An incomplete implementation of a class +that represents a poker hand, and some code that tests it. + +\end{description} +% +\item If you run {\tt PokerHand.py}, it deals seven 7-card poker hands +and checks to see if any of them contains a flush. Read this +code carefully before you go on. + +\item Add methods to {\tt PokerHand.py} named \verb"has_pair", +\verb"has_twopair", etc. that return True or False according to +whether or not the hand meets the relevant criteria. Your code should +work correctly for ``hands'' that contain any number of cards +(although 5 and 7 are the most common sizes). + +\item Write a method named {\tt classify} that figures out +the highest-value classification for a hand and sets the +{\tt label} attribute accordingly. For example, a 7-card hand +might contain a flush and a pair; it should be labeled ``flush''. + +\item When you are convinced that your classification methods are +working, the next step is to estimate the probabilities of the various +hands. Write a function in {\tt PokerHand.py} that shuffles a deck of +cards, divides it into hands, classifies the hands, and counts the +number of times various classifications appear. + +\item Print a table of the classifications and their probabilities. +Run your program with larger and larger numbers of hands until the +output values converge to a reasonable degree of accuracy. Compare +your results to the values at \url{http://en.wikipedia.org/wiki/Hand_rankings}. + +\end{enumerate} + +Solution: \url{http://thinkpython2.com/code/PokerHandSoln.py}. +\end{exercise} + + +\chapter{The Goodies} + +One of my goals for this book has been to teach you as little Python +as possible. When there were two ways to do something, I picked +one and avoided mentioning the other. Or sometimes I put the second +one into an exercise. + +Now I want to go back for some of the good bits that got left behind. +Python provides a number of features that are not really necessary---you +can write good code without them---but with them you can sometimes +write code that's more concise, readable or efficient, and sometimes +all three. + +% TODO: add the with statement + +\section{Conditional expressions} + +We saw conditional statements in Section~\ref{conditional.execution}. +Conditional statements are often used to choose one of two values; +for example: +\index{conditional expression} +\index{expression!conditional} + +\begin{verbatim} +if x > 0: + y = math.log(x) +else: + y = float('nan') +\end{verbatim} + +This statement checks whether {\tt x} is positive. If so, it computes +{\tt math.log}. If not, {\tt math.log} would raise a ValueError. To +avoid stopping the program, we generate a ``NaN'', which is a special +floating-point value that represents ``Not a Number''. +\index{NaN} +\index{floating-point} + +We can write this statement more concisely using a {\bf conditional +expression}: + +\begin{verbatim} +y = math.log(x) if x > 0 else float('nan') +\end{verbatim} + +You can almost read this line like English: ``{\tt y} gets log-{\tt x} +if {\tt x} is greater than 0; otherwise it gets NaN''. + +Recursive functions can sometimes be rewritten using conditional +expressions. For example, here is a recursive version of {\tt factorial}: +\index{factorial} +\index{function!factorial} + +\begin{verbatim} +def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n-1) +\end{verbatim} + +We can rewrite it like this: + +\begin{verbatim} +def factorial(n): + return 1 if n == 0 else n * factorial(n-1) +\end{verbatim} + +Another use of conditional expressions is handling optional +arguments. For example, here is the init method from +{\tt GoodKangaroo} (see Exercise~\ref{kangaroo}): +\index{optional argument} +\index{argument!optional} + +\begin{verbatim} + def __init__(self, name, contents=None): + self.name = name + if contents == None: + contents = [] + self.pouch_contents = contents +\end{verbatim} + +We can rewrite this one like this: + +\begin{verbatim} + def __init__(self, name, contents=None): + self.name = name + self.pouch_contents = [] if contents == None else contents +\end{verbatim} + +In general, you can replace a conditional statement with a conditional +expression if both branches contain simple expressions that are +either returned or assigned to the same variable. +\index{conditional statement} +\index{statement!conditional} + + + +\section{List comprehensions} + +In Section~\ref{filter} we saw the map and filter patterns. For +example, this function takes a list of strings, maps the string method +{\tt capitalize} to the elements, and returns a new list of strings: + +\begin{verbatim} +def capitalize_all(t): + res = [] + for s in t: + res.append(s.capitalize()) + return res +\end{verbatim} + +We can write this more concisely using a {\bf list comprehension}: +\index{list comprehension} + +\begin{verbatim} +def capitalize_all(t): + return [s.capitalize() for s in t] +\end{verbatim} + +The bracket operators indicate that we are constructing a new +list. The expression inside the brackets specifies the elements +of the list, and the {\tt for} clause indicates what sequence +we are traversing. +\index{list} +\index{for loop} + +The syntax of a list comprehension is a little awkward because +the loop variable, {\tt s} in this example, appears in the expression +before we get to the definition. +\index{loop variable} + +List comprehensions can also be used for filtering. For example, +this function selects only the elements of {\tt t} that are +upper case, and returns a new list: +\index{filter pattern} +\index{pattern!filter} + +\begin{verbatim} +def only_upper(t): + res = [] + for s in t: + if s.isupper(): + res.append(s) + return res +\end{verbatim} + +We can rewrite it using a list comprehension + +\begin{verbatim} +def only_upper(t): + return [s for s in t if s.isupper()] +\end{verbatim} + +List comprehensions are concise and easy to read, at least for simple +expressions. And they are usually faster than the equivalent for +loops, sometimes much faster. So if you are mad at me for not +mentioning them earlier, I understand. + +But, in my defense, list comprehensions are harder to debug because +you can't put a print statement inside the loop. I suggest that you +use them only if the computation is simple enough that you are likely +to get it right the first time. And for beginners that means never. +\index{debugging} + + + +\section{Generator expressions} + +{\bf Generator expressions} are similar to list comprehensions, but +with parentheses instead of square brackets: +\index{generator expression} +\index{expression!generator} + +\begin{verbatim} +>>> g = (x**2 for x in range(5)) +>>> g + at 0x7f4c45a786c0> +\end{verbatim} +% +The result is a generator object that knows how to iterate through +a sequence of values. But unlike a list comprehension, it does not +compute the values all at once; it waits to be asked. The built-in +function {\tt next} gets the next value from the generator: +\index{generator object} +\index{object!generator} + +\begin{verbatim} +>>> next(g) +0 +>>> next(g) +1 +\end{verbatim} +% +When you get to the end of the sequence, {\tt next} raises a +StopIteration exception. You can also use a {\tt for} loop to iterate +through the values: +\index{StopIteration} +\index{exception!StopIteration} + +\begin{verbatim} +>>> for val in g: +... print(val) +4 +9 +16 +\end{verbatim} +% +The generator object keeps track of where it is in the sequence, +so the {\tt for} loop picks up where {\tt next} left off. Once the +generator is exhausted, it continues to raise {\tt StopException}: + +\begin{verbatim} +>>> next(g) +StopIteration +\end{verbatim} + +Generator expressions are often used with functions like {\tt sum}, +{\tt max}, and {\tt min}: +\index{sum} +\index{function!sum} + +\begin{verbatim} +>>> sum(x**2 for x in range(5)) +30 +\end{verbatim} + + +\section{{\tt any} and {\tt all}} + +Python provides a built-in function, {\tt any}, that takes a sequence +of boolean values and returns {\tt True} if any of the values are {\tt + True}. It works on lists: +\index{any} +\index{built-in function!any} + +\begin{verbatim} +>>> any([False, False, True]) +True +\end{verbatim} +% +But it is often used with generator expressions: +\index{generator expression} +\index{expression!generator} + +\begin{verbatim} +>>> any(letter == 't' for letter in 'monty') +True +\end{verbatim} +% +That example isn't very useful because it does the same thing +as the {\tt in} operator. But we could use {\tt any} to rewrite +some of the search functions we wrote in Section~\ref{search}. For +example, we could write {\tt avoids} like this: +\index{search pattern} +\index{pattern!search} + +\begin{verbatim} +def avoids(word, forbidden): + return not any(letter in forbidden for letter in word) +\end{verbatim} +% +The function almost reads like English, ``{\tt word} avoids +{\tt forbidden} if there are not any forbidden letters in {\tt word}.'' + +Using {\tt any} with a generator expression is efficient because +it stops immediately if it finds a {\tt True} value, +so it doesn't have to evaluate the whole sequence. + +Python provides another built-in function, {\tt all}, that returns +{\tt True} if every element of the sequence is {\tt True}. As +an exercise, use {\tt all} to re-write \verb"uses_all" from +Section~\ref{search}. +\index{all} +\index{built-in function!any} + + +\section{Sets} +\label{sets} + +In Section~\ref{dictsub} I use dictionaries to find the words +that appear in a document but not in a word list. The function +I wrote takes {\tt d1}, which contains the words from the document +as keys, and {\tt d2}, which contains the list of words. It +returns a dictionary that contains the keys from {\tt d1} that +are not in {\tt d2}. + +\begin{verbatim} +def subtract(d1, d2): + res = dict() + for key in d1: + if key not in d2: + res[key] = None + return res +\end{verbatim} +% +In all of these dictionaries, the values are {\tt None} because +we never use them. As a result, we waste some storage space. +\index{dictionary subtraction} + +Python provides another built-in type, called a {\tt set}, that +behaves like a collection of dictionary keys with no values. Adding +elements to a set is fast; so is checking membership. And sets +provide methods and operators to compute common set operations. +\index{set} +\index{object!set} + +For example, set subtraction is available as a method called +{\tt difference} or as an operator, {\tt -}. So we can rewrite +{\tt subtract} like this: +\index{set subtraction} + +\begin{verbatim} +def subtract(d1, d2): + return set(d1) - set(d2) +\end{verbatim} +% +The result is a set instead of a dictionary, but for operations like +iteration, the behavior is the same. + +Some of the exercises in this book can be done concisely and +efficiently with sets. For example, here is a solution to +\verb"has_duplicates", from +Exercise~\ref{duplicate}, that uses a dictionary: + +\begin{verbatim} +def has_duplicates(t): + d = {} + for x in t: + if x in d: + return True + d[x] = True + return False +\end{verbatim} + +When an element appears for the first time, it is added to the +dictionary. If the same element appears again, the function returns +{\tt True}. + +Using sets, we can write the same function like this: + +\begin{verbatim} +def has_duplicates(t): + return len(set(t)) < len(t) +\end{verbatim} +% +An element can only appear in a set once, so if an element in {\tt t} +appears more than once, the set will be smaller than {\tt t}. If there +are no duplicates, the set will be the same size as {\tt t}. +\index{duplicate} + +We can also use sets to do some of the exercises in +Chapter~\ref{wordplay}. For example, here's a version of +\verb"uses_only" with a loop: + +\begin{verbatim} +def uses_only(word, available): + for letter in word: + if letter not in available: + return False + return True +\end{verbatim} +% +\verb"uses_only" checks whether all letters in {\tt word} are +in {\tt available}. We can rewrite it like this: + +\begin{verbatim} +def uses_only(word, available): + return set(word) <= set(available) +\end{verbatim} +% +The \verb"<=" operator checks whether one set is a subset or another, +including the possibility that they are equal, which is true if all +the letters in {\tt word} appear in {\tt available}. +\index{subset} + +As an exercise, rewrite \verb"avoids" using sets. + + +\section{Counters} + +A Counter is like a set, except that if an element appears more +than once, the Counter keeps track of how many times it appears. +If you are familiar with the mathematical idea of a {\bf multiset}, +a Counter is a natural way to represent a multiset. +\index{Counter} +\index{object!Counter} +\index{multiset} + +Counter is defined in a standard module called {\tt collections}, +so you have to import it. You can initialize a Counter with a string, +list, or anything else that supports iteration: +\index{collections} +\index{module!collections} + +\begin{verbatim} +>>> from collections import Counter +>>> count = Counter('parrot') +>>> count +Counter({'r': 2, 't': 1, 'o': 1, 'p': 1, 'a': 1}) +\end{verbatim} + +Counters behave like dictionaries in many ways; they map from each +key to the number of times it appears. As in dictionaries, +the keys have to be hashable. + +Unlike dictionaries, Counters don't raise an exception if you access +an element that doesn't appear. Instead, they return 0: + +\begin{verbatim} +>>> count['d'] +0 +\end{verbatim} + +We can use Counters to rewrite \verb"is_anagram" from +Exercise~\ref{anagram}: + +\begin{verbatim} +def is_anagram(word1, word2): + return Counter(word1) == Counter(word2) +\end{verbatim} + +If two words are anagrams, they contain the same letters with the same +counts, so their Counters are equivalent. + +Counters provide methods and operators to perform set-like operations, +including addition, subtraction, union and intersection. And +they provide an often-useful method, \verb"most_common", which +returns a list of value-frequency pairs, sorted from most common to +least: + +\begin{verbatim} +>>> count = Counter('parrot') +>>> for val, freq in count.most_common(3): +... print(val, freq) +r 2 +p 1 +a 1 +\end{verbatim} + + +\section{defaultdict} + +The {\tt collections} module also provides {\tt defaultdict}, which is +like a dictionary except that if you access a key that doesn't exist, +it can generate a new value on the fly. +\index{defaultdict} +\index{object!defaultdict} +\index{collections} +\index{module!collections} + +When you create a defaultdict, you provide a function that's used to +create new values. A function used to create objects is sometimes +called a {\bf factory}. The built-in functions that create lists, sets, +and other types can be used as factories: +\index{factory function} + +\begin{verbatim} +>>> from collections import defaultdict +>>> d = defaultdict(list) +\end{verbatim} + +Notice that the argument is {\tt list}, which is a class object, +not {\tt list()}, which is a new list. The function you provide +doesn't get called unless you access a key that doesn't exist. + +\begin{verbatim} +>>> t = d['new key'] +>>> t +[] +\end{verbatim} + +The new list, which we're calling {\tt t}, is also added to the +dictionary. So if we modify {\tt t}, the change appears in {\tt d}: + +\begin{verbatim} +>>> t.append('new value') +>>> d +defaultdict(, {'new key': ['new value']}) +\end{verbatim} + +If you are making a dictionary of lists, you can often write simpler +code using {\tt defaultdict}. In my solution to +Exercise~\ref{anagrams}, which you can get from +\url{http://thinkpython2.com/code/anagram_sets.py}, I make a +dictionary that maps from a sorted string of letters to the list of +words that can be spelled with those letters. For example, {\tt + 'opst'} maps to the list {\tt ['opts', 'post', 'pots', 'spot', + 'stop', 'tops']}. + +Here's the original code: + +\begin{verbatim} +def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + if t not in d: + d[t] = [word] + else: + d[t].append(word) + return d +\end{verbatim} + +This can be simplified using {\tt setdefault}, which you might +have used in Exercise~\ref{setdefault}: +\index{setdefault} + +\begin{verbatim} +def all_anagrams(filename): + d = {} + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d.setdefault(t, []).append(word) + return d +\end{verbatim} + +This solution has the drawback that it makes a new list +every time, regardless of whether it is needed. For lists, +that's no big deal, but if the factory +function is complicated, it might be. +\index{factory function} + +We can avoid this problem and +simplify the code using a {\tt defaultdict}: + +\begin{verbatim} +def all_anagrams(filename): + d = defaultdict(list) + for line in open(filename): + word = line.strip().lower() + t = signature(word) + d[t].append(word) + return d +\end{verbatim} + +My solution to Exercise~\ref{poker}, which you can download from +\url{http://thinkpython2.com/code/PokerHandSoln.py}, +uses {\tt setdefault} in the function +\verb"has_straightflush". This solution has the drawback +of creating a {\tt Hand} object every time through the loop, whether +it is needed or not. As an exercise, rewrite it using +a defaultdict. + + +\section{Named tuples} + +Many simple objects are basically collections of related values. +For example, the Point object defined in Chapter~\ref{clobjects} contains +two numbers, {\tt x} and {\tt y}. When you define a class like +this, you usually start with an init method and a str method: + +\begin{verbatim} +class Point: + + def __init__(self, x=0, y=0): + self.x = x + self.y = y + + def __str__(self): + return '(%g, %g)' % (self.x, self.y) +\end{verbatim} + +This is a lot of code to convey a small amount of information. +Python provides a more concise way to say the same thing: + +\begin{verbatim} +from collections import namedtuple +Point = namedtuple('Point', ['x', 'y']) +\end{verbatim} + +The first argument is the name of the class you want to create. +The second is a list of the attributes Point objects should have, +as strings. The return value from {\tt namedtuple} is a class object: +\index{namedtuple} +\index{object!namedtuple} +\index{collections} +\index{module!collections} + +\begin{verbatim} +>>> Point + +\end{verbatim} + +{\tt Point} automatically provides methods like \verb"__init__" and +\verb"__str__" so you don't have to write them. +\index{class object} +\index{object!class} + +To create a Point object, you use the Point class as a function: + +\begin{verbatim} +>>> p = Point(1, 2) +>>> p +Point(x=1, y=2) +\end{verbatim} + +The init method assigns the arguments to attributes using the names +you provided. The str method prints a representation of the Point +object and its attributes. + +You can access the elements of the named tuple by name: + +\begin{verbatim} +>>> p.x, p.y +(1, 2) +\end{verbatim} + +But you can also treat a named tuple as a tuple: + +\begin{verbatim} +>>> p[0], p[1] +(1, 2) + +>>> x, y = p +>>> x, y +(1, 2) +\end{verbatim} + +Named tuples provide a quick way to define simple classes. +The drawback is that simple classes don't always stay simple. +You might decide later that you want to add methods to a named tuple. +In that case, you could define a new class that inherits from +the named tuple: +\index{inheritance} + +\begin{verbatim} +class Pointier(Point): + # add more methods here +\end{verbatim} + +Or you could switch to a conventional class definition. + + +\section{Gathering keyword args} + +In Section~\ref{gather}, we saw how to write a function that +gathers its arguments into a tuple: +\index{gather} + +\begin{verbatim} +def printall(*args): + print(args) +\end{verbatim} +% +You can call this function with any number of positional arguments +(that is, arguments that don't have keywords): +\index{positional argument} +\index{argument!positional} + +\begin{verbatim} +>>> printall(1, 2.0, '3') +(1, 2.0, '3') +\end{verbatim} +% +But the {\tt *} operator doesn't gather keyword arguments: +\index{keyword argument} +\index{argument!keyword} + +\begin{verbatim} +>>> printall(1, 2.0, third='3') +TypeError: printall() got an unexpected keyword argument 'third' +\end{verbatim} +% +To gather keyword arguments, you can use the {\tt **} operator: + +\begin{verbatim} +def printall(*args, **kwargs): + print(args, kwargs) +\end{verbatim} +% +You can call the keyword gathering parameter anything you want, but +{\tt kwargs} is a common choice. The result is a dictionary that maps +keywords to values: + +\begin{verbatim} +>>> printall(1, 2.0, third='3') +(1, 2.0) {'third': '3'} +\end{verbatim} +% +If you have a dictionary of keywords and values, you can use the +scatter operator, {\tt **} to call a function: +\index{scatter} + +\begin{verbatim} +>>> d = dict(x=1, y=2) +>>> Point(**d) +Point(x=1, y=2) +\end{verbatim} +% +Without the scatter operator, the function would treat {\tt d} as +a single positional argument, so it would assign {\tt d} to +{\tt x} and complain because there's nothing to assign to {\tt y}: + +\begin{verbatim} +>>> d = dict(x=1, y=2) +>>> Point(d) +Traceback (most recent call last): + File "", line 1, in +TypeError: __new__() missing 1 required positional argument: 'y' +\end{verbatim} +% +When you are working with functions that have a large number of +parameters, it is often useful to create and pass around dictionaries +that specify frequently used options. + + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[conditional expression:] An expression that has one of two +values, depending on a condition. +\index{conditional expression} +\index{expression!conditional} + +\item[list comprehension:] An expression with a {\tt for} loop in square +brackets that yields a new list. +\index{list comprehension} + +\item[generator expression:] An expression with a {\tt for} loop in parentheses +that yields a generator object. +\index{generator expression} +\index{expression!generator} + +\item[multiset:] A mathematical entity that represents a mapping +between the elements of a set and the number of times they appear. + +\item[factory:] A function, usually passed as a parameter, used to +create objects. +\index{factory} + +\end{description} + + + + +\section{연습 문제} +%Exercises + +\begin{exercise} + +The following is a function computes the binomial +coefficient recursively. + +\begin{verbatim} +def binomial_coeff(n, k): + """Compute the binomial coefficient "n choose k". + + n: number of trials + k: number of successes + + returns: int + """ + if k == 0: + return 1 + if n == 0: + return 0 + + res = binomial_coeff(n-1, k) + binomial_coeff(n-1, k-1) + return res +\end{verbatim} + +Rewrite the body of the function using nested conditional +expressions. + +One note: this function is not very efficient because it ends up computing +the same values over and over. You could make it more efficient by +memoizing (see Section~\ref{memoize}). But you will find that it's harder to +memoize if you write it using conditional expressions. + +\end{exercise} + + + +\appendix + +\chapter{Debugging} +\index{debugging} + +When you are debugging, you should distinguish among different +kinds of errors in order to track them down more quickly: + +\begin{itemize} + +\item Syntax errors are discovered by the interpreter when it is + translating the source code into byte code. They indicate + that there is something wrong with the structure of the program. + Example: Omitting the colon at the end of a {\tt def} statement + generates the somewhat redundant message {\tt SyntaxError: invalid + syntax}. +\index{syntax error} +\index{error!syntax} + +\item Runtime errors are produced by the interpreter if something goes + wrong while the program is running. Most runtime error messages + include information about where the error occurred and what + functions were executing. Example: An infinite recursion eventually + causes the runtime error ``maximum recursion depth exceeded''. +\index{runtime error} +\index{error!runtime} +\index{exception} + +\item Semantic errors are problems with a program that runs without + producing error messages but doesn't do the right thing. Example: + An expression may not be evaluated in the order you expect, yielding + an incorrect result. +\index{semantic error} +\index{error!semantic} + +\end{itemize} + +The first step in debugging is to figure out which kind of +error you are dealing with. Although the following sections are +organized by error type, some techniques are +applicable in more than one situation. + + +\section{Syntax errors} +\index{error message} + +Syntax errors are usually easy to fix once you figure out what they +are. Unfortunately, the error messages are often not helpful. +The most common messages are {\tt SyntaxError: invalid syntax} and +{\tt SyntaxError: invalid token}, neither of which is very informative. + +On the other hand, the message does tell you where in the program the +problem occurred. Actually, it tells you where Python +noticed a problem, which is not necessarily where the error +is. Sometimes the error is prior to the location of the error +message, often on the preceding line. +\index{incremental development} +\index{development plan!incremental} + +If you are building the program incrementally, you should have +a good idea about where the error is. It will be in the last +line you added. + +If you are copying code from a book, start by comparing +your code to the book's code very carefully. Check every character. +At the same time, remember that the book might be wrong, so +if you see something that looks like a syntax error, it might be. + +Here are some ways to avoid the most common syntax errors: +\index{syntax} + +\begin{enumerate} + +\item Make sure you are not using a Python keyword for a variable name. +\index{keyword} + +\item Check that you have a colon at the end of the header of every +compound statement, including {\tt for}, {\tt while}, +{\tt if}, and {\tt def} statements. +\index{header} +\index{colon} + +\item Make sure that any strings in the code have matching +quotation marks. Make sure that all quotation marks are +``straight quotes'', not ``curly quotes''. +\index{quotation mark} + +\item If you have multiline strings with triple quotes (single or double), make +sure you have terminated the string properly. An unterminated string +may cause an {\tt invalid token} error at the end of your program, +or it may treat the following part of the program as a string until it +comes to the next string. In the second case, it might not produce an error +message at all! +\index{multiline string} +\index{string!multiline} + +\item An unclosed opening operator---\verb+(+, \verb+{+, or + \verb+[+---makes Python continue with the next line as part of the + current statement. Generally, an error occurs almost immediately in + the next line. + +\item Check for the classic {\tt =} instead of {\tt ==} inside +a conditional. +\index{conditional} + +\item Check the indentation to make sure it lines up the way it +is supposed to. Python can handle space and tabs, but if you mix +them it can cause problems. The best way to avoid this problem +is to use a text editor that knows about Python and generates +consistent indentation. +\index{indentation} +\index{whitespace} + +\item If you have non-ASCII characters in the code (including strings +and comments), that might cause a problem, although Python 3 usually +handles non-ASCII characters. Be careful if you paste in text from +a web page or other source. + +\end{enumerate} + +If nothing works, move on to the next section... + + +\subsection{I keep making changes and it makes no difference.} + +If the interpreter says there is an error and you don't see it, that +might be because you and the interpreter are not looking at the same +code. Check your programming environment to make sure that the +program you are editing is the one Python is trying to run. + +If you are not sure, try putting an obvious and deliberate syntax +error at the beginning of the program. Now run it again. If the +interpreter doesn't find the new error, you are not running the +new code. + +There are a few likely culprits: + +\begin{itemize} + +\item You edited the file and forgot to save the changes before +running it again. Some programming environments do this +for you, but some don't. + +\item You changed the name of the file, but you are still running +the old name. + +\item Something in your development environment is configured +incorrectly. + +\item If you are writing a module and using {\tt import}, +make sure you don't give your module the same name as one +of the standard Python modules. + +\item If you are using {\tt import} to read a module, remember +that you have to restart the interpreter or use {\tt reload} +to read a modified file. If you import the module again, it +doesn't do anything. +\index{module!reload} +\index{reload function} +\index{function!reload} + +\end{itemize} + +If you get stuck and you can't figure out what is going on, one +approach is to start again with a new program like ``Hello, World!'', +and make sure you can get a known program to run. Then gradually add +the pieces of the original program to the new one. + + +\section{Runtime errors} + +Once your program is syntactically correct, +Python can read it and at least start running it. What could +possibly go wrong? + + +\subsection{My program does absolutely nothing.} + +This problem is most common when your file consists of functions and +classes but does not actually invoke a function to start execution. +This may be intentional if you only plan to import this module to +supply classes and functions. + +If it is not intentional, make sure there is a function call +in the program, and make sure the flow of execution reaches +it (see ``Flow of Execution'' below). + + +\subsection{My program hangs.} +\index{infinite loop} +\index{infinite recursion} +\index{hanging} + +If a program stops and seems to be doing nothing, it is ``hanging''. +Often that means that it is caught in an infinite loop or infinite +recursion. + +\begin{itemize} + +\item If there is a particular loop that you suspect is the +problem, add a {\tt print} statement immediately before the loop that says +``entering the loop'' and another immediately after that says +``exiting the loop''. + +Run the program. If you get the first message and not the second, +you've got an infinite loop. Go to the ``Infinite Loop'' section +below. + +\item Most of the time, an infinite recursion will cause the program +to run for a while and then produce a ``RuntimeError: Maximum +recursion depth exceeded'' error. If that happens, go to the +``Infinite Recursion'' section below. + +If you are not getting this error but you suspect there is a problem +with a recursive method or function, you can still use the techniques +in the ``Infinite Recursion'' section. + +\item If neither of those steps works, start testing other +loops and other recursive functions and methods. + +\item If that doesn't work, then it is possible that +you don't understand the flow of execution in your program. +Go to the ``Flow of Execution'' section below. + +\end{itemize} + + +\subsubsection{Infinite Loop} +\index{infinite loop} +\index{loop!infinite} +\index{condition} +\index{loop!condition} + +If you think you have an infinite loop and you think you know +what loop is causing the problem, add a {\tt print} statement at +the end of the loop that prints the values of the variables in +the condition and the value of the condition. + +For example: + +\begin{verbatim} +while x > 0 and y < 0 : + # do something to x + # do something to y + + print('x: ', x) + print('y: ', y) + print("condition: ", (x > 0 and y < 0)) +\end{verbatim} +% +Now when you run the program, you will see three lines of output +for each time through the loop. The last time through the +loop, the condition should be {\tt False}. If the loop keeps +going, you will be able to see the values of {\tt x} and {\tt y}, +and you might figure out why they are not being updated correctly. + + +\subsubsection{Infinite Recursion} +\index{infinite recursion} +\index{recursion!infinite} + +Most of the time, infinite recursion causes the program to run +for a while and then produce a {\tt Maximum recursion depth exceeded} +error. + +If you suspect that a function is causing an infinite +recursion, make sure that there is a base case. +There should be some condition that causes the +function to return without making a recursive invocation. +If not, you need to rethink the algorithm and identify a base +case. + +If there is a base case but the program doesn't seem to be reaching +it, add a {\tt print} statement at the beginning of the function +that prints the parameters. Now when you run the program, you will see +a few lines of output every time the function is invoked, +and you will see the parameter values. If the parameters are not moving +toward the base case, you will get some ideas about why not. + + +\subsubsection{Flow of Execution} +\index{flow of execution} + +If you are not sure how the flow of execution is moving through +your program, add {\tt print} statements to the beginning of each +function with a message like ``entering function {\tt foo}'', where +{\tt foo} is the name of the function. + +Now when you run the program, it will print a trace of each +function as it is invoked. + + +\subsection{When I run the program I get an exception.} +\index{exception} +\index{runtime error} + +If something goes wrong during runtime, Python +prints a message that includes the name of the +exception, the line of the program where the problem occurred, +and a traceback. +\index{traceback} + +The traceback identifies the function that is currently running, and +then the function that called it, and then the function that called +{\em that}, and so on. In other words, it traces the sequence of +function calls that got you to where you are, including the line +number in your file where each call occurred. + +The first step is to examine the place in the program where +the error occurred and see if you can figure out what happened. +These are some of the most common runtime errors: + +\begin{description} + +\item[NameError:] You are trying to use a variable that doesn't +exist in the current environment. Check if the name +is spelled right, or at least consistently. +And remember that local variables are local; you +cannot refer to them from outside the function where they are defined. +\index{NameError} +\index{exception!NameError} + +\item[TypeError:] There are several possible causes: +\index{TypeError} +\index{exception!TypeError} + +\begin{itemize} + +\item You are trying to use a value improperly. Example: indexing +a string, list, or tuple with something other than an integer. +\index{index} + +\item There is a mismatch between the items in a format string and +the items passed for conversion. This can happen if either the number +of items does not match or an invalid conversion is called for. +\index{format operator} +\index{operator!format} + +\item You are passing the wrong number of arguments to a function. +For methods, look at the method definition and +check that the first parameter is {\tt self}. Then look at the +method invocation; make sure you are invoking the method on an +object with the right type and providing the other arguments +correctly. + +\end{itemize} + +\item[KeyError:] You are trying to access an element of a dictionary +using a key that the dictionary does not contain. If the keys +are strings, remember that capitalization matters. +\index{KeyError} +\index{exception!KeyError} +\index{dictionary} + +\item[AttributeError:] You are trying to access an attribute or method + that does not exist. Check the spelling! You can use the built-in + function {\tt vars} to list the attributes that do exist. +\index{dir function} +\index{function!dir} + +If an AttributeError indicates that an object has {\tt NoneType}, +that means that it is {\tt None}. So the problem is not the +attribute name, but the object. + +The reason the object is none might be that you forgot +to return a value from a function; if you get to the end of +a function without hitting a {\tt return} statement, it returns +{\tt None}. Another common cause is using the result from +a list method, like {\tt sort}, that returns {\tt None}. +\index{AttributeError} +\index{exception!AttributeError} + +\item[IndexError:] The index you are using +to access a list, string, or tuple is greater than +its length minus one. Immediately before the site of the error, +add a {\tt print} statement to display +the value of the index and the length of the array. +Is the array the right size? Is the index the right value? +\index{IndexError} +\index{exception!IndexError} + +\end{description} + +The Python debugger ({\tt pdb}) is useful for tracking down +exceptions because it allows you to examine the state of the +program immediately before the error. You can read +about {\tt pdb} at \url{https://docs.python.org/3/library/pdb.html}. +\index{debugger (pdb)} +\index{pdb (Python debugger)} + + +\subsection{I added so many {\tt print} statements I get inundated with +output.} +\index{print statement} +\index{statement!print} + +One of the problems with using {\tt print} statements for debugging +is that you can end up buried in output. There are two ways +to proceed: simplify the output or simplify the program. + +To simplify the output, you can remove or comment out {\tt print} +statements that aren't helping, or combine them, or format +the output so it is easier to understand. + +To simplify the program, there are several things you can do. First, +scale down the problem the program is working on. For example, if you +are searching a list, search a {\em small} list. If the program takes +input from the user, give it the simplest input that causes the +problem. +\index{dead code} + +Second, clean up the program. Remove dead code and reorganize the +program to make it as easy to read as possible. For example, if you +suspect that the problem is in a deeply nested part of the program, +try rewriting that part with simpler structure. If you suspect a +large function, try splitting it into smaller functions and testing them +separately. +\index{testing!minimal test case} +\index{test case, minimal} + +Often the process of finding the minimal test case leads you to the +bug. If you find that a program works in one situation but not in +another, that gives you a clue about what is going on. + +Similarly, rewriting a piece of code can help you find subtle +bugs. If you make a change that you think shouldn't affect the +program, and it does, that can tip you off. + + +\section{Semantic errors} + +In some ways, semantic errors are the hardest to debug, +because the interpreter provides no information +about what is wrong. Only you know what the program is supposed to +do. +\index{semantic error} +\index{error!semantic} + +The first step is to make a connection between the program +text and the behavior you are seeing. You need a hypothesis +about what the program is actually doing. One of the things +that makes that hard is that computers run so fast. + +You will often wish that you could slow the program down to human +speed, and with some debuggers you can. But the time it takes to +insert a few well-placed {\tt print} statements is often short compared to +setting up the debugger, inserting and removing breakpoints, and +``stepping'' the program to where the error is occurring. + + +\subsection{My program doesn't work.} + +You should ask yourself these questions: + +\begin{itemize} + +\item Is there something the program was supposed to do but +which doesn't seem to be happening? Find the section of the code +that performs that function and make sure it is executing when +you think it should. + +\item Is something happening that shouldn't? Find code in +your program that performs that function and see if it is +executing when it shouldn't. + +\item Is a section of code producing an effect that is not +what you expected? Make sure that you understand the code in +question, especially if it involves functions or methods in +other Python modules. Read the documentation for the functions you call. +Try them out by writing simple test cases and checking the results. + +\end{itemize} + +In order to program, you need a mental model of how +programs work. If you write a program that doesn't do what you expect, +often the problem is not in the program; it's in your mental +model. +\index{model, mental} +\index{mental model} + +The best way to correct your mental model is to break the program +into its components (usually the functions and methods) and test +each component independently. Once you find the discrepancy +between your model and reality, you can solve the problem. + +Of course, you should be building and testing components as you +develop the program. If you encounter a problem, +there should be only a small amount of new code +that is not known to be correct. + + +\subsection{I've got a big hairy expression and it doesn't +do what I expect.} +\index{expression!big and hairy} +\index{big, hairy expression} + +Writing complex expressions is fine as long as they are readable, +but they can be hard to debug. It is often a good idea to +break a complex expression into a series of assignments to +temporary variables. + +For example: + +\begin{verbatim} +self.hands[i].addCard(self.hands[self.findNeighbor(i)].popCard()) +\end{verbatim} +% +This can be rewritten as: + +\begin{verbatim} +neighbor = self.findNeighbor(i) +pickedCard = self.hands[neighbor].popCard() +self.hands[i].addCard(pickedCard) +\end{verbatim} +% +The explicit version is easier to read because the variable +names provide additional documentation, and it is easier to debug +because you can check the types of the intermediate variables +and display their values. +\index{temporary variable} +\index{variable!temporary} + +Another problem that can occur with big expressions is +that the order of evaluation may not be what you expect. +For example, if you are translating the expression +$\frac{x}{2 \pi}$ into Python, you might write: + +\begin{verbatim} +y = x / 2 * math.pi +\end{verbatim} +% +That is not correct because multiplication and division have +the same precedence and are evaluated from left to right. +So this expression computes $x \pi / 2$. +\index{order of operations} +\index{precedence} + +A good way to debug expressions is to add parentheses to make +the order of evaluation explicit: + +\begin{verbatim} + y = x / (2 * math.pi) +\end{verbatim} +% +Whenever you are not sure of the order of evaluation, use +parentheses. Not only will the program be correct (in the sense +of doing what you intended), it will also be more readable for +other people who haven't memorized the order of operations. + + +\subsection{I've got a function that doesn't return what I +expect.} +\index{return statement} +\index{statement!return} + +If you have a {\tt return} statement with a complex expression, +you don't have a chance to print the result before +returning. Again, you can use a temporary variable. For +example, instead of: + +\begin{verbatim} +return self.hands[i].removeMatches() +\end{verbatim} +% +you could write: + +\begin{verbatim} +count = self.hands[i].removeMatches() +return count +\end{verbatim} +% +Now you have the opportunity to display the value of +{\tt count} before returning. + + +\subsection{I'm really, really stuck and I need help.} + +First, try getting away from the computer for a few minutes. +Computers emit waves that affect the brain, causing these +symptoms: + +\begin{itemize} + +\item Frustration and rage. +\index{frustration} +\index{rage} +\index{debugging!emotional response} +\index{emotional debugging} + +\item Superstitious beliefs (``the computer hates me'') and +magical thinking (``the program only works when I wear my +hat backward''). +\index{debugging!superstition} +\index{superstitious debugging} + +\item Random walk programming (the attempt to program by writing +every possible program and choosing the one that does the right +thing). +\index{random walk programming} +\index{development plan!random walk programming} + +\end{itemize} + +If you find yourself suffering from any of these symptoms, get +up and go for a walk. When you are calm, think about the program. +What is it doing? What are some possible causes of that +behavior? When was the last time you had a working program, +and what did you do next? + +Sometimes it just takes time to find a bug. I often find bugs +when I am away from the computer and let my mind wander. Some +of the best places to find bugs are trains, showers, and in bed, +just before you fall asleep. + + +\subsection{No, I really need help.} + +It happens. Even the best programmers occasionally get stuck. +Sometimes you work on a program so long that you can't see the +error. You need a fresh pair of eyes. + +Before you bring someone else in, make sure you are prepared. +Your program should be as simple +as possible, and you should be working on the smallest input +that causes the error. You should have {\tt print} statements in the +appropriate places (and the output they produce should be +comprehensible). You should understand the problem well enough +to describe it concisely. + +When you bring someone in to help, be sure to give +them the information they need: + +\begin{itemize} + +\item If there is an error message, what is it +and what part of the program does it indicate? + +\item What was the last thing you did before this error occurred? +What were the last lines of code that you wrote, or what is +the new test case that fails? + +\item What have you tried so far, and what have you learned? + +\end{itemize} + +When you find the bug, take a second to think about what you +could have done to find it faster. Next time you see something +similar, you will be able to find the bug more quickly. + +Remember, the goal is not just to make the program +work. The goal is to learn how to make the program work. + + +\chapter{Analysis of Algorithms} +\label{algorithms} + +\begin{quote} +This appendix is an edited excerpt from {\it Think Complexity}, by +Allen B. Downey, also published by O'Reilly Media (2012). When you +are done with this book, you might want to move on to that one. +\end{quote} + +{\bf Analysis of algorithms} is a branch of computer science that +studies the performance of algorithms, especially their run time and +space requirements. See +\url{http://en.wikipedia.org/wiki/Analysis_of_algorithms}. +\index{algorithm} \index{analysis of algorithms} + +The practical goal of algorithm analysis is to predict the performance +of different algorithms in order to guide design decisions. + +During the 2008 United States Presidential Campaign, candidate +Barack Obama was asked to perform an impromptu analysis when +he visited Google. Chief executive Eric Schmidt jokingly asked him +for ``the most efficient way to sort a million 32-bit integers.'' +Obama had apparently been tipped off, because he quickly +replied, ``I think the bubble sort would be the wrong way to go.'' +See \url{http://www.youtube.com/watch?v=k4RRi_ntQc8}. +\index{Obama, Barack} +\index{Schmidt, Eric} +\index{bubble sort} + +This is true: bubble sort is conceptually simple but slow for +large datasets. The answer Schmidt was probably looking for is +``radix sort'' (\url{http://en.wikipedia.org/wiki/Radix_sort})\footnote{ +But if you get a question like this in an interview, I think +a better answer is, ``The fastest way to sort a million integers +is to use whatever sort function is provided by the language +I'm using. Its performance is good enough for the vast majority +of applications, but if it turned out that my application was too +slow, I would use a profiler to see where the time was being +spent. If it looked like a faster sort algorithm would have +a significant effect on performance, then I would look +around for a good implementation of radix sort.''}. +\index{radix sort} + +The goal of algorithm analysis is to make meaningful +comparisons between algorithms, but there are some problems: +\index{comparing algorithms} + +\begin{itemize} + +\item The relative performance of the algorithms might +depend on characteristics of the hardware, so one algorithm +might be faster on Machine A, another on Machine B. +The general solution to this problem is to specify a +{\bf machine model} and analyze the number of steps, or +operations, an algorithm requires under a given model. +\index{machine model} + +\item Relative performance might depend on the details of +the dataset. For example, some sorting +algorithms run faster if the data are already partially sorted; +other algorithms run slower in this case. +A common way to avoid this problem is to analyze the +{\bf worst case} scenario. It is sometimes useful to +analyze average case performance, but that's usually harder, +and it might not be obvious what set of cases to average over. +\index{worst case} +\index{average case} + +\item Relative performance also depends on the size of the +problem. A sorting algorithm that is fast for small lists +might be slow for long lists. +The usual solution to this problem is to express run time +(or number of operations) as a function of problem size, +and group functions into categories depending on how quickly +they grow as problem size increases. + +\end{itemize} + +The good thing about this kind of comparison is that it lends +itself to simple classification of algorithms. For example, +if I know that the run time of Algorithm A tends to be +proportional to the size of the input, $n$, and Algorithm B +tends to be proportional to $n^2$, then I +expect A to be faster than B, at least for large values of $n$. + +This kind of analysis comes with some caveats, but we'll get +to that later. + + +\section{Order of growth} + +Suppose you have analyzed two algorithms and expressed +their run times in terms of the size of the input: +Algorithm A takes $100n+1$ steps to solve a problem with +size $n$; Algorithm B takes $n^2 + n + 1$ steps. +\index{order of growth} + +The following table shows the run time of these algorithms +for different problem sizes: + +\begin{tabular}{|r|r|r|} +\hline +Input & Run time of & Run time of \\ +size & Algorithm A & Algorithm B \\ +\hline +10 & 1 001 & 111 \\ +100 & 10 001 & 10 101 \\ +1 000 & 100 001 & 1 001 001 \\ +10 000 & 1 000 001 & $> 10^{10}$ \\ +\hline +\end{tabular} + +At $n=10$, Algorithm A looks pretty bad; it takes almost 10 times +longer than Algorithm B. But for $n=100$ they are about the same, and +for larger values A is much better. + +The fundamental reason is that for large values of $n$, any function +that contains an $n^2$ term will grow faster than a function whose +leading term is $n$. The {\bf leading term} is the term with the +highest exponent. +\index{leading term} +\index{exponent} + +For Algorithm A, the leading term has a large coefficient, 100, which +is why B does better than A for small $n$. But regardless of the +coefficients, there will always be some value of $n$ where +$a n^2 > b n$, for any values of $a$ and $b$. +\index{leading coefficient} + +The same argument applies to the non-leading terms. Even if the run +time of Algorithm A were $n+1000000$, it would still be better than +Algorithm B for sufficiently large $n$. + +In general, we expect an algorithm with a smaller leading term to be a +better algorithm for large problems, but for smaller problems, there +may be a {\bf crossover point} where another algorithm is better. The +location of the crossover point depends on the details of the +algorithms, the inputs, and the hardware, so it is usually ignored for +purposes of algorithmic analysis. But that doesn't mean you can forget +about it. +\index{crossover point} + +If two algorithms have the same leading order term, it is hard to say +which is better; again, the answer depends on the details. So for +algorithmic analysis, functions with the same leading term +are considered equivalent, even if they have different coefficients. + +An {\bf order of growth} is a set of functions whose growth +behavior is considered equivalent. For example, $2n$, $100n$ and $n+1$ +belong to the same order of growth, which is written $O(n)$ in +{\bf Big-Oh notation} and often called {\bf linear} because every function +in the set grows linearly with $n$. +\index{big-oh notation} +\index{linear growth} + +All functions with the leading term $n^2$ belong to $O(n^2)$; they are +called {\bf quadratic}. +\index{quadratic growth} + +The following table shows some of the orders of growth that +appear most commonly in algorithmic analysis, +in increasing order of badness. +\index{badness} + +\begin{tabular}{|r|r|r|} +\hline +Order of & Name \\ +growth & \\ +\hline +$O(1)$ & constant \\ +$O(\log_b n)$ & logarithmic (for any $b$) \\ +$O(n)$ & linear \\ +$O(n \log_b n)$ & linearithmic \\ +$O(n^2)$ & quadratic \\ +$O(n^3)$ & cubic \\ +$O(c^n)$ & exponential (for any $c$) \\ +\hline +\end{tabular} + +For the logarithmic terms, the base of the logarithm doesn't matter; +changing bases is the equivalent of multiplying by a constant, which +doesn't change the order of growth. Similarly, all exponential +functions belong to the same order of growth regardless of the base of +the exponent. +Exponential functions grow very quickly, so exponential algorithms are +only useful for small problems. +\index{logarithmic growth} +\index{exponential growth} + + +\begin{exercise} + +Read the Wikipedia page on Big-Oh notation at +\url{http://en.wikipedia.org/wiki/Big_O_notation} and +answer the following questions: + +\begin{enumerate} +\item What is the order of growth of $n^3 + n^2$? +What about $1000000 n^3 + n^2$? +What about $n^3 + 1000000 n^2$? + +\item What is the order of growth of $(n^2 + n) \cdot (n + 1)$? Before + you start multiplying, remember that you only need the leading term. + +\item If $f$ is in $O(g)$, for some unspecified function $g$, what can + we say about $af+b$? + +\item If $f_1$ and $f_2$ are in $O(g)$, what can we say about $f_1 + f_2$? + +\item If $f_1$ is in $O(g)$ +and $f_2$ is in $O(h)$, +what can we say about $f_1 + f_2$? + +\item If $f_1$ is in $O(g)$ and $f_2$ is $O(h)$, +what can we say about $f_1 \cdot f_2$? +\end{enumerate} + +\end{exercise} + +Programmers who care about performance often find this kind of +analysis hard to swallow. They have a point: sometimes the +coefficients and the non-leading terms make a real difference. +Sometimes the details of the hardware, the programming language, and +the characteristics of the input make a big difference. And for small +problems asymptotic behavior is irrelevant. + +But if you keep those caveats in mind, algorithmic analysis is a +useful tool. At least for large problems, the ``better'' algorithm +is usually better, and sometimes it is {\em much} better. The +difference between two algorithms with the same order of growth is +usually a constant factor, but the difference between a good algorithm +and a bad algorithm is unbounded! + + +\section{Analysis of basic Python operations} + +In Python, most arithmetic operations are constant time; +multiplication usually takes longer than addition and subtraction, and +division takes even longer, but these run times don't depend on the +magnitude of the operands. Very large integers are an exception; in +that case the run time increases with the number of digits. +\index{analysis of primitives} + +Indexing operations---reading or writing elements in a sequence +or dictionary---are also constant time, regardless of the size +of the data structure. +\index{indexing} + +A {\tt for} loop that traverses a sequence or dictionary is +usually linear, as long as all of the operations in the body +of the loop are constant time. For example, adding up the +elements of a list is linear: + +\begin{verbatim} + total = 0 + for x in t: + total += x +\end{verbatim} + +The built-in function {\tt sum} is also linear because it does +the same thing, but it tends to be faster because it is a more +efficient implementation; in the language of algorithmic analysis, +it has a smaller leading coefficient. + +As a rule of thumb, if the body of a loop is in $O(n^a)$ then +the whole loop is in $O(n^{a+1})$. The exception is if you can +show that the loop exits after a constant number of iterations. +If a loop runs $k$ times regardless of $n$, then +the loop is in $O(n^a)$, even for large $k$. + +Multiplying by $k$ doesn't change the order of growth, but neither +does dividing. So if the body of a loop is in $O(n^a)$ and it runs +$n/k$ times, the loop is in $O(n^{a+1})$, even for large $k$. + +Most string and tuple operations are linear, except indexing and {\tt + len}, which are constant time. The built-in functions {\tt min} and +{\tt max} are linear. The run-time of a slice operation is +proportional to the length of the output, but independent of the size +of the input. +\index{string methods} +\index{tuple methods} + +String concatenation is linear; the run time depends on the sum +of the lengths of the operands. +\index{string concatenation} + +All string methods are linear, but if the lengths of +the strings are bounded by a constant---for example, operations on single +characters---they are considered constant time. +The string method {\tt join} is linear; the run time depends on +the total length of the strings. +\index{join@{\tt join}} + +Most list methods are linear, but there are some exceptions: +\index{list methods} + +\begin{itemize} + +\item Adding an element to the end of a list is constant time on +average; when it runs out of room it occasionally gets copied +to a bigger location, but the total time for $n$ operations +is $O(n)$, so the average time for each +operation is $O(1)$. + +\item Removing an element from the end of a list is constant time. + +\item Sorting is $O(n \log n)$. +\index{sorting} + +\end{itemize} + +Most dictionary operations and methods are constant time, but +there are some exceptions: +\index{dictionary methods} + +\begin{itemize} + +\item The run time of {\tt update} is + proportional to the size of the dictionary passed as a parameter, + not the dictionary being updated. + +\item {\tt keys}, {\tt values} and {\tt items} are constant time because + they return iterators. But + if you loop through the iterators, the loop will be linear. +\index{iterator} + +\end{itemize} + +The performance of dictionaries is one of the minor miracles of +computer science. We will see how they work in +Section~\ref{hashtable}. + + +\begin{exercise} + +Read the Wikipedia page on sorting algorithms at +\url{http://en.wikipedia.org/wiki/Sorting_algorithm} and answer +the following questions: +\index{sorting} + +\begin{enumerate} + +\item What is a ``comparison sort?'' What is the best worst-case order + of growth for a comparison sort? What is the best worst-case order + of growth for any sort algorithm? +\index{comparison sort} + +\item What is the order of growth of bubble sort, and why does Barack + Obama think it is ``the wrong way to go?'' + +\item What is the order of growth of radix sort? What preconditions + do we need to use it? + +\item What is a stable sort and why might it matter in practice? +\index{stable sort} + +\item What is the worst sorting algorithm (that has a name)? + +\item What sort algorithm does the C library use? What sort algorithm + does Python use? Are these algorithms stable? You might have to + Google around to find these answers. + +\item Many of the non-comparison sorts are linear, so why does does + Python use an $O(n \log n)$ comparison sort? + +\end{enumerate} + +\end{exercise} + + +\section{Analysis of search algorithms} + +A {\bf search} is an algorithm that takes a collection and a target +item and determines whether the target is in the collection, often +returning the index of the target. +\index{search} + +The simplest search algorithm is a ``linear search'', which traverses +the items of the collection in order, stopping if it finds the target. +In the worst case it has to traverse the entire collection, so the run +time is linear. +\index{linear search} + +The {\tt in} operator for sequences uses a linear search; so do string +methods like {\tt find} and {\tt count}. +\index{in@{\tt in} operator} + +If the elements of the sequence are in order, you can use a {\bf + bisection search}, which is $O(\log n)$. Bisection search is +similar to the algorithm you might use to look a word up in a +dictionary (a paper dictionary, not the data structure). Instead of +starting at the beginning and checking each item in order, you start +with the item in the middle and check whether the word you are looking +for comes before or after. If it comes before, then you search the +first half of the sequence. Otherwise you search the second half. +Either way, you cut the number of remaining items in half. +\index{bisection search} + +If the sequence has 1,000,000 items, it will take about 20 steps to +find the word or conclude that it's not there. So that's about 50,000 +times faster than a linear search. + +Bisection search can be much faster than linear search, but +it requires the sequence to be in order, which might require +extra work. + +There is another data structure, called a {\bf hashtable} that +is even faster---it can do a search in constant time---and it +doesn't require the items to be sorted. Python dictionaries +are implemented using hashtables, which is why most dictionary +operations, including the {\tt in} operator, are constant time. + + +\section{Hashtables} +\label{hashtable} + +To explain how hashtables work and why their performance is so +good, I start with a simple implementation of a map and +gradually improve it until it's a hashtable. +\index{hashtable} + +I use Python to demonstrate these implementations, but in real +life you wouldn't write code like this in Python; you would just use a +dictionary! So for the rest of this chapter, you have to imagine that +dictionaries don't exist and you want to implement a data structure +that maps from keys to values. The operations you have to +implement are: + +\begin{description} + +\item[{\tt add(k, v)}:] Add a new item that maps from key {\tt k} +to value {\tt v}. With a Python dictionary, {\tt d}, this operation +is written {\tt d[k] = v}. + +\item[{\tt get(k)}:] Look up and return the value that corresponds +to key {\tt k}. With a Python dictionary, {\tt d}, this operation +is written {\tt d[k]} or {\tt d.get(k)}. + +\end{description} + +For now, I assume that each key only appears once. +The simplest implementation of this interface uses a list of +tuples, where each tuple is a key-value pair. +\index{LinearMap@{\tt LinearMap}} + +\begin{verbatim} +class LinearMap: + + def __init__(self): + self.items = [] + + def add(self, k, v): + self.items.append((k, v)) + + def get(self, k): + for key, val in self.items: + if key == k: + return val + raise KeyError +\end{verbatim} + +{\tt add} appends a key-value tuple to the list of items, which +takes constant time. + +{\tt get} uses a {\tt for} loop to search the list: +if it finds the target key it returns the corresponding value; +otherwise it raises a {\tt KeyError}. +So {\tt get} is linear. +\index{KeyError@{\tt KeyError}} + +An alternative is to keep the list sorted by key. Then {\tt get} +could use a bisection search, which is $O(\log n)$. But inserting a +new item in the middle of a list is linear, so this might not be the +best option. There are other data structures that can implement {\tt + add} and {\tt get} in log time, but that's still not as good as +constant time, so let's move on. +\index{red-black tree} + +One way to improve {\tt LinearMap} is to break the list of key-value +pairs into smaller lists. Here's an implementation called +{\tt BetterMap}, which is a list of 100 LinearMaps. As we'll see +in a second, the order of growth for {\tt get} is still linear, +but {\tt BetterMap} is a step on the path toward hashtables: +\index{BetterMap@{\tt BetterMap}} + +\begin{verbatim} +class BetterMap: + + def __init__(self, n=100): + self.maps = [] + for i in range(n): + self.maps.append(LinearMap()) + + def find_map(self, k): + index = hash(k) % len(self.maps) + return self.maps[index] + + def add(self, k, v): + m = self.find_map(k) + m.add(k, v) + + def get(self, k): + m = self.find_map(k) + return m.get(k) +\end{verbatim} + +\verb"__init__" makes a list of {\tt n} {\tt LinearMap}s. + +\verb"find_map" is used by +{\tt add} and {\tt get} +to figure out which map to put the +new item in, or which map to search. + +\verb"find_map" uses the built-in function {\tt hash}, which takes +almost any Python object and returns an integer. A limitation of this +implementation is that it only works with hashable keys. Mutable +types like lists and dictionaries are unhashable. +\index{hash function} + +Hashable objects that are considered equivalent return the same hash +value, but the converse is not necessarily true: two objects with +different values can return the same hash value. + +\verb"find_map" uses the modulus operator to wrap the hash values +into the range from 0 to {\tt len(self.maps)}, so the result is a legal +index into the list. Of course, this means that many different +hash values will wrap onto the same index. But if the hash function +spreads things out pretty evenly (which is what hash functions +are designed to do), then we expect $n/100$ items per LinearMap. + +Since the run time of {\tt LinearMap.get} is proportional to the +number of items, we expect BetterMap to be about 100 times faster +than LinearMap. The order of growth is still linear, but the +leading coefficient is smaller. That's nice, but still not +as good as a hashtable. + +Here (finally) is the crucial idea that makes hashtables fast: if you +can keep the maximum length of the LinearMaps bounded, {\tt + LinearMap.get} is constant time. All you have to do is keep track +of the number of items and when the number of +items per LinearMap exceeds a threshold, resize the hashtable by +adding more LinearMaps. +\index{bounded} + +Here is an implementation of a hashtable: +\index{HashMap} + +\begin{verbatim} +class HashMap: + + def __init__(self): + self.maps = BetterMap(2) + self.num = 0 + + def get(self, k): + return self.maps.get(k) + + def add(self, k, v): + if self.num == len(self.maps.maps): + self.resize() + + self.maps.add(k, v) + self.num += 1 + + def resize(self): + new_maps = BetterMap(self.num * 2) + + for m in self.maps.maps: + for k, v in m.items: + new_maps.add(k, v) + + self.maps = new_maps +\end{verbatim} + +Each {\tt HashMap} contains a {\tt BetterMap}; \verb"__init__" starts +with just 2 LinearMaps and initializes {\tt num}, which keeps track of +the number of items. + +{\tt get} just dispatches to {\tt BetterMap}. The real work happens +in {\tt add}, which checks the number of items and the size of the +{\tt BetterMap}: if they are equal, the average number of items per +LinearMap is 1, so it calls {\tt resize}. + +{\tt resize} make a new {\tt BetterMap}, twice as big as the previous +one, and then ``rehashes'' the items from the old map to the new. + +Rehashing is necessary because changing the number of LinearMaps +changes the denominator of the modulus operator in +\verb"find_map". That means that some objects that used +to hash into the same LinearMap will get split up (which is +what we wanted, right?). +\index{rehashing} + +Rehashing is linear, so +{\tt resize} is linear, which might seem bad, since I promised +that {\tt add} would be constant time. But remember that +we don't have to resize every time, so {\tt add} is usually +constant time and only occasionally linear. The total amount +of work to run {\tt add} $n$ times is proportional to $n$, +so the average time of each {\tt add} is constant time! +\index{constant time} + +To see how this works, think about starting with an empty +HashTable and adding a sequence of items. We start with 2 LinearMaps, +so the first 2 adds are fast (no resizing required). Let's +say that they take one unit of work each. The next add +requires a resize, so we have to rehash the first two +items (let's call that 2 more units of work) and then +add the third item (one more unit). Adding the next item +costs 1 unit, so the total so far is +6 units of work for 4 items. + +The next {\tt add} costs 5 units, but the next three +are only one unit each, so the total is 14 units for the +first 8 adds. + +The next {\tt add} costs 9 units, but then we can add 7 more +before the next resize, so the total is 30 units for the +first 16 adds. + +After 32 adds, the total cost is 62 units, and I hope you are starting +to see a pattern. After $n$ adds, where $n$ is a power of two, the +total cost is $2n-2$ units, so the average work per add is +a little less than 2 units. When $n$ is a power of two, that's +the best case; for other values of $n$ the average work is a little +higher, but that's not important. The important thing is that it +is $O(1)$. +\index{average cost} + +Figure~\ref{fig.hash} shows how this works graphically. Each +block represents a unit of work. The columns show the total +work for each add in order from left to right: the first two +{\tt adds} cost 1 units, the third costs 3 units, etc. + +\begin{figure} +\centerline{\includegraphics[width=5.5in]{figs/towers.pdf}} +\caption{The cost of a hashtable add.\label{fig.hash}} +\end{figure} + +The extra work of rehashing appears as a sequence of increasingly +tall towers with increasing space between them. Now if you knock +over the towers, spreading the cost of resizing over all +adds, you can see graphically that the total cost after $n$ +adds is $2n - 2$. + +An important feature of this algorithm is that when we resize the +HashTable it grows geometrically; that is, we multiply the size by a +constant. If you increase the size +arithmetically---adding a fixed number each time---the average time +per {\tt add} is linear. +\index{geometric resizing} + +You can download my implementation of HashMap from +\url{http://thinkpython2.com/code/Map.py}, but remember that there +is no reason to use it; if you want a map, just use a Python dictionary. + +\section{용어 해설} +%Glossary + +\begin{description} + +\item[analysis of algorithms:] A way to compare algorithms in terms of +their run time and/or space requirements. +\index{analysis of algorithms} + +\item[machine model:] A simplified representation of a computer used +to describe algorithms. +\index{machine model} + +\item[worst case:] The input that makes a given algorithm run slowest (or +require the most space. +\index{worst case} + +\item[leading term:] In a polynomial, the term with the highest exponent. +\index{leading term} + +\item[crossover point:] The problem size where two algorithms require +the same run time or space. +\index{crossover point} + +\item[order of growth:] A set of functions that all grow in a way +considered equivalent for purposes of analysis of algorithms. +For example, all functions that grow linearly belong to the same +order of growth. +\index{order of growth} + +\item[Big-Oh notation:] Notation for representing an order of growth; +for example, $O(n)$ represents the set of functions that grow +linearly. +\index{Big-Oh notation} + +\item[linear:] An algorithm whose run time is proportional to +problem size, at least for large problem sizes. +\index{linear} + +\item[quadratic:] An algorithm whose run time is proportional to +$n^2$, where $n$ is a measure of problem size. +\index{quadratic} + +\item[search:] The problem of locating an element of a collection +(like a list or dictionary) or determining that it is not present. +\index{search} + +\item[hashtable:] A data structure that represents a collection of +key-value pairs and performs search in constant time. +\index{hashtable} + +\end{description} + + +\printindex + +\clearemptydoublepage +%\blankpage +%\blankpage +%\blankpage + + +\end{document} diff --git a/book_kr/figs/assign2.eps b/book_kr/figs/assign2.eps new file mode 100644 index 0000000..e0d56f6 --- /dev/null +++ b/book_kr/figs/assign2.eps @@ -0,0 +1,141 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: assign2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:19:36 2015 +%%BoundingBox: 0 0 60 42 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 42 moveto 0 0 lineto 60 0 lineto 60 42 lineto closepath clip newpath +-147.8 99.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2475 975 m 3450 975 l 3450 1650 l 2475 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2995 1451 m 3139 1500 l 3158 1443 l 3015 1394 l 3015 1394 l 3119 1462 l 2995 1451 l cp +eoclip +n 2760 1339 m + 3135 1467 l gs col0 s gr gr + +% arrowhead +n 2995 1451 m 3119 1462 l 3015 1394 l col0 s +% Polyline + [15 45] 45 sd +n 2766 1271 m + 3141 1174 l gs col0 s gr [] 0 sd +% Polyline +n 3075 1080 m + 3300 1230 l gs col0 s gr +% Polyline +n 3300 1080 m + 3075 1230 l gs col0 s gr +/Helvetica ff 183.33 scf sf +3150 1530 m +gs 1 -1 sc (7) col0 sh gr +/Helvetica ff 183.33 scf sf +3150 1230 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +2730 1340 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/assign2.fig b/book_kr/figs/assign2.fig new file mode 100644 index 0000000..b239db3 --- /dev/null +++ b/book_kr/figs/assign2.fig @@ -0,0 +1,23 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2760 1339 3135 1467 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2766 1271 3141 1174 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3075 1080 3300 1230 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3300 1080 3075 1230 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2475 975 3450 975 3450 1650 2475 1650 2475 975 +4 0 0 50 0 16 11 0.0000 4 120 105 3150 1530 7\001 +4 0 0 50 0 16 11 0.0000 4 120 105 3150 1230 5\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2730 1340 x\001 diff --git a/book_kr/figs/assign2.fig.bak b/book_kr/figs/assign2.fig.bak new file mode 100644 index 0000000..df54f87 --- /dev/null +++ b/book_kr/figs/assign2.fig.bak @@ -0,0 +1,25 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2325 1080 3300 1530 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2760 1339 3135 1467 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2766 1271 3141 1174 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3075 1080 3300 1230 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 + 3300 1080 3075 1230 +4 0 0 50 0 16 11 0.0000 4 120 90 3150 1530 7\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3150 1230 5\001 +4 2 0 50 0 16 11 0.0000 4 120 375 2730 1340 bruce\001 +-6 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2175 975 3450 975 3450 1650 2175 1650 2175 975 diff --git a/book_kr/figs/assign2.pdf b/book_kr/figs/assign2.pdf new file mode 100644 index 0000000..a57a3ac Binary files /dev/null and b/book_kr/figs/assign2.pdf differ diff --git a/book_kr/figs/banana.eps b/book_kr/figs/banana.eps new file mode 100644 index 0000000..653aa97 --- /dev/null +++ b/book_kr/figs/banana.eps @@ -0,0 +1,194 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: banana.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 +%%CreationDate: Thu Jan 3 09:25:45 2008 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 195 52 +%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 52 moveto 0 0 lineto 195 0 lineto 195 52 lineto closepath clip newpath +-93.8 99.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1575 825 m 4800 825 l 4800 1350 l 1575 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 1110 m 2490 1110 l 2490 1050 l 2338 1050 l 2338 1050 l 2458 1080 l 2338 1110 l cp +eoclip +n 2100 1080 m + 2475 1080 l gs col0 s gr gr + +% arrowhead +n 2338 1110 m 2458 1080 l 2338 1050 l col0 s +% Polyline + [15 45] 45 sd +n 2700 825 m + 2700 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3000 825 m + 3000 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3300 825 m + 3300 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3600 825 m + 3600 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 3900 825 m + 3900 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 4200 825 m + 4200 1500 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 4500 825 m + 4500 1500 l gs col0 s gr [] 0 sd +/Helvetica ff 183.33 scf sf +2025 1125 m +gs 1 -1 sc (fruit) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 366.67 scf sf +2775 1200 m +gs 1 -1 sc (b) col0 sh gr +/Helvetica ff 366.67 scf sf +3075 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +3375 1200 m +gs 1 -1 sc (n) col0 sh gr +/Helvetica ff 366.67 scf sf +3975 1200 m +gs 1 -1 sc (n) col0 sh gr +/Helvetica ff 366.67 scf sf +3675 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +4275 1200 m +gs 1 -1 sc (a) col0 sh gr +/Helvetica ff 366.67 scf sf +4575 1200 m +gs 1 -1 sc (') col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1650 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 183.33 scf sf +2925 1650 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +3225 1650 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +3525 1650 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +3825 1650 m +gs 1 -1 sc (4) col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1650 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +4425 1650 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1650 m +gs 1 -1 sc (index) col0 sh gr +/Helvetica ff 366.67 scf sf +2550 1200 m +gs 1 -1 sc (') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/banana.fig b/book_kr/figs/banana.fig new file mode 100644 index 0000000..f6fc430 --- /dev/null +++ b/book_kr/figs/banana.fig @@ -0,0 +1,45 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1080 2475 1080 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2700 825 2700 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3000 825 3000 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3300 825 3300 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3600 825 3600 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3900 825 3900 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 4200 825 4200 1500 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 4500 825 4500 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1575 825 4800 825 4800 1350 1575 1350 1575 825 +4 2 0 50 0 16 11 0.0000 4 135 300 2025 1125 fruit\001 +4 0 0 50 0 16 22 0.0000 4 285 210 2775 1200 b\001 +4 0 0 50 0 16 22 0.0000 4 210 195 3075 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 210 210 3375 1200 n\001 +4 0 0 50 0 16 22 0.0000 4 210 210 3975 1200 n\001 +4 0 0 50 0 16 22 0.0000 4 210 195 3675 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 210 195 4275 1200 a\001 +4 0 0 50 0 16 22 0.0000 4 90 90 4575 1200 '\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2625 1650 0\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2925 1650 1\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3225 1650 2\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3525 1650 3\001 +4 0 0 50 0 16 11 0.0000 4 135 105 3825 1650 4\001 +4 0 0 50 0 16 11 0.0000 4 135 105 4125 1650 5\001 +4 0 0 50 0 16 11 0.0000 4 135 105 4425 1650 6\001 +4 0 0 50 0 16 11 0.0000 4 135 450 2025 1650 index\001 +4 0 0 50 0 16 22 0.0000 4 90 90 2550 1200 '\001 diff --git a/book_kr/figs/banana.pdf b/book_kr/figs/banana.pdf new file mode 100644 index 0000000..70c6225 Binary files /dev/null and b/book_kr/figs/banana.pdf differ diff --git a/book_kr/figs/card1.eps b/book_kr/figs/card1.eps new file mode 100644 index 0000000..62990d9 --- /dev/null +++ b/book_kr/figs/card1.eps @@ -0,0 +1,213 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: card1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5 +%%CreationDate: Fri Jun 6 11:05:05 2008 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 194 155 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 155 moveto 0 0 lineto 194 0 lineto 194 155 lineto closepath clip newpath +-19.0 203.2 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 3150 1050 m 3525 1050 l 3525 1425 l 3150 1425 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 3150 1800 m 3525 1800 l 3525 2175 l 3150 2175 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1200 1050 m 2850 1050 l 2850 2175 l 1200 2175 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1275 2700 m 2625 2700 l 2625 3375 l 1275 3375 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +1063 1230 m 1215 1230 l 1215 1170 l 1063 1170 l 1063 1170 l 1183 1200 l 1063 1230 l cp +eoclip +n 825 1200 m + 1200 1200 l gs col0 s gr gr + +% arrowhead +n 1063 1230 m 1183 1200 l 1063 1170 l col0 s +% Polyline +gs clippath +3013 1229 m 3165 1227 l 3164 1167 l 3012 1169 l 3012 1169 l 3133 1198 l 3013 1229 l cp +eoclip +n 2625 1205 m + 3150 1198 l gs col0 s gr gr + +% arrowhead +n 3013 1229 m 3133 1198 l 3012 1169 l col0 s +% Polyline +gs clippath +3013 1977 m 3165 1975 l 3164 1915 l 3012 1917 l 3012 1917 l 3133 1946 l 3013 1977 l cp +eoclip +n 2625 1953 m + 3150 1946 l gs col0 s gr gr + +% arrowhead +n 3013 1977 m 3133 1946 l 3012 1917 l col0 s +% Polyline +gs clippath +2038 3202 m 2190 3202 l 2190 3142 l 2038 3142 l 2038 3142 l 2158 3172 l 2038 3202 l cp +eoclip +n 1800 3172 m + 2175 3172 l gs col0 s gr gr + +% arrowhead +n 2038 3202 m 2158 3172 l 2038 3142 l col0 s +% Polyline +gs clippath +2038 2902 m 2190 2902 l 2190 2842 l 2038 2842 l 2038 2842 l 2158 2872 l 2038 2902 l cp +eoclip +n 1800 2872 m + 2175 2872 l gs col0 s gr gr + +% arrowhead +n 2038 2902 m 2158 2872 l 2038 2842 l col0 s +% Polyline +gs clippath +1138 2880 m 1290 2880 l 1290 2820 l 1138 2820 l 1138 2820 l 1258 2850 l 1138 2880 l cp +eoclip +n 900 2850 m + 1275 2850 l gs col0 s gr gr + +% arrowhead +n 1138 2880 m 1258 2850 l 1138 2820 l col0 s +/Helvetica ff 183.33 scf sf +3150 975 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1275 m +gs 1 -1 sc (suit_names) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3150 1725 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2025 m +gs 1 -1 sc (rank_names) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +750 1275 m +gs 1 -1 sc (Card) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1200 975 m +gs 1 -1 sc (type) col0 sh gr +/Helvetica ff 183.33 scf sf +2250 2925 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +2250 3225 m +gs 1 -1 sc (11) col0 sh gr +/Helvetica ff 183.33 scf sf +1725 2925 m +gs 1 -1 sc (suit) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1725 3225 m +gs 1 -1 sc (rank) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +825 2925 m +gs 1 -1 sc (card1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1275 2625 m +gs 1 -1 sc (Card) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/card1.fig b/book_kr/figs/card1.fig new file mode 100644 index 0000000..514e2b0 --- /dev/null +++ b/book_kr/figs/card1.fig @@ -0,0 +1,47 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 825 1200 1200 1200 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3150 1050 3525 1050 3525 1425 3150 1425 3150 1050 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2625 1205 3150 1198 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3150 1800 3525 1800 3525 2175 3150 2175 3150 1800 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2625 1953 3150 1946 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1200 1050 2850 1050 2850 2175 1200 2175 1200 1050 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 3172 2175 3172 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 2872 2175 2872 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1275 2700 2625 2700 2625 3375 1275 3375 1275 2700 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 900 2850 1275 2850 +4 0 0 50 0 16 11 0.0000 4 135 225 3150 975 list\001 +4 2 0 50 0 16 11 0.0000 4 165 930 2550 1275 suit_names\001 +4 0 0 50 0 16 11 0.0000 4 135 225 3150 1725 list\001 +4 2 0 50 0 16 11 0.0000 4 165 1005 2550 2025 rank_names\001 +4 2 0 50 0 16 11 0.0000 4 135 405 750 1275 Card\001 +4 0 0 50 0 16 11 0.0000 4 180 360 1200 975 type\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2250 2925 1\001 +4 0 0 50 0 16 11 0.0000 4 135 210 2250 3225 11\001 +4 2 0 50 0 16 11 0.0000 4 135 285 1725 2925 suit\001 +4 2 0 50 0 16 11 0.0000 4 135 360 1725 3225 rank\001 +4 2 0 50 0 16 11 0.0000 4 135 480 825 2925 card1\001 +4 0 0 50 0 16 11 0.0000 4 135 405 1275 2625 Card\001 diff --git a/book_kr/figs/card1.pdf b/book_kr/figs/card1.pdf new file mode 100644 index 0000000..da70509 Binary files /dev/null and b/book_kr/figs/card1.pdf differ diff --git a/book_kr/figs/class1.eps b/book_kr/figs/class1.eps new file mode 100644 index 0000000..0bd9600 --- /dev/null +++ b/book_kr/figs/class1.eps @@ -0,0 +1,142 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: class1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 +%%CreationDate: Thu Aug 16 11:40:34 2007 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 150 87 +%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 87 moveto 0 0 lineto 150 0 lineto 150 87 lineto closepath clip newpath +-156.8 149.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2625 1050 m 3525 1050 l 3525 1500 l 2625 1500 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2625 2025 m 3525 2025 l 3525 2475 l 2625 2475 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4200 1050 m 5100 1050 l 5100 1500 l 4200 1500 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3150 1627 m 3150 1485 l 3000 1485 l 3000 1627 l 3000 1627 l 3075 1507 l 3150 1627 l cp +eoclip +n 3075 2025 m + 3075 1500 l gs col0 s gr gr + +% arrowhead +n 3150 1627 m 3075 1507 l 3000 1627 l 3150 1627 l cp gs col7 1.00 shd ef gr col0 s +% Polyline +gs clippath +4071 1335 m 4215 1335 l 4215 1215 l 4071 1215 l 4071 1215 l 4191 1275 l 4071 1335 l cp +eoclip +n 3525 1275 m + 4200 1275 l gs col0 s gr gr + +% arrowhead +n 4071 1335 m 4191 1275 l 4071 1215 l col0 s +/Helvetica ff 183.33 scf sf +2850 2325 m +gs 1 -1 sc (Hand) col0 sh gr +/Helvetica ff 183.33 scf sf +2850 1350 m +gs 1 -1 sc (Deck) col0 sh gr +/Helvetica ff 233.33 scf sf +4125 1275 m +gs 1 -1 sc (*) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4800 1350 m +gs 1 -1 sc (Card) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/class1.fig b/book_kr/figs/class1.fig new file mode 100644 index 0000000..1dbd926 --- /dev/null +++ b/book_kr/figs/class1.fig @@ -0,0 +1,25 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2625 1050 3525 1050 3525 1500 2625 1500 2625 1050 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2625 2025 3525 2025 3525 2475 2625 2475 2625 2025 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 0 1.00 150.00 120.00 + 3075 2025 3075 1500 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 120.00 120.00 + 3525 1275 4200 1275 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4200 1050 5100 1050 5100 1500 4200 1500 4200 1050 +4 0 0 50 0 16 11 0.0000 4 135 450 2850 2325 Hand\001 +4 0 0 50 0 16 11 0.0000 4 135 435 2850 1350 Deck\001 +4 2 0 50 0 16 14 0.0000 4 75 90 4125 1275 *\001 +4 2 0 50 0 16 11 0.0000 4 135 405 4800 1350 Card\001 diff --git a/book_kr/figs/class1.pdf b/book_kr/figs/class1.pdf new file mode 100644 index 0000000..16091c7 Binary files /dev/null and b/book_kr/figs/class1.pdf differ diff --git a/book_kr/figs/compile.eps b/book_kr/figs/compile.eps new file mode 100644 index 0000000..901f239 --- /dev/null +++ b/book_kr/figs/compile.eps @@ -0,0 +1,222 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: compile.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:14:49 2012 +%%BoundingBox: 0 0 385 61 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 61 moveto 0 0 lineto 385 0 lineto 385 61 lineto closepath clip newpath +-2.7 86.0 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 63 +% Polyline +0 slj +0 slc +15.000 slw +n 3936 655 m 3840 548 l 3840 915 l + 3936 813 l gs col0 s gr +% Polyline +n 1304 647 m 1207 540 l 1207 907 l + 1304 805 l gs col0 s gr +% here ends figure; +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +gs clippath +3657 795 m 3869 795 l 3869 705 l 3657 705 l 3657 705 l 3837 750 l 3657 795 l cp +eoclip +n 3525 750 m + 3854 750 l gs col0 s gr gr + +% arrowhead +n 3657 795 m 3837 750 l 3657 705 l col0 s +% Polyline +15.000 slw +n 5002 1248 m 5100 1350 l 5100 984 l + 5002 1089 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +5232 1170 m 5444 1170 l 5444 1080 l 5232 1080 l 5232 1080 l 5412 1125 l 5232 1170 l cp +eoclip +n 5100 1125 m + 5429 1125 l gs col0 s gr gr + +% arrowhead +n 5232 1170 m 5412 1125 l 5232 1080 l col0 s +% Polyline +15.000 slw +n 3936 548 m 5010 548 l 5010 1342 l 3936 1342 l + cp gs col0 s gr +% Polyline +n 2700 525 m 3525 525 l 3525 1350 l 2700 1350 l + cp gs col0 s gr +% Polyline +7.500 slw +gs clippath +1024 787 m 1236 787 l 1236 697 l 1024 697 l 1024 697 l 1204 742 l 1024 787 l cp +eoclip +n 892 742 m + 1221 742 l gs col0 s gr gr + +% arrowhead +n 1024 787 m 1204 742 l 1024 697 l col0 s +% Polyline +15.000 slw +n 67 442 m 742 442 l 892 592 l 892 1342 l 67 1342 l + 67 442 l cp gs col0 s gr +% Polyline +7.500 slw +n 742 442 m 742 592 l + 892 592 l gs col0 s gr +% Polyline +15.000 slw +n 1304 540 m 2274 540 l 2274 1327 l 1304 1327 l + cp gs col0 s gr +% Polyline +n 2274 1225 m 2371 1327 l 2371 961 l + 2274 1066 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +2509 1162 m 2721 1162 l 2721 1072 l 2509 1072 l 2509 1072 l 2689 1117 l 2509 1162 l cp +eoclip +n 2377 1117 m + 2706 1117 l gs col0 s gr gr + +% arrowhead +n 2509 1162 m 2689 1117 l 2509 1072 l col0 s +% Polyline +15.000 slw +n 5694 1296 m 6151 1296 l 6151 1356 l 5694 1356 l + cp gs col0 s gr +% Polyline +n 5598 1357 m 6259 1357 l 6259 1412 l 5598 1412 l + cp gs col0 s gr +% Polyline +n 5413 463 m 6437 463 l 6437 1296 l 5413 1296 l + cp gs col7 1.00 shd ef gr gs col0 s gr +% Polyline +7.500 slw +n 5467 519 m 6381 519 l 6381 1237 l 5467 1237 l + cp gs col7 1.00 shd ef gr gs col0 s gr +/Helvetica ff 166.67 scf sf +2775 1125 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +2775 900 m +gs 1 -1 sc (OBJECT) col0 sh gr +/Helvetica ff 166.67 scf sf +4005 975 m +gs 1 -1 sc (EXECUTOR) col0 sh gr +/Helvetica ff 166.67 scf sf +142 1117 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +142 892 m +gs 1 -1 sc (SOURCE) col0 sh gr +/Helvetica ff 166.67 scf sf +1342 967 m +gs 1 -1 sc (COMPILER) col0 sh gr +/Helvetica ff 166.67 scf sf +5588 953 m +gs 1 -1 sc (OUTPUT) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/compile.fig b/book_kr/figs/compile.fig new file mode 100644 index 0000000..cf882be --- /dev/null +++ b/book_kr/figs/compile.fig @@ -0,0 +1,54 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 3525 750 3854 750 +2 1 0 2 0 7 63 0 -1 0.000 0 0 -1 0 0 4 + 3936 655 3840 548 3840 915 3936 813 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 5002 1248 5100 1350 5100 984 5002 1089 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 5100 1125 5429 1125 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 3936 548 5010 548 5010 1342 3936 1342 3936 548 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 2700 525 3525 525 3525 1350 2700 1350 2700 525 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 892 742 1221 742 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 6 + 67 442 742 442 892 592 892 1342 67 1342 67 442 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 + 742 442 742 592 892 592 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 1304 540 2274 540 2274 1327 1304 1327 1304 540 +2 1 0 2 0 7 63 0 -1 0.000 0 0 -1 0 0 4 + 1304 647 1207 540 1207 907 1304 805 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 2274 1225 2371 1327 2371 961 2274 1066 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 2377 1117 2706 1117 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5694 1296 6151 1296 6151 1356 5694 1356 5694 1296 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5598 1357 6259 1357 6259 1412 5598 1412 5598 1357 +2 2 0 2 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5413 463 6437 463 6437 1296 5413 1296 5413 463 +2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5467 519 6381 519 6381 1237 5467 1237 5467 519 +4 0 0 50 0 16 10 0.0000 4 120 465 2775 1125 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 600 2775 900 OBJECT\001 +4 0 0 50 0 16 10 0.0000 4 120 855 4005 975 EXECUTOR\001 +4 0 0 50 0 16 10 0.0000 4 120 465 142 1117 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 675 142 892 SOURCE\001 +4 0 0 50 0 16 10 0.0000 4 120 825 1342 967 COMPILER\001 +4 0 0 50 0 16 10 0.0000 4 120 615 5588 953 OUTPUT\001 diff --git a/book_kr/figs/compile.pdf b/book_kr/figs/compile.pdf new file mode 100644 index 0000000..2c888ea Binary files /dev/null and b/book_kr/figs/compile.pdf differ diff --git a/book_kr/figs/dict1.eps b/book_kr/figs/dict1.eps new file mode 100644 index 0000000..7987e4d --- /dev/null +++ b/book_kr/figs/dict1.eps @@ -0,0 +1,321 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: dict1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:32:19 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 316 134 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 134 moveto 0 0 lineto 316 0 lineto 316 134 lineto closepath clip newpath +-27.0 225.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1125 1725 m 2400 1725 l 2400 3300 l 1125 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 1725 m 5700 1725 l 5700 3000 l 4350 3000 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 3375 1725 m 4050 1725 l 4050 3750 l 3375 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 3375 m 5700 3375 l 5700 3750 l 4350 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +1965 2227 m 1965 2167 l 1813 2167 l 1933 2197 l 1813 2227 l cp +eoclip +n 1575 2197 m + 1950 2197 l gs col0 s gr gr + +% arrowhead +n 1813 2227 m 1933 2197 l 1813 2167 l col0 s +% Polyline +gs clippath +1965 1927 m 1965 1867 l 1813 1867 l 1933 1897 l 1813 1927 l cp +eoclip +n 1575 1897 m + 1950 1897 l gs col0 s gr gr + +% arrowhead +n 1813 1927 m 1933 1897 l 1813 1867 l col0 s +% Polyline +gs clippath +1140 1905 m 1140 1845 l 988 1845 l 1108 1875 l 988 1905 l cp +eoclip +n 750 1875 m + 1125 1875 l gs col0 s gr gr + +% arrowhead +n 988 1905 m 1108 1875 l 988 1845 l col0 s +% Polyline +gs clippath +1965 2827 m 1965 2767 l 1813 2767 l 1933 2797 l 1813 2827 l cp +eoclip +n 1575 2797 m + 1950 2797 l gs col0 s gr gr + +% arrowhead +n 1813 2827 m 1933 2797 l 1813 2767 l col0 s +% Polyline +gs clippath +1965 3127 m 1965 3067 l 1813 3067 l 1933 3097 l 1813 3127 l cp +eoclip +n 1575 3097 m + 1950 3097 l gs col0 s gr gr + +% arrowhead +n 1813 3127 m 1933 3097 l 1813 3067 l col0 s +% Polyline +gs clippath +1965 2527 m 1965 2467 l 1813 2467 l 1933 2497 l 1813 2527 l cp +eoclip +n 1575 2497 m + 1950 2497 l gs col0 s gr gr + +% arrowhead +n 1813 2527 m 1933 2497 l 1813 2467 l col0 s +/Helvetica ff 165.00 scf sf +1500 1950 m +gs 1 -1 sc ('a') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1950 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1125 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +450 1950 m +gs 1 -1 sc (hist) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2250 m +gs 1 -1 sc ('p') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2850 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 3150 m +gs 1 -1 sc ('o') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 3150 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2550 m +gs 1 -1 sc ('r') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2550 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2850 m +gs 1 -1 sc ('t') dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +5190 2227 m 5190 2167 l 5038 2167 l 5158 2197 l 5038 2227 l cp +eoclip +n 4800 2197 m + 5175 2197 l gs col0 s gr gr + +% arrowhead +n 5038 2227 m 5158 2197 l 5038 2167 l col0 s +% Polyline +gs clippath +5190 1927 m 5190 1867 l 5038 1867 l 5158 1897 l 5038 1927 l cp +eoclip +n 4800 1897 m + 5175 1897 l gs col0 s gr gr + +% arrowhead +n 5038 1927 m 5158 1897 l 5038 1867 l col0 s +% Polyline +gs clippath +5190 2527 m 5190 2467 l 5038 2467 l 5158 2497 l 5038 2527 l cp +eoclip +n 4800 2497 m + 5175 2497 l gs col0 s gr gr + +% arrowhead +n 5038 2527 m 5158 2497 l 5038 2467 l col0 s +% Polyline +gs clippath +5190 2827 m 5190 2767 l 5038 2767 l 5158 2797 l 5038 2827 l cp +eoclip +n 4800 2797 m + 5175 2797 l gs col0 s gr gr + +% arrowhead +n 5038 2827 m 5158 2797 l 5038 2767 l col0 s +/Helvetica ff 165.00 scf sf +4725 1950 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2250 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 1950 m +gs 1 -1 sc ('a') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2250 m +gs 1 -1 sc ('p') col0 sh gr +/Helvetica ff 165.00 scf sf +4350 1650 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2550 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2550 m +gs 1 -1 sc ('t') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2850 m +gs 1 -1 sc ('o') col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2850 m +gs 1 -1 sc (3) dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +4365 1919 m 4364 1859 l 4212 1861 l 4333 1890 l 4213 1921 l cp +eoclip +n 3825 1897 m + 4350 1890 l gs col0 s gr gr + +% arrowhead +n 4213 1921 m 4333 1890 l 4212 1861 l col0 s +% Polyline +gs clippath +3390 1905 m 3390 1845 l 3238 1845 l 3358 1875 l 3238 1905 l cp +eoclip +n 3000 1875 m + 3375 1875 l gs col0 s gr gr + +% arrowhead +n 3238 1905 m 3358 1875 l 3238 1845 l col0 s +% Polyline +gs clippath +4365 3551 m 4364 3491 l 4212 3493 l 4333 3522 l 4213 3553 l cp +eoclip +n 3825 3529 m + 4350 3522 l gs col0 s gr gr + +% arrowhead +n 4213 3553 m 4333 3522 l 4212 3493 l col0 s +% Polyline +gs clippath +5190 3577 m 5190 3517 l 5038 3517 l 5158 3547 l 5038 3577 l cp +eoclip +n 4800 3547 m + 5175 3547 l gs col0 s gr gr + +% arrowhead +n 5038 3577 m 5158 3547 l 5038 3517 l col0 s +/Helvetica ff 165.00 scf sf +3750 1950 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3375 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +2700 1950 m +gs 1 -1 sc (inv) col0 sh gr +/Helvetica ff 165.00 scf sf +3750 3600 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 3600 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4350 3300 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +5250 3600 m +gs 1 -1 sc ('r') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/dict1.fig b/book_kr/figs/dict1.fig new file mode 100644 index 0000000..f1cf02e --- /dev/null +++ b/book_kr/figs/dict1.fig @@ -0,0 +1,91 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 450 1500 2400 3300 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2197 1950 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 1897 1950 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 750 1875 1125 1875 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2797 1950 2797 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 3097 1950 3097 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2497 1950 2497 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1125 1725 2400 1725 2400 3300 1125 3300 1125 1725 +4 2 0 50 0 16 11 0.0000 4 120 135 1500 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 1125 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 255 450 1950 hist\001 +4 2 0 50 0 16 11 0.0000 4 150 150 1500 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2850 1\001 +4 2 0 50 0 16 11 0.0000 4 120 150 1500 3150 'o'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 3150 1\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2550 'r'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2550 2\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2850 't'\001 +-6 +6 4350 1500 5700 3000 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2197 5175 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 1897 5175 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2497 5175 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2797 5175 2797 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 1725 5700 1725 5700 3000 4350 3000 4350 1725 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 1950 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 135 5250 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 150 150 5250 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 1650 list\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2550 2\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 2550 't'\001 +4 0 0 50 0 16 11 0.0000 4 120 150 5250 2850 'o'\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2850 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 1897 4350 1890 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 1875 3375 1875 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3375 1725 4050 1725 4050 3750 3375 3750 3375 1725 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 3529 4350 3522 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 3547 5175 3547 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 3375 5700 3375 5700 3750 4350 3750 4350 3375 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 3375 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 210 2700 1950 inv\001 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 3600 2\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 3600 0\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 3300 list\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 3600 'r'\001 diff --git a/book_kr/figs/dict1.pdf b/book_kr/figs/dict1.pdf new file mode 100644 index 0000000..db7af31 Binary files /dev/null and b/book_kr/figs/dict1.pdf differ diff --git a/book_kr/figs/dict2.eps b/book_kr/figs/dict2.eps new file mode 100644 index 0000000..b1023b7 --- /dev/null +++ b/book_kr/figs/dict2.eps @@ -0,0 +1,195 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: dict2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:39:25 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 231 125 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 125 moveto 0 0 lineto 231 0 lineto 231 125 lineto closepath clip newpath +-75.8 194.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1275 1350 m 5100 1350 l 5100 3225 l 1275 3225 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3690 1852 m 3690 1792 l 3538 1792 l 3658 1822 l 3538 1852 l cp +eoclip +n 3300 1822 m + 3675 1822 l gs col0 s gr gr + +% arrowhead +n 3538 1852 m 3658 1822 l 3538 1792 l col0 s +% Polyline +gs clippath +3690 1552 m 3690 1492 l 3538 1492 l 3658 1522 l 3538 1552 l cp +eoclip +n 3300 1522 m + 3675 1522 l gs col0 s gr gr + +% arrowhead +n 3538 1552 m 3658 1522 l 3538 1492 l col0 s +% Polyline +gs clippath +3690 2452 m 3690 2392 l 3538 2392 l 3658 2422 l 3538 2452 l cp +eoclip +n 3300 2422 m + 3675 2422 l gs col0 s gr gr + +% arrowhead +n 3538 2452 m 3658 2422 l 3538 2392 l col0 s +% Polyline +gs clippath +3690 2752 m 3690 2692 l 3538 2692 l 3658 2722 l 3538 2752 l cp +eoclip +n 3300 2722 m + 3675 2722 l gs col0 s gr gr + +% arrowhead +n 3538 2752 m 3658 2722 l 3538 2692 l col0 s +% Polyline +gs clippath +3690 2152 m 3690 2092 l 3538 2092 l 3658 2122 l 3538 2152 l cp +eoclip +n 3300 2122 m + 3675 2122 l gs col0 s gr gr + +% arrowhead +n 3538 2152 m 3658 2122 l 3538 2092 l col0 s +% Polyline +gs clippath +3690 3030 m 3690 2970 l 3538 2970 l 3658 3000 l 3538 3030 l cp +eoclip +n 3300 3000 m + 3675 3000 l gs col0 s gr gr + +% arrowhead +n 3538 3030 m 3658 3000 l 3538 2970 l col0 s +/Helvetica ff 165.00 scf sf +3225 1575 m +gs 1 -1 sc (\('Cleese', 'John'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1575 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1875 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2175 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2475 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2775 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +3225 1875 m +gs 1 -1 sc (\('Chapman', 'Graham'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2175 m +gs 1 -1 sc (\('Idle', 'Eric'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2775 m +gs 1 -1 sc (\('Jones', 'Terry'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2475 m +gs 1 -1 sc (\('Gilliam', 'Terry'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3225 3075 m +gs 1 -1 sc (\('Palin', 'Michael'\)) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 3075 m +gs 1 -1 sc ('08700 100 222') col0 sh gr +/Helvetica ff 165.00 scf sf +1275 1275 m +gs 1 -1 sc (dict) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/dict2.fig b/book_kr/figs/dict2.fig new file mode 100644 index 0000000..d376f55 --- /dev/null +++ b/book_kr/figs/dict2.fig @@ -0,0 +1,42 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 1822 3675 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 1522 3675 1522 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2422 3675 2422 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2722 3675 2722 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2122 3675 2122 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 3000 3675 3000 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1275 1350 5100 1350 5100 3225 1275 3225 1275 1350 +4 2 0 50 0 16 11 0.0000 4 150 1125 3225 1575 ('Cleese', 'John')\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 1575 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 1875 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2175 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2475 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 2775 '08700 100 222'\001 +4 2 0 50 0 16 11 0.0000 4 150 1530 3225 1875 ('Chapman', 'Graham')\001 +4 2 0 50 0 16 11 0.0000 4 150 840 3225 2175 ('Idle', 'Eric')\001 +4 2 0 50 0 16 11 0.0000 4 150 1080 3225 2775 ('Jones', 'Terry')\001 +4 2 0 50 0 16 11 0.0000 4 150 1110 3225 2475 ('Gilliam', 'Terry')\001 +4 2 0 50 0 16 11 0.0000 4 150 1170 3225 3075 ('Palin', 'Michael')\001 +4 0 0 50 0 16 11 0.0000 4 120 1140 3750 3075 '08700 100 222'\001 +4 0 0 50 0 16 11 0.0000 4 120 255 1275 1275 dict\001 diff --git a/book_kr/figs/dict2.pdf b/book_kr/figs/dict2.pdf new file mode 100644 index 0000000..114a87a Binary files /dev/null and b/book_kr/figs/dict2.pdf differ diff --git a/book_kr/figs/fibonacci.eps b/book_kr/figs/fibonacci.eps new file mode 100644 index 0000000..ed1a8e3 --- /dev/null +++ b/book_kr/figs/fibonacci.eps @@ -0,0 +1,356 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: fibonacci.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Fri Dec 7 17:25:43 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 308 218 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 218 moveto 0 0 lineto 308 0 lineto 308 218 lineto closepath clip newpath +-62.0 244.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 3450 450 m 4350 450 l 4350 1125 l 3450 1125 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2250 1425 m 3150 1425 l 3150 2100 l 2250 2100 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4650 1425 m 5550 1425 l 5550 2100 l 4650 2100 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 5250 2400 m 6150 2400 l 6150 3075 l 5250 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4050 2400 m 4950 2400 l 4950 3075 l 4050 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2850 2400 m 3750 2400 l 3750 3075 l 2850 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 2400 m 2550 2400 l 2550 3075 l 1650 3075 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2250 3375 m 3150 3375 l 3150 4050 l 2250 4050 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1050 3375 m 1950 3375 l 1950 4050 l 1050 4050 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +4095 929 m 4095 869 l 3943 869 l 4063 899 l 3943 929 l cp +eoclip +n 3705 899 m + 4080 899 l gs col0 s gr gr + +% arrowhead +n 3943 929 m 4063 899 l 3943 869 l col0 s +/Helvetica ff 165.00 scf sf +3555 705 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +3630 952 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4155 952 m +gs 1 -1 sc (4) col0 sh gr +% Polyline +gs clippath +3118 1414 m 3160 1456 l 3268 1349 l 3162 1413 l 3225 1306 l cp +eoclip +n 3450 1125 m + 3150 1425 l gs col0 s gr gr + +% arrowhead +n 3225 1306 m 3162 1413 l 3268 1349 l col0 s +% Polyline +gs clippath +2068 2389 m 2110 2431 l 2218 2324 l 2112 2388 l 2175 2281 l cp +eoclip +n 2400 2100 m + 2100 2400 l gs col0 s gr gr + +% arrowhead +n 2175 2281 m 2112 2388 l 2218 2324 l col0 s +% Polyline +gs clippath +1468 3364 m 1510 3406 l 1618 3299 l 1512 3363 l 1575 3256 l cp +eoclip +n 1800 3075 m + 1500 3375 l gs col0 s gr gr + +% arrowhead +n 1575 3256 m 1512 3363 l 1618 3299 l col0 s +% Polyline +gs clippath +4468 2389 m 4510 2431 l 4618 2324 l 4512 2388 l 4575 2281 l cp +eoclip +n 4800 2100 m + 4500 2400 l gs col0 s gr gr + +% arrowhead +n 4575 2281 m 4512 2388 l 4618 2324 l col0 s +% Polyline +gs clippath +4639 1456 m 4681 1414 l 4574 1306 l 4638 1413 l 4531 1349 l cp +eoclip +n 4350 1125 m + 4650 1425 l gs col0 s gr gr + +% arrowhead +n 4531 1349 m 4638 1413 l 4574 1306 l col0 s +% Polyline +gs clippath +3289 2431 m 3331 2389 l 3224 2281 l 3288 2388 l 3181 2324 l cp +eoclip +n 3000 2100 m + 3300 2400 l gs col0 s gr gr + +% arrowhead +n 3181 2324 m 3288 2388 l 3224 2281 l col0 s +% Polyline +gs clippath +2689 3406 m 2731 3364 l 2624 3256 l 2688 3363 l 2581 3299 l cp +eoclip +n 2400 3075 m + 2700 3375 l gs col0 s gr gr + +% arrowhead +n 2581 3299 m 2688 3363 l 2624 3256 l col0 s +% Polyline +gs clippath +5689 2431 m 5731 2389 l 5624 2281 l 5688 2388 l 5581 2324 l cp +eoclip +n 5400 2100 m + 5700 2400 l gs col0 s gr gr + +% arrowhead +n 5581 2324 m 5688 2388 l 5624 2281 l col0 s +% Polyline +gs clippath +2895 1904 m 2895 1844 l 2743 1844 l 2863 1874 l 2743 1904 l cp +eoclip +n 2505 1874 m + 2880 1874 l gs col0 s gr gr + +% arrowhead +n 2743 1904 m 2863 1874 l 2743 1844 l col0 s +% Polyline +gs clippath +5295 1904 m 5295 1844 l 5143 1844 l 5263 1874 l 5143 1904 l cp +eoclip +n 4905 1874 m + 5280 1874 l gs col0 s gr gr + +% arrowhead +n 5143 1904 m 5263 1874 l 5143 1844 l col0 s +% Polyline +gs clippath +5895 2879 m 5895 2819 l 5743 2819 l 5863 2849 l 5743 2879 l cp +eoclip +n 5505 2849 m + 5880 2849 l gs col0 s gr gr + +% arrowhead +n 5743 2879 m 5863 2849 l 5743 2819 l col0 s +% Polyline +gs clippath +4695 2879 m 4695 2819 l 4543 2819 l 4663 2849 l 4543 2879 l cp +eoclip +n 4305 2849 m + 4680 2849 l gs col0 s gr gr + +% arrowhead +n 4543 2879 m 4663 2849 l 4543 2819 l col0 s +% Polyline +gs clippath +3495 2879 m 3495 2819 l 3343 2819 l 3463 2849 l 3343 2879 l cp +eoclip +n 3105 2849 m + 3480 2849 l gs col0 s gr gr + +% arrowhead +n 3343 2879 m 3463 2849 l 3343 2819 l col0 s +% Polyline +gs clippath +2295 2879 m 2295 2819 l 2143 2819 l 2263 2849 l 2143 2879 l cp +eoclip +n 1905 2849 m + 2280 2849 l gs col0 s gr gr + +% arrowhead +n 2143 2879 m 2263 2849 l 2143 2819 l col0 s +% Polyline +gs clippath +2895 3854 m 2895 3794 l 2743 3794 l 2863 3824 l 2743 3854 l cp +eoclip +n 2505 3824 m + 2880 3824 l gs col0 s gr gr + +% arrowhead +n 2743 3854 m 2863 3824 l 2743 3794 l col0 s +% Polyline +gs clippath +1695 3854 m 1695 3794 l 1543 3794 l 1663 3824 l 1543 3854 l cp +eoclip +n 1305 3824 m + 1680 3824 l gs col0 s gr gr + +% arrowhead +n 1543 3854 m 1663 3824 l 1543 3794 l col0 s +/Helvetica ff 165.00 scf sf +2355 1680 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +2430 1927 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2955 1927 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 165.00 scf sf +4755 1680 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +4830 1927 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5355 1927 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +5355 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +5430 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5955 2902 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 165.00 scf sf +4155 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +4230 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4755 2902 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2955 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +3030 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3555 2902 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1755 2655 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +1830 2902 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2355 2902 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +2355 3630 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +2430 3877 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2955 3877 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 165.00 scf sf +1155 3630 m +gs 1 -1 sc (fibonacci) col0 sh gr +/Helvetica ff 165.00 scf sf +1230 3877 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +1755 3877 m +gs 1 -1 sc (1) col0 sh gr +$F2psEnd +rs diff --git a/book_kr/figs/fibonacci.fig b/book_kr/figs/fibonacci.fig new file mode 100644 index 0000000..244cee1 --- /dev/null +++ b/book_kr/figs/fibonacci.fig @@ -0,0 +1,107 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3450 450 4350 1125 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3450 450 4350 450 4350 1125 3450 1125 3450 450 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3705 899 4080 899 +4 0 0 50 0 16 11 0.0000 4 120 615 3555 705 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 3630 952 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 4155 952 4\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3450 1125 3150 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 2100 2100 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 3075 1500 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2100 4500 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4350 1125 4650 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 2100 3300 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 3075 2700 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 2100 5700 2400 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2250 1425 3150 1425 3150 2100 2250 2100 2250 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2505 1874 2880 1874 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4650 1425 5550 1425 5550 2100 4650 2100 4650 1425 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4905 1874 5280 1874 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 5250 2400 6150 2400 6150 3075 5250 3075 5250 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5505 2849 5880 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4050 2400 4950 2400 4950 3075 4050 3075 4050 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4305 2849 4680 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2850 2400 3750 2400 3750 3075 2850 3075 2850 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3105 2849 3480 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2400 2550 2400 2550 3075 1650 3075 1650 2400 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1905 2849 2280 2849 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2250 3375 3150 3375 3150 4050 2250 4050 2250 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2505 3824 2880 3824 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1050 3375 1950 3375 1950 4050 1050 4050 1050 3375 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1305 3824 1680 3824 +4 0 0 50 0 16 11 0.0000 4 120 615 2355 1680 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2430 1927 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2955 1927 3\001 +4 0 0 50 0 16 11 0.0000 4 120 615 4755 1680 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 4830 1927 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 5355 1927 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 5355 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 5430 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 5955 2902 0\001 +4 0 0 50 0 16 11 0.0000 4 120 615 4155 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 4230 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 4755 2902 1\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2955 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 3030 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3555 2902 1\001 +4 0 0 50 0 16 11 0.0000 4 120 615 1755 2655 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 1830 2902 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2355 2902 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2355 3630 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2430 3877 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2955 3877 0\001 +4 0 0 50 0 16 11 0.0000 4 120 615 1155 3630 fibonacci\001 +4 2 0 50 0 16 11 0.0000 4 90 90 1230 3877 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 1755 3877 1\001 diff --git a/book_kr/figs/fibonacci.pdf b/book_kr/figs/fibonacci.pdf new file mode 100644 index 0000000..ed4dc0d Binary files /dev/null and b/book_kr/figs/fibonacci.pdf differ diff --git a/book_kr/figs/flower.test.pdf b/book_kr/figs/flower.test.pdf new file mode 100644 index 0000000..d48dd61 Binary files /dev/null and b/book_kr/figs/flower.test.pdf differ diff --git a/book_kr/figs/flowers.eps b/book_kr/figs/flowers.eps new file mode 100644 index 0000000..9027094 --- /dev/null +++ b/book_kr/figs/flowers.eps @@ -0,0 +1,9835 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Tk Canvas Widget +%%For: Allen Downey +%%Title: Window .-1211575348 +%%CreationDate: Mon Jul 2 09:55:23 2007 +%%BoundingBox: 174 345 438 448 +%%Pages: 1 +%%DocumentData: Clean7Bit +%%Orientation: Portrait +%%EndComments + +%%BeginProlog +/CurrentEncoding [ +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle +/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash +/zero/one/two/three/four/five/six/seven +/eight/nine/colon/semicolon/less/equal/greater/question +/at/A/B/C/D/E/F/G +/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W +/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore +/grave/a/b/c/d/e/f/g +/h/i/j/k/l/m/n/o +/p/q/r/s/t/u/v/w +/x/y/z/braceleft/bar/braceright/asciitilde/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclamdown/cent/sterling/currency/yen/brokenbar/section +/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron +/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered +/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis +/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply +/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls +/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide +/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis +] def + +50 dict begin +% This is a standard prolog for Postscript generated by Tk's canvas +% widget. +% RCS: @(#) $Id: mkpsenc.tcl,v 1.3 2002/07/19 14:37:21 drh Exp $ + +% The definitions below just define all of the variables used in +% any of the procedures here. This is needed for obscure reasons +% explained on p. 716 of the Postscript manual (Section H.2.7, +% "Initializing Variables," in the section on Encapsulated Postscript). + +/baseline 0 def +/stipimage 0 def +/height 0 def +/justify 0 def +/lineLength 0 def +/spacing 0 def +/stipple 0 def +/strings 0 def +/xoffset 0 def +/yoffset 0 def +/tmpstip null def + + +/cstringshow { + { + dup type /stringtype eq + { show } { glyphshow } + ifelse + } + forall +} bind def + + + +/cstringwidth { + 0 exch 0 exch + { + dup type /stringtype eq + { stringwidth } { + currentfont /Encoding get exch 1 exch put (\001) stringwidth + } + ifelse + exch 3 1 roll add 3 1 roll add exch + } + forall +} bind def + +% font ISOEncode font +% This procedure changes the encoding of a font from the default +% Postscript encoding to current system encoding. It's typically invoked just +% before invoking "setfont". The body of this procedure comes from +% Section 5.6.1 of the Postscript book. + +/ISOEncode { + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding CurrentEncoding def + currentdict + end + + % I'm not sure why it's necessary to use "definefont" on this new + % font, but it seems to be important; just use the name "Temporary" + % for the font. + + /Temporary exch definefont +} bind def + +% StrokeClip +% +% This procedure converts the current path into a clip area under +% the assumption of stroking. It's a bit tricky because some Postscript +% interpreters get errors during strokepath for dashed lines. If +% this happens then turn off dashes and try again. + +/StrokeClip { + {strokepath} stopped { + (This Postscript printer gets limitcheck overflows when) = + (stippling dashed lines; lines will be printed solid instead.) = + [] 0 setdash strokepath} if + clip +} bind def + +% desiredSize EvenPixels closestSize +% +% The procedure below is used for stippling. Given the optimal size +% of a dot in a stipple pattern in the current user coordinate system, +% compute the closest size that is an exact multiple of the device's +% pixel size. This allows stipple patterns to be displayed without +% aliasing effects. + +/EvenPixels { + % Compute exact number of device pixels per stipple dot. + dup 0 matrix currentmatrix dtransform + dup mul exch dup mul add sqrt + + % Round to an integer, make sure the number is at least 1, and compute + % user coord distance corresponding to this. + dup round dup 1 lt {pop 1} if + exch div mul +} bind def + +% width height string StippleFill -- +% +% Given a path already set up and a clipping region generated from +% it, this procedure will fill the clipping region with a stipple +% pattern. "String" contains a proper image description of the +% stipple pattern and "width" and "height" give its dimensions. Each +% stipple dot is assumed to be about one unit across in the current +% user coordinate system. This procedure trashes the graphics state. + +/StippleFill { + % The following code is needed to work around a NeWSprint bug. + + /tmpstip 1 index def + + % Change the scaling so that one user unit in user coordinates + % corresponds to the size of one stipple dot. + 1 EvenPixels dup scale + + % Compute the bounding box occupied by the path (which is now + % the clipping region), and round the lower coordinates down + % to the nearest starting point for the stipple pattern. Be + % careful about negative numbers, since the rounding works + % differently on them. + + pathbbox + 4 2 roll + 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll + 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll + + % Stack now: width height string y1 y2 x1 x2 + % Below is a doubly-nested for loop to iterate across this area + % in units of the stipple pattern size, going up columns then + % across rows, blasting out a stipple-pattern-sized rectangle at + % each position + + 6 index exch { + 2 index 5 index 3 index { + % Stack now: width height string y1 y2 x y + + gsave + 1 index exch translate + 5 index 5 index true matrix tmpstip imagemask + grestore + } for + pop + } for + pop pop pop pop pop +} bind def + +% -- AdjustColor -- +% Given a color value already set for output by the caller, adjusts +% that value to a grayscale or mono value if requested by the CL +% variable. + +/AdjustColor { + CL 2 lt { + currentgray + CL 0 eq { + .5 lt {0} {1} ifelse + } if + setgray + } if +} bind def + +% x y strings spacing xoffset yoffset justify stipple DrawText -- +% This procedure does all of the real work of drawing text. The +% color and font must already have been set by the caller, and the +% following arguments must be on the stack: +% +% x, y - Coordinates at which to draw text. +% strings - An array of strings, one for each line of the text item, +% in order from top to bottom. +% spacing - Spacing between lines. +% xoffset - Horizontal offset for text bbox relative to x and y: 0 for +% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se. +% yoffset - Vertical offset for text bbox relative to x and y: 0 for +% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se. +% justify - 0 for left justification, 0.5 for center, 1 for right justify. +% stipple - Boolean value indicating whether or not text is to be +% drawn in stippled fashion. If text is stippled, +% procedure StippleText must have been defined to call +% StippleFill in the right way. +% +% Also, when this procedure is invoked, the color and font must already +% have been set for the text. + +/DrawText { + /stipple exch def + /justify exch def + /yoffset exch def + /xoffset exch def + /spacing exch def + /strings exch def + + % First scan through all of the text to find the widest line. + + /lineLength 0 def + strings { + cstringwidth pop + dup lineLength gt {/lineLength exch def} {pop} ifelse + newpath + } forall + + % Compute the baseline offset and the actual font height. + + 0 0 moveto (TXygqPZ) false charpath + pathbbox dup /baseline exch def + exch pop exch sub /height exch def pop + newpath + + % Translate coordinates first so that the origin is at the upper-left + % corner of the text's bounding box. Remember that x and y for + % positioning are still on the stack. + + translate + lineLength xoffset mul + strings length 1 sub spacing mul height add yoffset mul translate + + % Now use the baseline and justification information to translate so + % that the origin is at the baseline and positioning point for the + % first line of text. + + justify lineLength mul baseline neg translate + + % Iterate over each of the lines to output it. For each line, + % compute its width again so it can be properly justified, then + % display it. + + strings { + dup cstringwidth pop + justify neg mul 0 moveto + stipple { + + + % The text is stippled, so turn it into a path and print + % by calling StippledText, which in turn calls StippleFill. + % Unfortunately, many Postscript interpreters will get + % overflow errors if we try to do the whole string at + % once, so do it a character at a time. + + gsave + /char (X) def + { + dup type /stringtype eq { + % This segment is a string. + { + char 0 3 -1 roll put + currentpoint + gsave + char true charpath clip StippleText + grestore + char stringwidth translate + moveto + } forall + } { + % This segment is glyph name + % Temporary override + currentfont /Encoding get exch 1 exch put + currentpoint + gsave (\001) true charpath clip StippleText + grestore + (\001) stringwidth translate + moveto + } ifelse + } forall + grestore + } {cstringshow} ifelse + 0 spacing neg translate + } forall +} bind def + +%%EndProlog +%%BeginSetup +/CL 2 def +%%EndSetup + +%%Page: 1 1 +save +306.0 396.0 translate +0.846 0.846 scale +-194 -60 translate +38 121 moveto 350 121 lineto 350 0 lineto 38 0 lineto closepath clip newpath +gsave +100 60 moveto +104.188790204786 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.188790204786 60 moveto +108.367376727162 60.2921952339398 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.367376727162 60.2921952339398 moveto +112.515401913619 60.8751621560111 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.515401913619 60.8751621560111 moveto +116.612657002408 61.7460606099691 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.612657002408 61.7460606099691 moveto +120.639180578591 62.9006476660886 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.639180578591 62.9006476660886 moveto +124.575355824049 64.3332982922908 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +124.575355824049 64.3332982922908 moveto +128.40200608865 66.0370327587344 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +128.40200608865 66.0370327587344 moveto +132.100488316957 68.0035506423577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +132.100488316957 68.0035506423577 moveto +135.652783875325 70.2232712657053 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +135.652783875325 70.2232712657053 moveto +139.041586336868 72.685380373026 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +139.041586336868 72.685380373026 moveto +142.250385796636 75.377882816239 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +142.250385796636 75.377882816239 moveto +145.263549306207 78.2876609940905 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +145.263549306207 78.2876609940905 moveto +148.066397035846 81.4005387597879 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +148.066397035846 81.4005387597879 moveto +150.645273793155 84.7013504857621 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.645273793155 84.7013504857621 moveto +152.987615549799 88.1740149490805 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.987615549799 88.1740149490805 moveto +148.798825345013 88.1740149490805 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +148.798825345013 88.1740149490805 moveto +144.620238822637 87.8818197151407 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +144.620238822637 87.8818197151407 moveto +140.47221363618 87.2988527930694 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +140.47221363618 87.2988527930694 moveto +136.374958547391 86.4279543391114 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +136.374958547391 86.4279543391114 moveto +132.348434971208 85.273367282992 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +132.348434971208 85.273367282992 moveto +128.41225972575 83.8407166567898 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +128.41225972575 83.8407166567898 moveto +124.585609461149 82.1369821903461 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +124.585609461149 82.1369821903461 moveto +120.887127232842 80.1704643067229 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.887127232842 80.1704643067229 moveto +117.334831674474 77.9507436833752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.334831674474 77.9507436833752 moveto +113.946029212931 75.4886345760546 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +113.946029212931 75.4886345760546 moveto +110.737229753163 72.7961321328416 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +110.737229753163 72.7961321328416 moveto +107.724066243592 69.88635395499 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +107.724066243592 69.88635395499 moveto +104.921218513953 66.7734761892926 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.921218513953 66.7734761892926 moveto +102.342341756644 63.4726644633185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.342341756644 63.4726644633185 moveto +100 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +100 60 moveto +102.61166797481 63.2749280555557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.61166797481 63.2749280555557 moveto +104.988526624774 66.7240592994786 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.988526624774 66.7240592994786 moveto +107.118996133471 70.3305899110537 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +107.118996133471 70.3305899110537 moveto +108.992697067607 74.0769492356688 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.992697067607 74.0769492356688 moveto +110.600500944577 77.9448853872768 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +110.600500944577 77.9448853872768 moveto +111.934574705506 81.9155541697508 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.934574705506 81.9155541697508 moveto +112.988418877133 85.9696108839129 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.988418877133 85.9696108839129 moveto +113.756899236585 90.0873045729639 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +113.756899236585 90.0873045729639 moveto +114.236271824799 94.24857424716 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.236271824799 94.24857424716 moveto +114.424201186711 98.4331466189377 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.424201186711 98.4331466189377 moveto +114.31977174936 102.620634872334 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.31977174936 102.620634872334 moveto +113.923492282468 106.790637985502 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +113.923492282468 106.790637985502 moveto +113.237293419763 110.922840122443 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +113.237293419763 110.922840122443 moveto +112.264518253129 114.997109609712 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.264518253129 114.997109609712 moveto +111.009906045395 118.993597015913 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.009906045395 118.993597015913 moveto +108.398238070585 115.718668960357 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.398238070585 115.718668960357 moveto +106.021379420621 112.269537716434 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +106.021379420621 112.269537716434 moveto +103.890909911924 108.663007104859 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +103.890909911924 108.663007104859 moveto +102.017208977787 104.916647780244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.017208977787 104.916647780244 moveto +100.409405100818 101.048711628636 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +100.409405100818 101.048711628636 moveto +99.0753313398884 97.0780428461617 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.0753313398884 97.0780428461617 moveto +98.0214871682615 93.0239861319997 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.0214871682615 93.0239861319997 moveto +97.2530068088093 88.9062924429487 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +97.2530068088093 88.9062924429487 moveto +96.7736342205956 84.7450227687526 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.7736342205956 84.7450227687526 moveto +96.585704858684 80.5604503969748 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.585704858684 80.5604503969748 moveto +96.690134296035 76.3729621435789 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.690134296035 76.3729621435789 moveto +97.086413762927 72.2029590304105 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +97.086413762927 72.2029590304105 moveto +97.7726126256313 68.0707568934697 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +97.7726126256313 68.0707568934697 moveto +98.7453877922652 63.9964874062003 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.7453877922652 63.9964874062003 moveto +99.9999999999999 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999999 60 moveto +99.0679064914838 64.0837684889201 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.0679064914838 64.0837684889201 moveto +97.8532142265331 68.0925695666967 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +97.8532142265331 68.0925695666967 moveto +96.3618410637623 72.0068727574424 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.3618410637623 72.0068727574424 moveto +94.6010528233081 75.807607969476 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.6010528233081 75.807607969476 moveto +92.579427888484 79.4762584028932 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.579427888484 79.4762584028932 moveto +90.3068154127597 82.9949507615538 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +90.3068154127597 82.9949507615538 moveto +87.7942873356745 86.3465423299841 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.7942873356745 86.3465423299841 moveto +85.0540844414617 89.5147044909636 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.0540844414617 89.5147044909636 moveto +82.0995567231776 92.4840022769064 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +82.0995567231776 92.4840022769064 moveto +78.9450983428775 95.2399695674723 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +78.9450983428775 95.2399695674723 moveto +75.6060775047053 97.7691795670505 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.6060775047053 97.7691795670505 moveto +72.0987615825474 100.059310218758 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.0987615825474 100.059310218758 moveto +68.4402378670222 102.099204236264 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.4402378670222 102.099204236264 moveto +64.6483303179184 103.878923460963 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.6483303179184 103.878923460963 moveto +60.741512727654 105.38979727969 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +60.741512727654 105.38979727969 moveto +61.6736062361701 101.30602879077 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.6736062361701 101.30602879077 moveto +62.8882985011208 97.2972277129933 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.8882985011208 97.2972277129933 moveto +64.3796716638916 93.3829245222477 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.3796716638916 93.3829245222477 moveto +66.1404599043459 89.5821893102141 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +66.1404599043459 89.5821893102141 moveto +68.1620848391699 85.9135388767969 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.1620848391699 85.9135388767969 moveto +70.4346973148942 82.3948465181363 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.4346973148942 82.3948465181363 moveto +72.9472253919794 79.043254949706 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.9472253919794 79.043254949706 moveto +75.6874282861922 75.8750927887265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.6874282861922 75.8750927887265 moveto +78.6419560044763 72.9057950027836 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +78.6419560044763 72.9057950027836 moveto +81.7964143847764 70.1498277122177 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +81.7964143847764 70.1498277122177 moveto +85.1354352229486 67.6206177126395 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1354352229486 67.6206177126395 moveto +88.6427511451065 65.3304870609317 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.6427511451065 65.3304870609317 moveto +92.3012748606317 63.2905930434263 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.3012748606317 63.2905930434263 moveto +96.0931824097355 61.510873818727 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.0931824097355 61.510873818727 moveto +99.9999999999999 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999999 60 moveto +96.2260304313128 61.8174479564317 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.2260304313128 61.8174479564317 moveto +92.3344753021618 63.3672098918569 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.3344753021618 63.3672098918569 moveto +88.3442938779584 64.6417355219078 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.3442938779584 64.6417355219078 moveto +84.2749259215097 65.6348154858295 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.2749259215097 65.6348154858295 moveto +80.146196984448 66.341611597862 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +80.146196984448 66.341611597862 moveto +75.9782218191364 66.7586804183942 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.9782218191364 66.7586804183942 moveto +71.7913063816169 66.8839900300562 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +71.7913063816169 66.8839900300562 moveto +67.6058489030337 66.7169299370161 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +67.6058489030337 66.7169299370161 moveto +63.4422405115018 66.2583140392542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +63.4422405115018 66.2583140392542 moveto +59.3207658885804 65.5103766673246 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +59.3207658885804 65.5103766673246 moveto +55.261504444343 64.4767616969209 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +55.261504444343 64.4767616969209 moveto +51.2842324925106 63.1625047962804 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +51.2842324925106 63.1625047962804 moveto +47.4083269022384 61.5740088929142 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +47.4083269022384 61.5740088929142 moveto +43.6526706959576 59.7190129791886 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +43.6526706959576 59.7190129791886 moveto +40.0355610531879 57.6065544087316 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +40.0355610531879 57.6065544087316 moveto +43.809530621875 55.7891064522999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +43.809530621875 55.7891064522999 moveto +47.701085751026 54.2393445168747 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +47.701085751026 54.2393445168747 moveto +51.6912671752294 52.9648188868238 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +51.6912671752294 52.9648188868238 moveto +55.7606351316782 51.9717389229021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +55.7606351316782 51.9717389229021 moveto +59.8893640687398 51.2649428108696 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +59.8893640687398 51.2649428108696 moveto +64.0573392340514 50.8478739903374 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.0573392340514 50.8478739903374 moveto +68.244254671571 50.7225643786754 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.244254671571 50.7225643786754 moveto +72.4297121501541 50.8896244717155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.4297121501541 50.8896244717155 moveto +76.593320541686 51.3482403694774 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +76.593320541686 51.3482403694774 moveto +80.7147951646074 52.096177741407 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +80.7147951646074 52.096177741407 moveto +84.7740566088448 53.1297927118107 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.7740566088448 53.1297927118107 moveto +88.7513285606772 54.4440496124512 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.7513285606772 54.4440496124512 moveto +92.6272341509494 56.0325455158174 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.6272341509494 56.0325455158174 moveto +96.3828903572302 57.887541429543 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.3828903572302 57.887541429543 moveto +99.9999999999999 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999999 60 moveto +96.2260304313128 58.1825520435683 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.2260304313128 58.1825520435683 moveto +92.58803282347 56.1062724898846 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.58803282347 56.1062724898846 moveto +89.1037311351269 53.7812767642275 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +89.1037311351269 53.7812767642275 moveto +85.7901005338682 51.2188920120648 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.7901005338682 51.2188920120648 moveto +82.6632846948982 48.4316019143388 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +82.6632846948982 48.4316019143388 moveto +79.738517150678 45.4329858682285 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +79.738517150678 45.4329858682285 moveto +77.0300470746865 42.2376528296904 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +77.0300470746865 42.2376528296904 moveto +74.5510698608794 38.8611701400947 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +74.5510698608794 38.8611701400947 moveto +72.3136628370564 35.3199876837022 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.3136628370564 35.3199876837022 moveto +70.3287264253342 31.631357745482 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.3287264253342 31.631357745482 moveto +68.6059310363858 27.8132509597135 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.6059310363858 27.8132509597135 moveto +67.1536699561711 23.8842687588619 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +67.1536699561711 23.8842687588619 moveto +65.9790184546923 19.8635527492701 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +65.9790184546923 19.8635527492701 moveto +65.087699315989 15.7706914551758 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +65.087699315989 15.7706914551758 moveto +64.4840549573098 11.6256248853907 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.4840549573098 11.6256248853907 moveto +68.2580245259969 13.4430728418225 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.2580245259969 13.4430728418225 moveto +71.8960221338397 15.5193523955062 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +71.8960221338397 15.5193523955062 moveto +75.3803238221828 17.8443481211632 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.3803238221828 17.8443481211632 moveto +78.6939544234415 20.406732873326 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +78.6939544234415 20.406732873326 moveto +81.8207702624115 23.1940229710519 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +81.8207702624115 23.1940229710519 moveto +84.7455378066317 26.1926390171623 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.7455378066317 26.1926390171623 moveto +87.4540078826232 29.3879720557003 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.4540078826232 29.3879720557003 moveto +89.9329850964304 32.764454745296 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +89.9329850964304 32.764454745296 moveto +92.1703921202534 36.3056372016885 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.1703921202534 36.3056372016885 moveto +94.1553285319755 39.9942671399087 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.1553285319755 39.9942671399087 moveto +95.878123920924 43.8123739256773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.878123920924 43.8123739256773 moveto +97.3303850011387 47.7413561265288 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +97.3303850011387 47.7413561265288 moveto +98.5050365026175 51.7620721361206 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.5050365026175 51.7620721361206 moveto +99.3963556413208 55.854933430215 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.3963556413208 55.854933430215 moveto +99.9999999999999 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999999 60 moveto +99.0679064914838 55.9162315110799 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.0679064914838 55.9162315110799 moveto +98.4229528052819 51.7773913205955 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.4229528052819 51.7773913205955 moveto +98.0682810909231 47.60364344192 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.0682810909231 47.60364344192 moveto +98.0056192733481 43.4153219551746 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.0056192733481 43.4153219551746 moveto +98.2352726346335 39.2328319416343 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.2352726346335 39.2328319416343 moveto +98.7561223266877 35.0765500722225 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.7561223266877 35.0765500722225 moveto +99.5656308221667 30.966725334419 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.5656308221667 30.966725334419 moveto +100.659854277052 26.9233803812282 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +100.659854277052 26.9233803812282 moveto +102.033461744662 22.9662139828265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.033461744662 22.9662139828265 moveto +103.67976114749 19.1145050561339 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +103.67976114749 19.1145050561339 moveto +105.59073188033 15.3870187398689 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.59073188033 15.3870187398689 moveto +107.757063885862 11.8019149726786 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +107.757063885862 11.8019149726786 moveto +110.168203012314 8.37666001974347 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +110.168203012314 8.37666001974347 moveto +112.812402432229 5.12794137888881 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.812402432229 5.12794137888881 moveto +115.676779871827 2.07158648077268 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.676779871827 2.07158648077268 moveto +116.608873380343 6.15535496969281 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.608873380343 6.15535496969281 moveto +117.253827066545 10.2941951601772 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.253827066545 10.2941951601772 moveto +117.608498780904 14.4679430388527 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.608498780904 14.4679430388527 moveto +117.671160598478 18.656264525598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.671160598478 18.656264525598 moveto +117.441507237193 22.8387545391384 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.441507237193 22.8387545391384 moveto +116.920657545139 26.9950364085502 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.920657545139 26.9950364085502 moveto +116.11114904966 31.1048611463537 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.11114904966 31.1048611463537 moveto +115.016925594775 35.1482060995445 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.016925594775 35.1482060995445 moveto +113.643318127164 39.1053724979462 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +113.643318127164 39.1053724979462 moveto +111.997018724336 42.9570814246387 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.997018724336 42.9570814246387 moveto +110.086047991496 46.6845677409038 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +110.086047991496 46.6845677409038 moveto +107.919715985964 50.269671508094 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +107.919715985964 50.269671508094 moveto +105.508576859512 53.6949264610292 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.508576859512 53.6949264610292 moveto +102.864377439598 56.9436451018839 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.864377439598 56.9436451018839 moveto +99.9999999999998 59.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999998 59.9999999999999 moveto +102.61166797481 56.7250719444442 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.61166797481 56.7250719444442 moveto +105.445421490617 53.6403021975478 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.445421490617 53.6403021975478 moveto +108.487454785139 50.7607194474375 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.487454785139 50.7607194474375 moveto +111.72294737795 48.1003527318172 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.72294737795 48.1003527318172 moveto +115.136136274368 45.6721630899063 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.136136274368 45.6721630899063 moveto +118.710392761182 43.4879804175594 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +118.710392761182 43.4879804175594 moveto +122.428303420072 41.558445833203 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +122.428303420072 41.558445833203 moveto +126.27175496403 39.8929598353758 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +126.27175496403 39.8929598353758 moveto +130.222022483477 38.4996365044453 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +130.222022483477 38.4996365044453 moveto +134.259860672138 37.3852639716233 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +134.259860672138 37.3852639716233 moveto +138.365597588239 36.5552713478735 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.365597588239 36.5552713478735 moveto +142.519230494233 36.0137022738281 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +142.519230494233 36.0137022738281 moveto +146.700523308122 35.7631952195776 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +146.700523308122 35.7631952195776 moveto +150.889105191621 35.8049706303094 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.889105191621 35.8049706303094 moveto +155.064569794827 36.1388249804216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.064569794827 36.1388249804216 moveto +152.452901820017 39.4137530359774 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.452901820017 39.4137530359774 moveto +149.61914830421 42.4985227828738 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +149.61914830421 42.4985227828738 moveto +146.577115009688 45.3781055329841 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +146.577115009688 45.3781055329841 moveto +143.341622416877 48.0384722486044 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +143.341622416877 48.0384722486044 moveto +139.928433520459 50.4666618905153 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +139.928433520459 50.4666618905153 moveto +136.354177033645 52.6508445628622 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +136.354177033645 52.6508445628622 moveto +132.636266374755 54.5803791472186 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +132.636266374755 54.5803791472186 moveto +128.792814830796 56.2458651450457 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +128.792814830796 56.2458651450457 moveto +124.842547311349 57.6391884759763 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +124.842547311349 57.6391884759763 moveto +120.804709122689 58.7535610087983 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.804709122689 58.7535610087983 moveto +116.698972206587 59.5835536325481 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.698972206587 59.5835536325481 moveto +112.545339300594 60.1251227065935 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.545339300594 60.1251227065935 moveto +108.364046486704 60.375629760844 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.364046486704 60.375629760844 moveto +104.175464603206 60.3338543501122 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.175464603206 60.3338543501122 moveto +99.9999999999999 60 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200 59.9999999999998 moveto +204.296195081832 59.9999999999998 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.296195081832 59.9999999999998 moveto +208.567633936021 60.4605456503816 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +208.567633936021 60.4605456503816 moveto +212.765089415928 61.3763292904158 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.765089415928 61.3763292904158 moveto +216.84018701276 62.7367967679594 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.84018701276 62.7367967679594 moveto +220.745962358347 64.5262690731284 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.745962358347 64.5262690731284 moveto +224.437402476444 66.7241230345332 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +224.437402476444 66.7241230345332 moveto +227.871964544784 69.3050289956011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.871964544784 69.3050289956011 moveto +231.010066189291 72.2392427318353 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +231.010066189291 72.2392427318353 moveto +233.815541659945 75.4929482447416 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.815541659945 75.4929482447416 moveto +236.256058631014 79.0286474818212 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.256058631014 79.0286474818212 moveto +238.303490822124 82.8055924912122 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.303490822124 82.8055924912122 moveto +239.934242145835 86.7802550305195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +239.934242145835 86.7802550305195 moveto +241.129518645993 90.9068282177209 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +241.129518645993 90.9068282177209 moveto +236.833323564161 90.9068282177209 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.833323564161 90.9068282177209 moveto +232.561884709972 90.446282567339 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +232.561884709972 90.446282567339 moveto +228.364429230065 89.5304989273048 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +228.364429230065 89.5304989273048 moveto +224.289331633233 88.1700314497612 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +224.289331633233 88.1700314497612 moveto +220.383556287646 86.3805591445921 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.383556287646 86.3805591445921 moveto +216.692116169549 84.1827051831874 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.692116169549 84.1827051831874 moveto +213.257554101209 81.6017992221194 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +213.257554101209 81.6017992221194 moveto +210.119452456702 78.6675854858852 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +210.119452456702 78.6675854858852 moveto +207.313976986048 75.4138799729788 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +207.313976986048 75.4138799729788 moveto +204.87346001498 71.8781807358992 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.87346001498 71.8781807358992 moveto +202.826027823869 68.1012357265082 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.826027823869 68.1012357265082 moveto +201.195276500158 64.1265731872009 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.195276500158 64.1265731872009 moveto +200 59.9999999999994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200 59.9999999999994 moveto +203.475694832352 62.5252401100719 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.475694832352 62.5252401100719 moveto +206.660659514523 65.4085181324775 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +206.660659514523 65.4085181324775 moveto +209.518188212997 68.6166050886796 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.518188212997 68.6166050886796 moveto +212.015348703047 72.1125286673771 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.015348703047 72.1125286673771 moveto +214.123361903473 75.8559993201255 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.123361903473 75.8559993201255 moveto +215.817933547525 79.8038745871945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.817933547525 79.8038745871945 moveto +217.079534167578 83.9106563024358 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.079534167578 83.9106563024358 moveto +217.893624166827 88.1290149470133 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.893624166827 88.1290149470133 moveto +218.250821384099 92.4103351089647 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.250821384099 92.4103351089647 moveto +218.147009220657 96.7052757623243 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.147009220657 96.7052757623243 moveto +217.583384082856 100.964338908745 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.583384082856 100.964338908745 moveto +216.566441593894 105.138440028184 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.566441593894 105.138440028184 moveto +215.107901733556 109.179473764366 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.107901733556 109.179473764366 moveto +211.632206901204 106.654233654294 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.632206901204 106.654233654294 moveto +208.447242219034 103.770955631888 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +208.447242219034 103.770955631888 moveto +205.589713520559 100.562868675686 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.589713520559 100.562868675686 moveto +203.092553030509 97.0669450969885 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.092553030509 97.0669450969885 moveto +200.984539830083 93.3234744442401 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.984539830083 93.3234744442401 moveto +199.289968186032 89.3755991771711 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.289968186032 89.3755991771711 moveto +198.028367565978 85.2688174619298 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.028367565978 85.2688174619298 moveto +197.214277566729 81.0504588173523 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.214277566729 81.0504588173523 moveto +196.857080349457 76.7691386554008 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.857080349457 76.7691386554008 moveto +196.960892512899 72.4741980020412 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.960892512899 72.4741980020412 moveto +197.5245176507 68.2151348556207 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.5245176507 68.2151348556207 moveto +198.541460139663 64.0410337361816 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.541460139663 64.0410337361816 moveto +200.000000000001 59.9999999999993 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000001 59.9999999999993 moveto +201.327597291437 64.085924327851 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.327597291437 64.085924327851 moveto +202.209539545967 68.290620516737 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.209539545967 68.290620516737 moveto +202.63566262402 72.5656306107029 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.63566262402 72.5656306107029 moveto +202.601055575452 76.861686305564 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.601055575452 76.861686305564 moveto +202.106117236888 81.1292767524296 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.106117236888 81.1292767524296 moveto +201.156551635238 85.3192191564876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.156551635238 85.3192191564876 moveto +199.763302250372 89.3832255950565 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.763302250372 89.3832255950565 moveto +197.942425894552 93.2744595224856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.942425894552 93.2744595224856 moveto +195.714907662131 96.9480755483368 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.714907662131 96.9480755483368 moveto +193.106419082168 100.361736268057 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +193.106419082168 100.361736268057 moveto +190.147022261181 103.476100189806 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.147022261181 103.476100189806 moveto +186.870823425725 106.25527513423 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +186.870823425725 106.25527513423 moveto +183.315579857594 108.667231881857 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.315579857594 108.667231881857 moveto +181.987982566158 104.581307554005 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.987982566158 104.581307554005 moveto +181.106040311627 100.376611365119 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.106040311627 100.376611365119 moveto +180.679917233575 96.101601271153 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +180.679917233575 96.101601271153 moveto +180.714524282143 91.8055455762919 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +180.714524282143 91.8055455762919 moveto +181.209462620707 87.5379551294263 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.209462620707 87.5379551294263 moveto +182.159028222356 83.3480127253684 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.159028222356 83.3480127253684 moveto +183.552277607222 79.2840062867994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.552277607222 79.2840062867994 moveto +185.373153963043 75.3927723593704 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.373153963043 75.3927723593704 moveto +187.600672195464 71.7191563335192 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.600672195464 71.7191563335192 moveto +190.209160775427 68.3054956137994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.209160775427 68.3054956137994 moveto +193.168557596414 65.1911316920499 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +193.168557596414 65.1911316920499 moveto +196.44475643187 62.4119567476259 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.44475643187 62.4119567476259 moveto +200.000000000001 59.9999999999994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000001 59.9999999999994 moveto +198.672402708565 64.085924327851 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.672402708565 64.085924327851 moveto +196.91445057034 68.00598765143 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.91445057034 68.00598765143 moveto +194.746403495545 71.7150123295136 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.746403495545 71.7150123295136 moveto +192.193247624662 75.1702528826639 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +192.193247624662 75.1702528826639 moveto +189.284407370104 78.3318886230083 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +189.284407370104 78.3318886230083 moveto +186.053406308035 81.1634825766093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +186.053406308035 81.1634825766093 moveto +182.537480828464 83.632401409471 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.537480828464 83.632401409471 moveto +178.777150996187 85.7101915176505 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +178.777150996187 85.7101915176505 moveto +174.815753568298 87.3729069471427 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +174.815753568298 87.3729069471427 moveto +170.698942550093 88.6013853643503 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.698942550093 88.6013853643503 moveto +166.474163045339 89.3814688966571 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.474163045339 89.3814688966571 moveto +162.190104464631 89.7041672979784 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.190104464631 89.7041672979784 moveto +157.896139393448 89.5657615588506 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.896139393448 89.5657615588506 moveto +159.223736684884 85.4798372309989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.223736684884 85.4798372309989 moveto +160.981688823109 81.5597739074198 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160.981688823109 81.5597739074198 moveto +163.149735897904 77.8507492293361 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.149735897904 77.8507492293361 moveto +165.702891768787 74.3955086761856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +165.702891768787 74.3955086761856 moveto +168.611732023344 71.2338729358409 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +168.611732023344 71.2338729358409 moveto +171.842733085412 68.4022789822395 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +171.842733085412 68.4022789822395 moveto +175.358658564984 65.9333601493775 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +175.358658564984 65.9333601493775 moveto +179.11898839726 63.8555700411977 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.11898839726 63.8555700411977 moveto +183.080385825149 62.1928546117051 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.080385825149 62.1928546117051 moveto +187.197196843354 60.9643761944971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.197196843354 60.9643761944971 moveto +191.421976348107 60.1842926621899 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +191.421976348107 60.1842926621899 moveto +195.706034928816 59.8615942608683 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.706034928816 59.8615942608683 moveto +199.999999999999 59.9999999999956 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.999999999999 59.9999999999956 moveto +196.524305167647 62.5252401100684 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.524305167647 62.5252401100684 moveto +192.797936602873 64.6633396167857 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +192.797936602873 64.6633396167857 moveto +188.863839668593 66.3896575170718 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.863839668593 66.3896575170718 moveto +184.767353739496 67.6842984765155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.767353739496 67.6842984765155 moveto +180.555689678342 68.5323421175744 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +180.555689678342 68.5323421175744 moveto +176.277385743877 68.9240149727826 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +176.277385743877 68.9240149727826 moveto +171.981748200885 68.8548031212494 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +171.981748200885 68.8548031212494 moveto +167.718283079171 68.3255042103438 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +167.718283079171 68.3255042103438 moveto +163.53612563032 67.3422182630307 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.53612563032 67.3422182630307 moveto +159.483474057568 65.9162773767991 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.483474057568 65.9162773767991 moveto +155.607034044889 64.0641151243866 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.607034044889 64.0641151243866 moveto +151.951480486962 61.8070771614163 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.951480486962 61.8070771614163 moveto +148.558942623415 59.1711752236434 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +148.558942623415 59.1711752236434 moveto +152.034637455767 56.6459351135703 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.034637455767 56.6459351135703 moveto +155.76100602054 54.5078356068526 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.76100602054 54.5078356068526 moveto +159.69510295482 52.7815177065662 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.69510295482 52.7815177065662 moveto +163.791588883917 51.4868767471221 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.791588883917 51.4868767471221 moveto +168.003252945071 50.6388331060628 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +168.003252945071 50.6388331060628 moveto +172.281556879535 50.2471602508542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.281556879535 50.2471602508542 moveto +176.577194422528 50.316372102387 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +176.577194422528 50.316372102387 moveto +180.840659544242 50.8456710132921 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +180.840659544242 50.8456710132921 moveto +185.022816993093 51.8289569606049 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.022816993093 51.8289569606049 moveto +189.075468565845 53.2548978468361 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +189.075468565845 53.2548978468361 moveto +192.951908578524 55.1070600992482 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +192.951908578524 55.1070600992482 moveto +196.607462136451 57.3640980622182 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.607462136451 57.3640980622182 moveto +199.999999999999 59.9999999999907 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.999999999999 59.9999999999907 moveto +195.703804918167 59.999999999992 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.703804918167 59.999999999992 moveto +191.432366063978 59.5394543496115 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +191.432366063978 59.5394543496115 moveto +187.23491058407 58.6236707095787 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.23491058407 58.6236707095787 moveto +183.159812987238 57.2632032320365 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.159812987238 57.2632032320365 moveto +179.25403764165 55.4737309268687 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.25403764165 55.4737309268687 moveto +175.562597523553 53.2758769654652 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +175.562597523553 53.2758769654652 moveto +172.128035455211 50.6949710043985 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.128035455211 50.6949710043985 moveto +168.989933810704 47.7607572681655 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +168.989933810704 47.7607572681655 moveto +166.184458340048 44.5070517552601 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.184458340048 44.5070517552601 moveto +163.743941368978 40.9713525181814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.743941368978 40.9713525181814 moveto +161.696509177866 37.1944075087913 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.696509177866 37.1944075087913 moveto +160.065757854154 33.2197449694846 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160.065757854154 33.2197449694846 moveto +158.870481353994 29.0931717822836 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +158.870481353994 29.0931717822836 moveto +163.166676435826 29.093171782282 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.166676435826 29.093171782282 moveto +167.438115290015 29.553717432662 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +167.438115290015 29.553717432662 moveto +171.635570769923 30.4695010726944 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +171.635570769923 30.4695010726944 moveto +175.710668366756 31.8299685502363 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +175.710668366756 31.8299685502363 moveto +179.616443712343 33.6194408554036 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.616443712343 33.6194408554036 moveto +183.307883830441 35.8172948168068 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.307883830441 35.8172948168068 moveto +186.742445898783 38.3982007778732 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +186.742445898783 38.3982007778732 moveto +189.88054754329 41.332414514106 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +189.88054754329 41.332414514106 moveto +192.686023013946 44.586120027011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +192.686023013946 44.586120027011 moveto +195.126539985016 48.1218192640895 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.126539985016 48.1218192640895 moveto +197.173972176129 51.8987642734795 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.173972176129 51.8987642734795 moveto +198.804723499842 55.873426812786 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.804723499842 55.873426812786 moveto +200.000000000002 59.9999999999868 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000002 59.9999999999868 moveto +196.524305167648 57.4747598899162 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.524305167648 57.4747598899162 moveto +193.339340485476 54.5914818675122 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +193.339340485476 54.5914818675122 moveto +190.481811787 51.3833949113116 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.481811787 51.3833949113116 moveto +187.984651296949 47.8874713326154 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.984651296949 47.8874713326154 moveto +185.87663809652 44.1440006798682 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.87663809652 44.1440006798682 moveto +184.182066452467 40.1961254128001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.182066452467 40.1961254128001 moveto +182.920465832411 36.0893436975595 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.920465832411 36.0893436975595 moveto +182.106375833159 31.8709850529825 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.106375833159 31.8709850529825 moveto +181.749178615885 27.5896648910312 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.749178615885 27.5896648910312 moveto +181.852990779325 23.2947242376715 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.852990779325 23.2947242376715 moveto +182.416615917123 19.0356610912507 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.416615917123 19.0356610912507 moveto +183.433558406083 14.861559971811 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.433558406083 14.861559971811 moveto +184.892098266418 10.8205262356278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.892098266418 10.8205262356278 moveto +188.367793098772 13.3457663456981 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.367793098772 13.3457663456981 moveto +191.552757780944 16.2290443681018 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +191.552757780944 16.2290443681018 moveto +194.410286479421 19.4371313243021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.410286479421 19.4371313243021 moveto +196.907446969473 22.9330549029981 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.907446969473 22.9330549029981 moveto +199.015460169901 26.6765255557452 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.015460169901 26.6765255557452 moveto +200.710031813955 30.6244008228131 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.710031813955 30.6244008228131 moveto +201.971632434011 34.7311825380535 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.971632434011 34.7311825380535 moveto +202.785722433263 38.9495411826304 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.785722433263 38.9495411826304 moveto +203.142919650538 43.2308613445817 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.142919650538 43.2308613445817 moveto +203.039107487099 47.5258019979414 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.039107487099 47.5258019979414 moveto +202.475482349301 51.7848651443623 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.475482349301 51.7848651443623 moveto +201.458539860342 55.9589662638021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.458539860342 55.9589662638021 moveto +200.000000000007 59.9999999999855 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000007 59.9999999999855 moveto +198.672402708567 55.9140756721347 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.672402708567 55.9140756721347 moveto +197.790460454034 51.7093794832493 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.790460454034 51.7093794832493 moveto +197.364337375978 47.4343693892837 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.364337375978 47.4343693892837 moveto +197.398944424543 43.1383136944226 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.398944424543 43.1383136944226 moveto +197.893882763104 38.8707232475566 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +197.893882763104 38.8707232475566 moveto +198.84344836475 34.680780843498 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.84344836475 34.680780843498 moveto +200.236697749613 30.616774404928 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.236697749613 30.616774404928 moveto +202.05757410543 26.7255404774975 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +202.05757410543 26.7255404774975 moveto +204.285092337848 23.0519244516445 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.285092337848 23.0519244516445 moveto +206.893580917809 19.6382637319227 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +206.893580917809 19.6382637319227 moveto +209.852977738793 16.5238998101708 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.852977738793 16.5238998101708 moveto +213.129176574247 13.7447248657442 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +213.129176574247 13.7447248657442 moveto +216.684420142376 11.3327681181148 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.684420142376 11.3327681181148 moveto +218.012017433816 15.4186924459654 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.012017433816 15.4186924459654 moveto +218.89395968835 19.6233886348507 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.89395968835 19.6233886348507 moveto +219.320082766406 23.8983987288162 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +219.320082766406 23.8983987288162 moveto +219.285475717842 28.1944544236774 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +219.285475717842 28.1944544236774 moveto +218.790537379281 32.4620448705434 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.790537379281 32.4620448705434 moveto +217.840971777635 36.6519872746021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.840971777635 36.6519872746021 moveto +216.447722392772 40.7159937131723 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.447722392772 40.7159937131723 moveto +214.626846036956 44.607227640603 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.626846036956 44.607227640603 moveto +212.399327804538 48.2808436664561 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.399327804538 48.2808436664561 moveto +209.790839224577 51.6945043861782 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.790839224577 51.6945043861782 moveto +206.831442403594 54.8088683079304 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +206.831442403594 54.8088683079304 moveto +203.55524356814 57.5880432523574 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.55524356814 57.5880432523574 moveto +200.000000000011 59.9999999999871 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000011 59.9999999999871 moveto +201.327597291444 55.9140756721343 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.327597291444 55.9140756721343 moveto +203.085549429665 51.9940123485536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.085549429665 51.9940123485536 moveto +205.253596504456 48.284987670468 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.253596504456 48.284987670468 moveto +207.806752375336 44.8297471173154 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +207.806752375336 44.8297471173154 moveto +210.715592629891 41.6681113769682 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +210.715592629891 41.6681113769682 moveto +213.946593691957 38.836517423364 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +213.946593691957 38.836517423364 moveto +217.462519171526 36.3675985904989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.462519171526 36.3675985904989 moveto +221.222849003801 34.2898084823159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +221.222849003801 34.2898084823159 moveto +225.184246431689 32.6270930528199 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.184246431689 32.6270930528199 moveto +229.301057449893 31.3986146356084 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.301057449893 31.3986146356084 moveto +233.525836954645 30.6185311032976 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.525836954645 30.6185311032976 moveto +237.809895535353 30.2958327019722 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.809895535353 30.2958327019722 moveto +242.103860606536 30.4342384410959 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.103860606536 30.4342384410959 moveto +240.776263315104 34.5201627689489 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.776263315104 34.5201627689489 moveto +239.018311176883 38.4402260925298 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +239.018311176883 38.4402260925298 moveto +236.850264102092 42.1492507706155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.850264102092 42.1492507706155 moveto +234.297108231212 45.6044913237684 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +234.297108231212 45.6044913237684 moveto +231.388267976658 48.7661270641159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +231.388267976658 48.7661270641159 moveto +228.157266914592 51.5977210177204 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +228.157266914592 51.5977210177204 moveto +224.641341435023 54.0666398505857 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +224.641341435023 54.0666398505857 moveto +220.881011602749 56.1444299587691 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.881011602749 56.1444299587691 moveto +216.919614174861 57.8071453882655 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.919614174861 57.8071453882655 moveto +212.802803156657 59.0356238054774 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.802803156657 59.0356238054774 moveto +208.578023651905 59.8157073377886 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +208.578023651905 59.8157073377886 moveto +204.293965071197 60.1384057391143 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.293965071197 60.1384057391143 moveto +200.000000000014 59.9999999999911 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.000000000014 59.9999999999911 moveto +203.475694832364 57.4747598899149 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.475694832364 57.4747598899149 moveto +207.202063397135 55.3366603831941 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +207.202063397135 55.3366603831941 moveto +211.136160331414 53.6103424829043 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.136160331414 53.6103424829043 moveto +215.232646260509 52.3157015234566 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.232646260509 52.3157015234566 moveto +219.444310321663 51.4676578823937 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +219.444310321663 51.4676578823937 moveto +223.722614256127 51.0759850271814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +223.722614256127 51.0759850271814 moveto +228.018251799119 51.1451968787105 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +228.018251799119 51.1451968787105 moveto +232.281716920834 51.674495789612 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +232.281716920834 51.674495789612 moveto +236.463874369685 52.6577817369212 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.463874369685 52.6577817369212 moveto +240.516525942439 54.0837226231488 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.516525942439 54.0837226231488 moveto +244.39296595512 55.9358848755576 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.39296595512 55.9358848755576 moveto +248.048519513048 58.1929228385245 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.048519513048 58.1929228385245 moveto +251.441057376599 60.8288247762941 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +251.441057376599 60.8288247762941 moveto +247.965362544249 63.3540648863706 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.965362544249 63.3540648863706 moveto +244.238993979478 65.4921643930918 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.238993979478 65.4921643930918 moveto +240.3048970452 67.218482293382 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.3048970452 67.218482293382 moveto +236.208411116104 68.5131232528301 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.208411116104 68.5131232528301 moveto +231.996747054951 69.3611668938934 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +231.996747054951 69.3611668938934 moveto +227.718443120487 69.7528397491061 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.718443120487 69.7528397491061 moveto +223.422805577494 69.6836278975773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +223.422805577494 69.6836278975773 moveto +219.159340455779 69.1543289866763 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +219.159340455779 69.1543289866763 moveto +214.977183006928 68.1710430393675 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.977183006928 68.1710430393675 moveto +210.924531434174 66.7451021531402 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +210.924531434174 66.7451021531402 moveto +207.048091421493 64.8929399007318 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +207.048091421493 64.8929399007318 moveto +203.392537863564 62.6359019377652 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.392537863564 62.6359019377652 moveto +200.000000000014 59.999999999996 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000014 59.9999999998711 moveto +304.072434921334 59.9999999998661 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.072434921334 59.9999999998661 moveto +308.143146999396 60.1184456241472 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +308.143146999396 60.1184456241472 moveto +312.208692005379 60.3552366558913 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.208692005379 60.3552366558913 moveto +316.265630082322 60.7101727462454 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.265630082322 60.7101727462454 moveto +320.310528655585 61.1829535838418 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.310528655585 61.1829535838418 moveto +324.339965337151 61.7731791488915 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.339965337151 61.7731791488915 moveto +328.350530821306 62.480350051641 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.350530821306 62.480350051641 moveto +332.338831769252 63.3038679549057 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +332.338831769252 63.3038679549057 moveto +336.301493680214 64.243036080323 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +336.301493680214 64.243036080323 moveto +340.2351637466 65.2970597978965 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +340.2351637466 65.2970597978965 moveto +344.136513690813 66.4650472983319 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +344.136513690813 66.4650472983319 moveto +348.002242581308 67.7460103475972 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +348.002242581308 67.7460103475972 moveto +343.929807659988 67.7460103476021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.929807659988 67.7460103476021 moveto +339.859095581926 67.6275647233207 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +339.859095581926 67.6275647233207 moveto +335.793550575943 67.3907736915763 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.793550575943 67.3907736915763 moveto +331.736612499 67.0358376012219 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.736612499 67.0358376012219 moveto +327.691713925737 66.5630567636253 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.691713925737 66.5630567636253 moveto +323.662277244171 65.9728311985753 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +323.662277244171 65.9728311985753 moveto +319.651711760016 65.2656602958256 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.651711760016 65.2656602958256 moveto +315.66341081207 64.4421423925607 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.66341081207 64.4421423925607 moveto +311.700748901108 63.5029742671431 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.700748901108 63.5029742671431 moveto +307.767078834722 62.4489505495694 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.767078834722 62.4489505495694 moveto +303.865728890509 61.2809630491337 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.865728890509 61.2809630491337 moveto +300.000000000014 59.9999999998682 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000014 59.9999999998682 moveto +303.873115769125 61.2584515990377 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.873115769125 61.2584515990377 moveto +307.707991306115 62.6290192931658 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.707991306115 62.6290192931658 moveto +311.501381923421 64.1105434451516 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.501381923421 64.1105434451516 moveto +315.250078033867 65.701770537654 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.250078033867 65.701770537654 moveto +318.95090786629 67.4013542336914 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.95090786629 67.4013542336914 moveto +322.600740149177 69.2078565157781 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +322.600740149177 69.2078565157781 moveto +326.196486760033 71.1197489026301 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +326.196486760033 71.1197489026301 moveto +329.735105338243 73.1354137424134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.735105338243 73.1354137424134 moveto +333.213601859208 75.2531455814382 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +333.213601859208 75.2531455814382 moveto +336.629033167595 77.4711526071437 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +336.629033167595 77.4711526071437 moveto +339.978509467535 79.7875581641502 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +339.978509467535 79.7875581641502 moveto +343.25919676768 82.2004023420968 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.25919676768 82.2004023420968 moveto +339.386080998569 80.941950742927 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +339.386080998569 80.941950742927 moveto +335.55120546158 79.5713830487987 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.55120546158 79.5713830487987 moveto +331.757814844274 78.0898588968126 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.757814844274 78.0898588968126 moveto +328.009118733828 76.49863180431 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.009118733828 76.49863180431 moveto +324.308288901405 74.7990481082724 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.308288901405 74.7990481082724 moveto +320.658456618518 72.9925458261854 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.658456618518 72.9925458261854 moveto +317.062710007662 71.0806534393331 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.062710007662 71.0806534393331 moveto +313.524091429452 69.0649885995498 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +313.524091429452 69.0649885995498 moveto +310.045594908487 66.9472567605247 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.045594908487 66.9472567605247 moveto +306.630163600101 64.7292497348189 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.630163600101 64.7292497348189 moveto +303.280687300161 62.4128441778121 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.280687300161 62.4128441778121 moveto +300.000000000016 59.9999999998654 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000016 59.9999999998654 moveto +303.294669059852 62.3937171875349 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.294669059852 62.3937171875349 moveto +306.51832371906 64.882246236302 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.51832371906 64.882246236302 moveto +309.668236443961 67.4634816021474 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.668236443961 67.4634816021474 moveto +312.741742093918 70.1352393022526 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.741742093918 70.1352393022526 moveto +315.736240176305 72.8952587628669 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.736240176305 72.8952587628669 moveto +318.649197046786 75.7412047319782 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.649197046786 75.7412047319782 moveto +321.478148053034 78.67066925517 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.478148053034 78.67066925517 moveto +324.220699620065 81.6811737129908 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.220699620065 81.6811737129908 moveto +326.874531275452 84.7701709181139 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +326.874531275452 84.7701709181139 moveto +329.437397612665 87.9350472705117 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.437397612665 87.9350472705117 moveto +331.907130190918 91.1731249688228 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.907130190918 91.1731249688228 moveto +334.281639369884 94.4816642760391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +334.281639369884 94.4816642760391 moveto +330.986970310048 92.0879470883693 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +330.986970310048 92.0879470883693 moveto +327.763315650841 89.5994180396021 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.763315650841 89.5994180396021 moveto +324.613402925939 87.0181826737565 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.613402925939 87.0181826737565 moveto +321.539897275983 84.346424973651 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.539897275983 84.346424973651 moveto +318.545399193596 81.5864055130366 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.545399193596 81.5864055130366 moveto +315.632442323115 78.7404595439251 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.632442323115 78.7404595439251 moveto +312.803491316867 75.8109950207331 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.803491316867 75.8109950207331 moveto +310.060939749836 72.8004905629122 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.060939749836 72.8004905629122 moveto +307.40710809445 69.7114933577889 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.40710809445 69.7114933577889 moveto +304.844241757237 66.546617005391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.844241757237 66.546617005391 moveto +302.374509178983 63.3085393070797 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.374509178983 63.3085393070797 moveto +300.000000000018 59.9999999998634 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000018 59.9999999998634 moveto +302.393717187693 63.2946690596953 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.393717187693 63.2946690596953 moveto +304.690597190553 66.6575649012063 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.690597190553 66.6575649012063 moveto +306.888696618803 70.0858421787778 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.888696618803 70.0858421787778 moveto +308.986155660879 73.576600227569 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +308.986155660879 73.576600227569 moveto +310.981199657031 77.1268855177685 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.981199657031 77.1268855177685 moveto +312.872140600861 80.7336941535761 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.872140600861 80.7336941535761 moveto +314.657378567547 84.3939744147979 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.657378567547 84.3939744147979 moveto +316.335403067539 88.1046293389067 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.335403067539 88.1046293389067 moveto +317.904794324584 91.8625193413812 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.904794324584 91.8625193413812 moveto +319.364224476997 95.6644648721081 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.364224476997 95.6644648721081 moveto +320.712458701167 99.5072491055989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.712458701167 99.5072491055989 moveto +321.948356256337 103.387620662745 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.948356256337 103.387620662745 moveto +319.554639068662 100.092951602913 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.554639068662 100.092951602913 moveto +317.257759065802 96.7300557614023 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.257759065802 96.7300557614023 moveto +315.059659637552 93.3017784838305 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.059659637552 93.3017784838305 moveto +312.962200595476 89.8110204350392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962200595476 89.8110204350392 moveto +310.967156599325 86.2607351448395 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.967156599325 86.2607351448395 moveto +309.076215655496 82.6539265090318 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.076215655496 82.6539265090318 moveto +307.29097768881 78.9936462478099 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.29097768881 78.9936462478099 moveto +305.612953188818 75.282991323701 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.612953188818 75.282991323701 moveto +304.043561931773 71.5251013212264 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.043561931773 71.5251013212264 moveto +302.58413177936 67.7231557904994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.58413177936 67.7231557904994 moveto +301.235897555191 63.8803715570085 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.235897555191 63.8803715570085 moveto +300.000000000021 59.999999999862 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000021 59.999999999862 moveto +301.258451599197 63.8731157689704 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.258451599197 63.8731157689704 moveto +302.403722327725 67.781194727585 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.403722327725 67.781194727585 moveto +303.434843172228 71.7209302507412 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.434843172228 71.7209302507412 moveto +304.350941701529 75.6889889288608 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.350941701529 75.6889889288608 moveto +305.151242804813 79.6820133881485 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.151242804813 79.6820133881485 moveto +305.835069347448 83.6966251312657 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.835069347448 83.6966251312657 moveto +306.40184274391 87.7294273958766 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.40184274391 87.7294273958766 moveto +306.85108344732 91.7770080286481 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.85108344732 91.7770080286481 moveto +307.182411355193 95.8359423722723 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.182411355193 95.8359423722723 moveto +307.395546131041 99.9027961630683 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.395546131041 99.9027961630683 moveto +307.490307441565 103.974128436712 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.490307441565 103.974128436712 moveto +307.466615109236 108.046494439637 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.466615109236 108.046494439637 moveto +306.208163510058 104.173378670529 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.208163510058 104.173378670529 moveto +305.062892781531 100.265299711914 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.062892781531 100.265299711914 moveto +304.031771937027 96.325564188758 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.031771937027 96.325564188758 moveto +303.115673407726 92.3575055106385 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.115673407726 92.3575055106385 moveto +302.315372304441 88.3644810513509 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.315372304441 88.3644810513509 moveto +301.631545761805 84.3498693082338 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.631545761805 84.3498693082338 moveto +301.064772365343 80.317067043623 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.064772365343 80.317067043623 moveto +300.615531661933 76.2694864108515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.615531661933 76.2694864108515 moveto +300.284203754059 72.2105520672274 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.284203754059 72.2105520672274 moveto +300.071068978211 68.1436982764314 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.071068978211 68.1436982764314 moveto +299.976307667686 64.0723660027874 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.976307667686 64.0723660027874 moveto +300.000000000015 59.9999999998628 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000015 59.9999999998628 moveto +300.000000000019 64.0724349211829 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000019 64.0724349211829 moveto +299.881554375737 68.1431469992444 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.881554375737 68.1431469992444 moveto +299.644763343992 72.2086920052273 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.644763343992 72.2086920052273 moveto +299.289827253637 76.2656300821704 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.289827253637 76.2656300821704 moveto +298.81704641604 80.3105286554339 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.81704641604 80.3105286554339 moveto +298.22682085099 84.3399653369997 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.22682085099 84.3399653369997 moveto +297.51964994824 88.3505308211542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.51964994824 88.3505308211542 moveto +296.696132044975 92.3388317691005 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.696132044975 92.3388317691005 moveto +295.756963919557 96.3014936800622 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.756963919557 96.3014936800622 moveto +294.702940201983 100.235163746448 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.702940201983 100.235163746448 moveto +293.534952701548 104.136513690661 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.534952701548 104.136513690661 moveto +292.253989652282 108.002242581156 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.253989652282 108.002242581156 moveto +292.253989652277 103.929807659836 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.253989652277 103.929807659836 moveto +292.372435276559 99.8590955817741 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.372435276559 99.8590955817741 moveto +292.609226308303 95.7935505757912 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.609226308303 95.7935505757912 moveto +292.964162398658 91.736612498848 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.964162398658 91.736612498848 moveto +293.436943236254 87.6917139255845 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.436943236254 87.6917139255845 moveto +294.027168801304 83.6622772440186 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.027168801304 83.6622772440186 moveto +294.734339704053 79.651711759864 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.734339704053 79.651711759864 moveto +295.557857607318 75.6634108119176 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.557857607318 75.6634108119176 moveto +296.497025732735 71.7007489009558 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.497025732735 71.7007489009558 moveto +297.551049450309 67.7670788345699 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.551049450309 67.7670788345699 moveto +298.719036950744 63.8657288903564 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.719036950744 63.8657288903564 moveto +300.000000000009 59.9999999998618 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000009 59.9999999998618 moveto +298.74154840084 63.8731157689728 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.74154840084 63.8731157689728 moveto +297.370980706713 67.7079913059625 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.370980706713 67.7079913059625 moveto +295.889456554727 71.5013819232693 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.889456554727 71.5013819232693 moveto +294.298229462226 75.2500780337158 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.298229462226 75.2500780337158 moveto +292.598645766189 78.950907866139 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.598645766189 78.950907866139 moveto +290.792143484103 82.6007401490263 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.792143484103 82.6007401490263 moveto +288.880251097252 86.196486759883 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.880251097252 86.196486759883 moveto +286.86458625747 89.735105338093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.86458625747 89.735105338093 moveto +284.746854418446 93.2136018590589 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.746854418446 93.2136018590589 moveto +282.528847392741 96.6290331674463 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.528847392741 96.6290331674463 moveto +280.212441835736 99.9785094673865 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.212441835736 99.9785094673865 moveto +277.79959765779 103.259196767533 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +277.79959765779 103.259196767533 moveto +279.058049256959 99.3860809984217 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.058049256959 99.3860809984217 moveto +280.428616951086 95.5512054614319 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.428616951086 95.5512054614319 moveto +281.91014110307 91.7578148441248 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.91014110307 91.7578148441248 moveto +283.501368195571 88.0091187336782 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.501368195571 88.0091187336782 moveto +285.200951891608 84.3082889012547 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.200951891608 84.3082889012547 moveto +287.007454173693 80.6584566183672 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.007454173693 80.6584566183672 moveto +288.919346560544 77.0627100075101 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.919346560544 77.0627100075101 moveto +290.935011400325 73.5240914292999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.935011400325 73.5240914292999 moveto +293.052743239349 70.0455949083336 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.052743239349 70.0455949083336 moveto +295.270750265053 66.630163599946 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.270750265053 66.630163599946 moveto +297.587155822058 63.2806873000054 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.587155822058 63.2806873000054 moveto +300.000000000003 59.9999999998587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000003 59.9999999998587 moveto +297.606282812335 63.2946690596963 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.606282812335 63.2946690596963 moveto +295.11775376357 66.5183237189052 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.11775376357 66.5183237189052 moveto +292.536518397726 69.668236443808 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.536518397726 69.668236443808 moveto +289.864760697623 72.7417420937662 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.864760697623 72.7417420937662 moveto +287.10474123701 75.7362401761546 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.10474123701 75.7362401761546 moveto +284.258795267901 78.649197046638 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.258795267901 78.649197046638 moveto +281.329330744711 81.4781480528872 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.329330744711 81.4781480528872 moveto +278.318826286892 84.2206996199208 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.318826286892 84.2206996199208 moveto +275.22982908177 86.874531275309 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.22982908177 86.874531275309 moveto +272.064952729374 89.4373976125242 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.064952729374 89.4373976125242 moveto +268.826875031065 91.9071301907801 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.826875031065 91.9071301907801 moveto +265.51833572385 94.2816393697482 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +265.51833572385 94.2816393697482 moveto +267.912052911517 90.9869703099102 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +267.912052911517 90.9869703099102 moveto +270.400581960282 87.7633156507011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.400581960282 87.7633156507011 moveto +272.981817326126 84.6134029257979 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.981817326126 84.6134029257979 moveto +275.653575026229 81.5398972758393 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.653575026229 81.5398972758393 moveto +278.413594486841 78.5453991934505 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.413594486841 78.5453991934505 moveto +281.25954045595 75.6324423229667 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.25954045595 75.6324423229667 moveto +284.189004979139 72.803491316717 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.189004979139 72.803491316717 moveto +287.199509436958 70.0609397496829 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.199509436958 70.0609397496829 moveto +290.288506642079 67.4071080942943 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.288506642079 67.4071080942943 moveto +293.453382994475 64.8442417570785 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.453382994475 64.8442417570785 moveto +296.691460692784 62.3745091788222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.691460692784 62.3745091788222 moveto +299.999999999998 59.9999999998537 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.999999999998 59.9999999998537 moveto +296.705330940168 62.3937171875324 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.705330940168 62.3937171875324 moveto +293.34243509866 64.6905971903948 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.34243509866 64.6905971903948 moveto +289.91415782109 66.8886966186483 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.91415782109 66.8886966186483 moveto +286.423399772301 68.9861556607278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.423399772301 68.9861556607278 moveto +282.873114482103 70.9811996568827 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.873114482103 70.9811996568827 moveto +279.266305846298 72.8721406007159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.266305846298 72.8721406007159 moveto +275.606025585078 74.6573785674056 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.606025585078 74.6573785674056 moveto +271.89537066097 76.3354030674018 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.89537066097 76.3354030674018 moveto +268.137480658498 77.9047943244508 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.137480658498 77.9047943244508 moveto +264.335535127772 79.3642244768681 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.335535127772 79.3642244768681 moveto +260.492750894283 80.7124587010416 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +260.492750894283 80.7124587010416 moveto +256.612379337138 81.948356256216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.612379337138 81.948356256216 moveto +259.907048396967 79.5546390685368 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +259.907048396967 79.5546390685368 moveto +263.269944238476 77.257759065674 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +263.269944238476 77.257759065674 moveto +266.698221516045 75.0596596374201 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +266.698221516045 75.0596596374201 moveto +270.188979564834 72.9622005953402 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.188979564834 72.9622005953402 moveto +273.739264855031 70.9671565991848 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +273.739264855031 70.9671565991848 moveto +277.346073490837 69.0762156553512 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +277.346073490837 69.0762156553512 moveto +281.006353752056 67.290977688661 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.006353752056 67.290977688661 moveto +284.717008676163 65.6129531886643 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.717008676163 65.6129531886643 moveto +288.474898678636 64.0435619316148 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.474898678636 64.0435619316148 moveto +292.276844209361 62.5841317791969 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.276844209361 62.5841317791969 moveto +296.11962844285 61.2358975550229 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.11962844285 61.2358975550229 moveto +299.999999999995 59.999999999848 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.999999999995 59.999999999848 moveto +296.126884230888 61.2584515990298 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.126884230888 61.2584515990298 moveto +292.218805272275 62.4037223275621 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.218805272275 62.4037223275621 moveto +288.27906974912 63.4348431720697 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.27906974912 63.4348431720697 moveto +284.311011071002 64.3509417013757 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.311011071002 64.3509417013757 moveto +280.317986611715 65.151242804665 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.317986611715 65.151242804665 moveto +276.303374868599 65.8350693473056 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +276.303374868599 65.8350693473056 moveto +272.270572603989 66.4018427437722 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.270572603989 66.4018427437722 moveto +268.222991971218 66.8510834471874 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.222991971218 66.8510834471874 moveto +264.164057627594 67.1824113550657 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.164057627594 67.1824113550657 moveto +260.097203836798 67.3955461309188 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +260.097203836798 67.3955461309188 moveto +256.025871563154 67.490307441448 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.025871563154 67.490307441448 moveto +251.95350556023 67.4666151091238 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +251.95350556023 67.4666151091238 moveto +255.826621329337 66.2081635099416 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +255.826621329337 66.2081635099416 moveto +259.73470028795 65.0628927814088 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +259.73470028795 65.0628927814088 moveto +263.674435811104 64.0317719369008 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +263.674435811104 64.0317719369008 moveto +267.642494489223 63.1156734075943 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +267.642494489223 63.1156734075943 moveto +271.635518948509 62.3153723043047 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.635518948509 62.3153723043047 moveto +275.650130691626 61.6315457616636 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.650130691626 61.6315457616636 moveto +279.682932956236 61.0647723651964 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.682932956236 61.0647723651964 moveto +283.730513589007 60.6155316617808 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.730513589007 60.6155316617808 moveto +287.78944793263 60.284203753902 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.78944793263 60.284203753902 moveto +291.856301723426 60.0710689780484 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +291.856301723426 60.0710689780484 moveto +295.92763399707 59.9763076675187 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.92763399707 59.9763076675187 moveto +299.999999999994 59.9999999998424 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.999999999994 59.9999999998424 moveto +295.927565078674 59.9999999998518 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.927565078674 59.9999999998518 moveto +291.856853000613 59.881554375575 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +291.856853000613 59.881554375575 moveto +287.79130799463 59.6447633438352 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.79130799463 59.6447633438352 moveto +283.734369917686 59.2898272534855 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.734369917686 59.2898272534855 moveto +279.689471344422 58.8170464158936 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.689471344422 58.8170464158936 moveto +275.660034662855 58.2268208508484 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.660034662855 58.2268208508484 moveto +271.6494691787 57.5196499481034 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.6494691787 57.5196499481034 moveto +267.661168230753 56.6961320448433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +267.661168230753 56.6961320448433 moveto +263.69850631979 55.7569639194306 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +263.69850631979 55.7569639194306 moveto +259.764836253403 54.7029402018619 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +259.764836253403 54.7029402018619 moveto +255.863486309188 53.5349527014311 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +255.863486309188 53.5349527014311 moveto +251.997757418692 52.2539896521704 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +251.997757418692 52.2539896521704 moveto +256.070192340012 52.2539896521606 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.070192340012 52.2539896521606 moveto +260.140904418073 52.3724352764369 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +260.140904418073 52.3724352764369 moveto +264.206449424057 52.6092263081761 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.206449424057 52.6092263081761 moveto +268.263387501 52.9641623985254 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.263387501 52.9641623985254 moveto +272.308286074264 53.4369432361169 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.308286074264 53.4369432361169 moveto +276.337722755831 54.0271688011617 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +276.337722755831 54.0271688011617 moveto +280.348288239987 54.734339703906 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.348288239987 54.734339703906 moveto +284.336589187934 55.5578576071658 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.336589187934 55.5578576071658 moveto +288.299251098897 56.4970257325781 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.299251098897 56.4970257325781 moveto +292.232921165284 57.5510494501464 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.232921165284 57.5510494501464 moveto +296.134271109499 58.7190369505767 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.134271109499 58.7190369505767 moveto +299.999999999995 59.9999999998369 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.999999999995 59.9999999998369 moveto +296.126884230883 58.7415484006729 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.126884230883 58.7415484006729 moveto +292.292008693891 57.3709807065503 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.292008693891 57.3709807065503 moveto +288.498618076583 55.8894565545699 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.498618076583 55.8894565545699 moveto +284.749921966134 54.2982294620731 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.749921966134 54.2982294620731 moveto +281.049092133709 52.5986457660411 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.049092133709 52.5986457660411 moveto +277.399259850819 50.79214348396 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +277.399259850819 50.79214348396 moveto +273.80351323996 48.8802510971134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +273.80351323996 48.8802510971134 moveto +270.264894661747 46.8645862573356 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.264894661747 46.8645862573356 moveto +266.786398140779 44.7468544183161 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +266.786398140779 44.7468544183161 moveto +263.370966832389 42.5288473926159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +263.370966832389 42.5288473926159 moveto +260.021490532445 40.2124418356146 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +260.021490532445 40.2124418356146 moveto +256.740803232296 37.7995976576733 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.740803232296 37.7995976576733 moveto +260.613919001409 39.0580492568369 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +260.613919001409 39.0580492568369 moveto +264.4487945384 40.4286169509589 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.4487945384 40.4286169509589 moveto +268.242185155709 41.9101411029388 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.242185155709 41.9101411029388 moveto +271.990881266158 43.5013681954353 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.990881266158 43.5013681954353 moveto +275.691711098583 45.2009518914667 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.691711098583 45.2009518914667 moveto +279.341543381473 47.0074541735475 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.341543381473 47.0074541735475 moveto +282.937289992333 48.9193465603935 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.937289992333 48.9193465603935 moveto +286.475908570546 50.935011400171 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.475908570546 50.935011400171 moveto +289.954405091514 53.05274323919 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.954405091514 53.05274323919 moveto +293.369836399905 55.2707502648898 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.369836399905 55.2707502648898 moveto +296.719312699848 57.5871558218905 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.719312699848 57.5871558218905 moveto +299.999999999998 59.9999999998315 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.999999999998 59.9999999998315 moveto +296.705330940157 57.606282812168 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.705330940157 57.606282812168 moveto +293.481676280946 55.1177537634068 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.481676280946 55.1177537634068 moveto +290.331763556039 52.5365183975671 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.331763556039 52.5365183975671 moveto +287.258257906078 49.8647606974674 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.258257906078 49.8647606974674 moveto +284.263759823686 47.1047412368588 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.263759823686 47.1047412368588 moveto +281.350802953199 44.2587952677529 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.350802953199 44.2587952677529 moveto +278.521851946946 41.3293307445665 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.521851946946 41.3293307445665 moveto +275.779300379908 38.3188262867509 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.779300379908 38.3188262867509 moveto +273.125468724516 35.2298290816329 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +273.125468724516 35.2298290816329 moveto +270.562602387297 32.06495272924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.562602387297 32.06495272924 moveto +268.092869809037 28.8268750309338 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.092869809037 28.8268750309338 moveto +265.718360630065 25.5183357237222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +265.718360630065 25.5183357237222 moveto +269.013029689906 27.9120529113854 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +269.013029689906 27.9120529113854 moveto +272.236684349118 30.4005819601461 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.236684349118 30.4005819601461 moveto +275.386597074025 32.9818173259853 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.386597074025 32.9818173259853 moveto +278.460102723987 35.6535750260845 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.460102723987 35.6535750260845 moveto +281.454600806379 38.4135944866927 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.454600806379 38.4135944866927 moveto +284.367557676866 41.2595404557982 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.367557676866 41.2595404557982 moveto +287.19650868312 44.1890049789842 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.19650868312 44.1890049789842 moveto +289.939060250158 47.1995094367995 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.939060250158 47.1995094367995 moveto +292.59289190555 50.2885066419171 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.59289190555 50.2885066419171 moveto +295.15575824277 53.4533829943095 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.15575824277 53.4533829943095 moveto +297.62549082103 56.6914606926155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.62549082103 56.6914606926155 moveto +300.000000000003 59.9999999998268 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000003 59.9999999998268 moveto +297.60628281232 56.7053309400002 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.60628281232 56.7053309400002 moveto +295.309402809453 53.3424350984941 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.309402809453 53.3424350984941 moveto +293.111303381196 49.9141578209273 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.111303381196 49.9141578209273 moveto +291.013844339112 46.4233997721408 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +291.013844339112 46.4233997721408 moveto +289.018800342952 42.8731144819458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.018800342952 42.8731144819458 moveto +287.127859399114 39.2663058461424 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.127859399114 39.2663058461424 moveto +285.34262143242 35.6060255849247 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.34262143242 35.6060255849247 moveto +283.664596932419 31.8953706608197 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.664596932419 31.8953706608197 moveto +282.095205675365 28.1374806583489 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.095205675365 28.1374806583489 moveto +280.635775522943 24.3355351276254 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.635775522943 24.3355351276254 moveto +279.287541298765 20.4927508941377 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.287541298765 20.4927508941377 moveto +278.051643743586 16.612379336994 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.051643743586 16.612379336994 moveto +280.445360931269 19.9070483968203 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.445360931269 19.9070483968203 moveto +282.742240934136 23.269944238326 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.742240934136 23.269944238326 moveto +284.940340362394 26.6982215158925 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.940340362394 26.6982215158925 moveto +287.037799404479 30.1889795646786 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037799404479 30.1889795646786 moveto +289.032843400639 33.7392648548735 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.032843400639 33.7392648548735 moveto +290.923784344477 37.3460734906765 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.923784344477 37.3460734906765 moveto +292.709022311172 41.0063537518941 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.709022311172 41.0063537518941 moveto +294.387046811173 44.7170086759988 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.387046811173 44.7170086759988 moveto +295.956438068227 48.4748986784695 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.956438068227 48.4748986784695 moveto +297.41586822065 52.2768442091928 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.41586822065 52.2768442091928 moveto +298.764102444829 56.1196284426802 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.764102444829 56.1196284426802 moveto +300.000000000009 59.9999999998237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000009 59.9999999998237 moveto +298.741548400822 56.1268842307185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.741548400822 56.1268842307185 moveto +297.596277672285 52.2188052721068 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.596277672285 52.2188052721068 moveto +296.565156827772 48.2790697489531 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.565156827772 48.2790697489531 moveto +295.649058298461 44.3110110708359 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.649058298461 44.3110110708359 moveto +294.848757195167 40.3179866115502 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.848757195167 40.3179866115502 moveto +294.164930652521 36.3033748684347 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.164930652521 36.3033748684347 moveto +293.59815725605 32.2705726038253 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.59815725605 32.2705726038253 moveto +293.148916552629 28.2229919710549 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.148916552629 28.2229919710549 moveto +292.817588644746 24.1640576274315 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.817588644746 24.1640576274315 moveto +292.604453868888 20.0972038366361 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.604453868888 20.0972038366361 moveto +292.509692558353 16.0258715629923 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.509692558353 16.0258715629923 moveto +292.533384890672 11.9535055600676 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.533384890672 11.9535055600676 moveto +293.79183648986 15.8266213291727 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.79183648986 15.8266213291727 moveto +294.937107218397 19.7347002877842 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.937107218397 19.7347002877842 moveto +295.968228062911 23.6744358109378 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.968228062911 23.6744358109378 moveto +296.884326592222 27.6424944890549 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.884326592222 27.6424944890549 moveto +297.684627695517 31.6355189483405 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +297.684627695517 31.6355189483405 moveto +298.368454238163 35.6501306914558 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.368454238163 35.6501306914558 moveto +298.935227634635 39.6829329560652 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.935227634635 39.6829329560652 moveto +299.384468338056 43.7305135888356 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.384468338056 43.7305135888356 moveto +299.71579624594 47.7894479324589 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.71579624594 47.7894479324589 moveto +299.928931021799 51.8563017232543 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.928931021799 51.8563017232543 moveto +300.023692332334 55.927633996898 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.023692332334 55.927633996898 moveto +300.000000000015 59.9999999998227 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000015 59.9999999998227 moveto +300.000000000001 55.9275650785026 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000001 55.9275650785026 moveto +300.118445624272 51.8568530004408 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.118445624272 51.8568530004408 moveto +300.355236656007 47.7913079944573 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.355236656007 47.7913079944573 moveto +300.710172746352 43.7343699175133 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.710172746352 43.7343699175133 moveto +301.182953583938 39.6894713442486 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.182953583938 39.6894713442486 moveto +301.773179148978 35.6600346626813 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.773179148978 35.6600346626813 moveto +302.480350051718 31.649469178525 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.480350051718 31.649469178525 moveto +303.303867954973 27.6611682305767 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.303867954973 27.6611682305767 moveto +304.243036080381 23.6985063196126 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.243036080381 23.6985063196126 moveto +305.297059797945 19.7648362532242 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.297059797945 19.7648362532242 moveto +306.465047298371 15.8634863090078 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.465047298371 15.8634863090078 moveto +307.746010347626 11.9977574185101 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.746010347626 11.9977574185101 moveto +307.746010347641 16.0701923398302 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.746010347641 16.0701923398302 moveto +307.62756472337 20.140904417892 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.62756472337 20.140904417892 moveto +307.390773691636 24.2064494238756 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.390773691636 24.2064494238756 moveto +307.035837601292 28.2633875008196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.035837601292 28.2633875008196 moveto +306.563056763706 32.3082860740843 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.563056763706 32.3082860740843 moveto +305.972831198666 36.3377227556517 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.972831198666 36.3377227556517 moveto +305.265660295927 40.3482882398081 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.265660295927 40.3482882398081 moveto +304.442142392672 44.3365891877566 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.442142392672 44.3365891877566 moveto +303.502974267265 48.2992510987208 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.502974267265 48.2992510987208 moveto +302.448950549702 52.2329211651094 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.448950549702 52.2329211651094 moveto +301.280963049277 56.1342711093258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.280963049277 56.1342711093258 moveto +300.000000000021 59.9999999998237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000021 59.9999999998237 moveto +301.25845159918 56.1268842307095 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.25845159918 56.1268842307095 moveto +302.629019293298 52.2920086937164 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.629019293298 52.2920086937164 moveto +304.110543445274 48.4986180764057 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.110543445274 48.4986180764057 moveto +305.701770537766 44.7499219659552 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.701770537766 44.7499219659552 moveto +307.401354233793 41.0490921335276 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.401354233793 41.0490921335276 moveto +309.20785651587 37.3992598506357 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.20785651587 37.3992598506357 moveto +311.119748902712 33.8035132397741 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.119748902712 33.8035132397741 moveto +313.135413742485 30.264894661559 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +313.135413742485 30.264894661559 moveto +315.2531455815 26.7863981405876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.2531455815 26.7863981405876 moveto +317.471152607196 23.3709668321947 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.471152607196 23.3709668321947 moveto +319.787558164193 20.0214905322485 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.787558164193 20.0214905322485 moveto +322.20040234213 16.7408032320959 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +322.20040234213 16.7408032320959 moveto +320.941950742971 20.6139190012103 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.941950742971 20.6139190012103 moveto +319.571383048854 24.4487945382036 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.571383048854 24.4487945382036 moveto +318.089858896879 28.2421851555144 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.089858896879 28.2421851555144 moveto +316.498631804387 31.9908812659651 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.498631804387 31.9908812659651 moveto +314.79904810836 35.6917110983929 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.79904810836 35.6917110983929 moveto +312.992545826284 39.341543381285 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.992545826284 39.341543381285 moveto +311.080653439443 42.9372899921469 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.080653439443 42.9372899921469 moveto +309.06498859967 46.4759085703622 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.06498859967 46.4759085703622 moveto +306.947256760655 49.9544050913338 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.947256760655 49.9544050913338 moveto +304.72924973496 53.3698363997271 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.72924973496 53.3698363997271 moveto +302.412844177963 56.7193126996735 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.412844177963 56.7193126996735 moveto +300.000000000026 59.9999999998263 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000026 59.9999999998263 moveto +302.393717187686 56.7053309399827 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +302.393717187686 56.7053309399827 moveto +304.882246236443 53.4816762807675 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.882246236443 53.4816762807675 moveto +307.463481602279 50.331763555858 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.463481602279 50.331763555858 moveto +310.135239302374 47.2582579058929 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.135239302374 47.2582579058929 moveto +312.895258762979 44.2637598234975 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.895258762979 44.2637598234975 moveto +315.741204732081 41.3508029530069 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.741204732081 41.3508029530069 moveto +318.670669255264 38.5218519467502 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.670669255264 38.5218519467502 moveto +321.681173713076 35.7793003797088 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.681173713076 35.7793003797088 moveto +324.770170918191 33.1254687243128 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.770170918191 33.1254687243128 moveto +327.93504727058 30.5626023870895 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.93504727058 30.5626023870895 moveto +331.173124968884 28.0928698088253 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.173124968884 28.0928698088253 moveto +334.481664276092 25.7183606298488 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +334.481664276092 25.7183606298488 moveto +332.087947088433 29.0130296896928 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +332.087947088433 29.0130296896928 moveto +329.599418039676 32.2366843489083 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.599418039676 32.2366843489083 moveto +327.018182673841 35.3865970738181 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.018182673841 35.3865970738181 moveto +324.346424973746 38.4601027237834 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.346424973746 38.4601027237834 moveto +321.586405513141 41.4546008061793 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.586405513141 41.4546008061793 moveto +318.74045954404 44.3675576766703 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.74045954404 44.3675576766703 moveto +315.810995020857 47.1965086829273 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.810995020857 47.1965086829273 moveto +312.800490563045 49.939060249969 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.800490563045 49.939060249969 moveto +309.711493357931 52.5928919053654 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.711493357931 52.5928919053654 moveto +306.546617005542 55.1557582425893 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.546617005542 55.1557582425893 moveto +303.308539307239 57.6254908208537 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.308539307239 57.6254908208537 moveto +300.000000000031 59.9999999998306 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000031 59.9999999998306 moveto +303.294669059854 57.6062828121435 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.294669059854 57.6062828121435 moveto +306.657564901357 55.3094028092725 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.657564901357 55.3094028092725 moveto +310.085842178921 53.1113033810104 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.085842178921 53.1113033810104 moveto +313.576600227705 51.013844338922 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +313.576600227705 51.013844338922 moveto +317.126885517898 49.0188003427581 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.126885517898 49.0188003427581 moveto +320.733694153699 47.1278593989157 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.733694153699 47.1278593989157 moveto +324.393974414914 45.3426214322166 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.393974414914 45.3426214322166 moveto +328.104629339017 43.6645969322109 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.104629339017 43.6645969322109 moveto +331.862519341486 42.0952056751524 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.862519341486 42.0952056751524 moveto +335.664464872208 40.6357755227255 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.664464872208 40.6357755227255 moveto +339.507249105693 39.2875412985421 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +339.507249105693 39.2875412985421 moveto +343.387620662836 38.0516437433578 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.387620662836 38.0516437433578 moveto +340.092951603012 40.4453609310454 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +340.092951603012 40.4453609310454 moveto +336.730055761509 42.7422409339167 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +336.730055761509 42.7422409339167 moveto +333.301778483946 44.9403403621793 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +333.301778483946 44.9403403621793 moveto +329.811020435162 47.0377994042681 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.811020435162 47.0377994042681 moveto +326.26073514497 49.0328434004326 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +326.26073514497 49.0328434004326 moveto +322.653926509169 50.9237843442753 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +322.653926509169 50.9237843442753 moveto +318.993646247954 52.7090223109747 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.993646247954 52.7090223109747 moveto +315.282991323851 54.3870468109808 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.282991323851 54.3870468109808 moveto +311.525101321383 55.9564380680399 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.525101321383 55.9564380680399 moveto +307.723155790661 57.4158682204673 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.723155790661 57.4158682204673 moveto +303.880371557175 58.764102444651 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.880371557175 58.764102444651 moveto +300.000000000033 59.9999999998358 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.000000000033 59.9999999998358 moveto +303.873115769137 58.7415484006441 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.873115769137 58.7415484006441 moveto +307.781194727747 57.596277672102 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.781194727747 57.596277672102 moveto +311.7209302509 56.5651568275843 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.7209302509 56.5651568275843 moveto +315.688988929016 55.6490582982682 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.688988929016 55.6490582982682 moveto +319.6820133883 54.8487571949689 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.6820133883 54.8487571949689 moveto +323.696625131415 54.1649306523181 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +323.696625131415 54.1649306523181 moveto +327.729427396024 53.5981572558412 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.729427396024 53.5981572558412 moveto +331.777008028794 53.1489165524158 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.777008028794 53.1489165524158 moveto +335.835942372417 52.8175886445271 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.835942372417 52.8175886445271 moveto +339.902796163212 52.6044538686637 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +339.902796163212 52.6044538686637 moveto +343.974128436855 52.5096925581242 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.974128436855 52.5096925581242 moveto +348.04649443978 52.533384890438 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +348.04649443978 52.533384890438 moveto +344.173378670677 53.7918364896302 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +344.173378670677 53.7918364896302 moveto +340.265299712067 54.9371072181729 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +340.265299712067 54.9371072181729 moveto +336.325564188914 55.968228062691 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +336.325564188914 55.968228062691 moveto +332.357505510798 56.8843265920076 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +332.357505510798 56.8843265920076 moveto +328.364481051514 57.6846276953076 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.364481051514 57.6846276953076 moveto +324.349869308399 58.3684542379588 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.349869308399 58.3684542379588 moveto +320.317067043791 58.9352276344362 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.317067043791 58.9352276344362 moveto +316.269486411021 59.3844683378622 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.269486411021 59.3844683378622 moveto +312.210552067398 59.7157962457514 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.210552067398 59.7157962457514 moveto +308.143698276603 59.9289310216153 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +308.143698276603 59.9289310216153 moveto +304.072366002959 60.0236923321552 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.072366002959 60.0236923321552 moveto +300.000000000034 59.999999999842 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +restore showpage + +%%Trailer +end +%%EOF diff --git a/book_kr/figs/flowers.pdf b/book_kr/figs/flowers.pdf new file mode 100644 index 0000000..93bf385 Binary files /dev/null and b/book_kr/figs/flowers.pdf differ diff --git a/book_kr/figs/interpret.eps b/book_kr/figs/interpret.eps new file mode 100644 index 0000000..8274779 --- /dev/null +++ b/book_kr/figs/interpret.eps @@ -0,0 +1,173 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: interpret.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:13:36 2012 +%%BoundingBox: 0 0 263 61 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 61 moveto 0 0 lineto 263 0 lineto 263 61 lineto closepath clip newpath +-138.2 86.0 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +gs clippath +3403 795 m 3615 795 l 3615 705 l 3403 705 l 3403 705 l 3583 750 l 3403 795 l cp +eoclip +n 3225 750 m + 3600 750 l gs col0 s gr gr + +% arrowhead +n 3403 795 m 3583 750 l 3403 705 l col0 s +% Polyline +15.000 slw +n 2325 1350 m 2325 450 l 3000 450 l 3150 600 l 3150 1350 l + 2325 1350 l cp gs col0 s gr +% Polyline +7.500 slw +n 3000 450 m 3000 600 l + 3150 600 l gs col0 s gr +% Polyline +15.000 slw +n 3748 640 m 3652 533 l 3652 900 l + 3748 798 l gs col0 s gr +% Polyline +7.500 slw +gs clippath +5375 1162 m 5587 1162 l 5587 1072 l 5375 1072 l 5375 1072 l 5555 1117 l 5375 1162 l cp +eoclip +n 5197 1117 m + 5572 1117 l gs col0 s gr gr + +% arrowhead +n 5375 1162 m 5555 1117 l 5375 1072 l col0 s +% Polyline +15.000 slw +n 5039 1173 m 5137 1275 l 5137 909 l + 5039 1014 l gs col0 s gr +% Polyline +n 3750 525 m 5047 525 l 5047 1290 l 3750 1290 l + cp gs col0 s gr +% Polyline +n 5919 1296 m 6376 1296 l 6376 1356 l 5919 1356 l + cp gs col0 s gr +% Polyline +n 5823 1357 m 6484 1357 l 6484 1412 l 5823 1412 l + cp gs col0 s gr +% Polyline +n 5638 463 m 6662 463 l 6662 1296 l 5638 1296 l + cp gs col7 1.00 shd ef gr gs col0 s gr +% Polyline +7.500 slw +n 5692 519 m 6606 519 l 6606 1237 l 5692 1237 l + cp gs col7 1.00 shd ef gr gs col0 s gr +/Helvetica ff 166.67 scf sf +2400 900 m +gs 1 -1 sc (SOURCE) col0 sh gr +/Helvetica ff 166.67 scf sf +2400 1125 m +gs 1 -1 sc (CODE) col0 sh gr +/Helvetica ff 166.67 scf sf +3825 975 m +gs 1 -1 sc (INTERPRETER) col0 sh gr +/Helvetica ff 166.67 scf sf +5813 953 m +gs 1 -1 sc (OUTPUT) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/interpret.fig b/book_kr/figs/interpret.fig new file mode 100644 index 0000000..f887cfe --- /dev/null +++ b/book_kr/figs/interpret.fig @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 3225 750 3600 750 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 6 + 2325 1350 2325 450 3000 450 3150 600 3150 1350 2325 1350 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 + 3000 450 3000 600 3150 600 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 3748 640 3652 533 3652 900 3748 798 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 180.00 + 5197 1117 5572 1117 +2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 4 + 5039 1173 5137 1275 5137 909 5039 1014 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 3750 525 5047 525 5047 1290 3750 1290 3750 525 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5919 1296 6376 1296 6376 1356 5919 1356 5919 1296 +2 2 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 5 + 5823 1357 6484 1357 6484 1412 5823 1412 5823 1357 +2 2 0 2 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5638 463 6662 463 6662 1296 5638 1296 5638 463 +2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 + 5692 519 6606 519 6606 1237 5692 1237 5692 519 +4 0 0 50 0 16 10 0.0000 4 120 675 2400 900 SOURCE\001 +4 0 0 50 0 16 10 0.0000 4 120 465 2400 1125 CODE\001 +4 0 0 50 0 16 10 0.0000 4 120 1050 3825 975 INTERPRETER\001 +4 0 0 50 0 16 10 0.0000 4 120 615 5813 953 OUTPUT\001 diff --git a/book_kr/figs/interpret.pdf b/book_kr/figs/interpret.pdf new file mode 100644 index 0000000..19dbb76 Binary files /dev/null and b/book_kr/figs/interpret.pdf differ diff --git a/book_kr/figs/koch.eps b/book_kr/figs/koch.eps new file mode 100644 index 0000000..37a5b19 --- /dev/null +++ b/book_kr/figs/koch.eps @@ -0,0 +1,10575 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Tk Canvas Widget +%%For: Allen Downey +%%Title: Window .-1211776788 +%%CreationDate: Tue Jul 3 12:40:49 2007 +%%BoundingBox: 177 357 435 435 +%%Pages: 1 +%%DocumentData: Clean7Bit +%%Orientation: Portrait +%%EndComments + +%%BeginProlog +/CurrentEncoding [ +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle +/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash +/zero/one/two/three/four/five/six/seven +/eight/nine/colon/semicolon/less/equal/greater/question +/at/A/B/C/D/E/F/G +/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W +/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore +/grave/a/b/c/d/e/f/g +/h/i/j/k/l/m/n/o +/p/q/r/s/t/u/v/w +/x/y/z/braceleft/bar/braceright/asciitilde/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclamdown/cent/sterling/currency/yen/brokenbar/section +/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron +/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered +/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis +/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply +/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls +/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide +/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis +] def + +50 dict begin +% This is a standard prolog for Postscript generated by Tk's canvas +% widget. +% RCS: @(#) $Id: mkpsenc.tcl,v 1.3 2002/07/19 14:37:21 drh Exp $ + +% The definitions below just define all of the variables used in +% any of the procedures here. This is needed for obscure reasons +% explained on p. 716 of the Postscript manual (Section H.2.7, +% "Initializing Variables," in the section on Encapsulated Postscript). + +/baseline 0 def +/stipimage 0 def +/height 0 def +/justify 0 def +/lineLength 0 def +/spacing 0 def +/stipple 0 def +/strings 0 def +/xoffset 0 def +/yoffset 0 def +/tmpstip null def + + +/cstringshow { + { + dup type /stringtype eq + { show } { glyphshow } + ifelse + } + forall +} bind def + + + +/cstringwidth { + 0 exch 0 exch + { + dup type /stringtype eq + { stringwidth } { + currentfont /Encoding get exch 1 exch put (\001) stringwidth + } + ifelse + exch 3 1 roll add 3 1 roll add exch + } + forall +} bind def + +% font ISOEncode font +% This procedure changes the encoding of a font from the default +% Postscript encoding to current system encoding. It's typically invoked just +% before invoking "setfont". The body of this procedure comes from +% Section 5.6.1 of the Postscript book. + +/ISOEncode { + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding CurrentEncoding def + currentdict + end + + % I'm not sure why it's necessary to use "definefont" on this new + % font, but it seems to be important; just use the name "Temporary" + % for the font. + + /Temporary exch definefont +} bind def + +% StrokeClip +% +% This procedure converts the current path into a clip area under +% the assumption of stroking. It's a bit tricky because some Postscript +% interpreters get errors during strokepath for dashed lines. If +% this happens then turn off dashes and try again. + +/StrokeClip { + {strokepath} stopped { + (This Postscript printer gets limitcheck overflows when) = + (stippling dashed lines; lines will be printed solid instead.) = + [] 0 setdash strokepath} if + clip +} bind def + +% desiredSize EvenPixels closestSize +% +% The procedure below is used for stippling. Given the optimal size +% of a dot in a stipple pattern in the current user coordinate system, +% compute the closest size that is an exact multiple of the device's +% pixel size. This allows stipple patterns to be displayed without +% aliasing effects. + +/EvenPixels { + % Compute exact number of device pixels per stipple dot. + dup 0 matrix currentmatrix dtransform + dup mul exch dup mul add sqrt + + % Round to an integer, make sure the number is at least 1, and compute + % user coord distance corresponding to this. + dup round dup 1 lt {pop 1} if + exch div mul +} bind def + +% width height string StippleFill -- +% +% Given a path already set up and a clipping region generated from +% it, this procedure will fill the clipping region with a stipple +% pattern. "String" contains a proper image description of the +% stipple pattern and "width" and "height" give its dimensions. Each +% stipple dot is assumed to be about one unit across in the current +% user coordinate system. This procedure trashes the graphics state. + +/StippleFill { + % The following code is needed to work around a NeWSprint bug. + + /tmpstip 1 index def + + % Change the scaling so that one user unit in user coordinates + % corresponds to the size of one stipple dot. + 1 EvenPixels dup scale + + % Compute the bounding box occupied by the path (which is now + % the clipping region), and round the lower coordinates down + % to the nearest starting point for the stipple pattern. Be + % careful about negative numbers, since the rounding works + % differently on them. + + pathbbox + 4 2 roll + 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll + 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll + + % Stack now: width height string y1 y2 x1 x2 + % Below is a doubly-nested for loop to iterate across this area + % in units of the stipple pattern size, going up columns then + % across rows, blasting out a stipple-pattern-sized rectangle at + % each position + + 6 index exch { + 2 index 5 index 3 index { + % Stack now: width height string y1 y2 x y + + gsave + 1 index exch translate + 5 index 5 index true matrix tmpstip imagemask + grestore + } for + pop + } for + pop pop pop pop pop +} bind def + +% -- AdjustColor -- +% Given a color value already set for output by the caller, adjusts +% that value to a grayscale or mono value if requested by the CL +% variable. + +/AdjustColor { + CL 2 lt { + currentgray + CL 0 eq { + .5 lt {0} {1} ifelse + } if + setgray + } if +} bind def + +% x y strings spacing xoffset yoffset justify stipple DrawText -- +% This procedure does all of the real work of drawing text. The +% color and font must already have been set by the caller, and the +% following arguments must be on the stack: +% +% x, y - Coordinates at which to draw text. +% strings - An array of strings, one for each line of the text item, +% in order from top to bottom. +% spacing - Spacing between lines. +% xoffset - Horizontal offset for text bbox relative to x and y: 0 for +% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se. +% yoffset - Vertical offset for text bbox relative to x and y: 0 for +% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se. +% justify - 0 for left justification, 0.5 for center, 1 for right justify. +% stipple - Boolean value indicating whether or not text is to be +% drawn in stippled fashion. If text is stippled, +% procedure StippleText must have been defined to call +% StippleFill in the right way. +% +% Also, when this procedure is invoked, the color and font must already +% have been set for the text. + +/DrawText { + /stipple exch def + /justify exch def + /yoffset exch def + /xoffset exch def + /spacing exch def + /strings exch def + + % First scan through all of the text to find the widest line. + + /lineLength 0 def + strings { + cstringwidth pop + dup lineLength gt {/lineLength exch def} {pop} ifelse + newpath + } forall + + % Compute the baseline offset and the actual font height. + + 0 0 moveto (TXygqPZ) false charpath + pathbbox dup /baseline exch def + exch pop exch sub /height exch def pop + newpath + + % Translate coordinates first so that the origin is at the upper-left + % corner of the text's bounding box. Remember that x and y for + % positioning are still on the stack. + + translate + lineLength xoffset mul + strings length 1 sub spacing mul height add yoffset mul translate + + % Now use the baseline and justification information to translate so + % that the origin is at the baseline and positioning point for the + % first line of text. + + justify lineLength mul baseline neg translate + + % Iterate over each of the lines to output it. For each line, + % compute its width again so it can be properly justified, then + % display it. + + strings { + dup cstringwidth pop + justify neg mul 0 moveto + stipple { + + + % The text is stippled, so turn it into a path and print + % by calling StippledText, which in turn calls StippleFill. + % Unfortunately, many Postscript interpreters will get + % overflow errors if we try to do the whole string at + % once, so do it a character at a time. + + gsave + /char (X) def + { + dup type /stringtype eq { + % This segment is a string. + { + char 0 3 -1 roll put + currentpoint + gsave + char true charpath clip StippleText + grestore + char stringwidth translate + moveto + } forall + } { + % This segment is glyph name + % Temporary override + currentfont /Encoding get exch 1 exch put + currentpoint + gsave (\001) true charpath clip StippleText + grestore + (\001) stringwidth translate + moveto + } ifelse + } forall + grestore + } {cstringshow} ifelse + 0 spacing neg translate + } forall +} bind def + +%%EndProlog +%%BeginSetup +/CL 2 def +%%EndSetup + +%%Page: 1 1 +save +306.0 396.0 translate +0.846 0.846 scale +-200 -45 translate +48 91 moveto 352 91 lineto 352 0 lineto 48 0 lineto closepath clip newpath +gsave +50 2 moveto +51.2345679012346 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +51.2345679012346 2 moveto +51.8518518518518 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +51.8518518518518 3.06916716516599 moveto +52.4691358024691 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +52.4691358024691 2 moveto +53.7037037037037 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +53.7037037037037 2 moveto +54.320987654321 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +54.320987654321 3.06916716516599 moveto +53.7037037037037 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +53.7037037037037 4.13833433033196 moveto +54.9382716049383 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +54.9382716049383 4.13833433033196 moveto +55.5555555555555 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +55.5555555555555 5.20750149549794 moveto +56.1728395061728 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +56.1728395061728 4.13833433033196 moveto +57.4074074074074 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.4074074074074 4.13833433033196 moveto +56.7901234567901 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +56.7901234567901 3.06916716516599 moveto +57.4074074074074 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.4074074074074 2 moveto +58.6419753086419 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +58.6419753086419 2 moveto +59.2592592592592 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +59.2592592592592 3.06916716516599 moveto +59.8765432098765 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +59.8765432098765 2 moveto +61.1111111111111 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.1111111111111 2 moveto +61.7283950617284 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.7283950617284 3.06916716516599 moveto +61.1111111111111 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.1111111111111 4.13833433033196 moveto +62.3456790123456 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.3456790123456 4.13833433033196 moveto +62.9629629629629 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.9629629629629 5.20750149549794 moveto +62.3456790123456 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.3456790123456 6.27666866066392 moveto +61.1111111111111 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.1111111111111 6.27666866066392 moveto +61.7283950617284 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.7283950617284 7.34583582582989 moveto +61.1111111111111 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +61.1111111111111 8.41500299099587 moveto +62.3456790123456 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.3456790123456 8.41500299099587 moveto +62.9629629629629 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +62.9629629629629 9.48417015616185 moveto +63.5802469135802 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +63.5802469135802 8.41500299099587 moveto +64.8148148148148 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.8148148148148 8.41500299099587 moveto +65.4320987654321 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +65.4320987654321 9.48417015616185 moveto +64.8148148148148 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +64.8148148148148 10.5533373213278 moveto +66.0493827160493 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +66.0493827160493 10.5533373213278 moveto +66.6666666666666 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +66.6666666666666 11.6225044864938 moveto +67.2839506172839 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +67.2839506172839 10.5533373213278 moveto +68.5185185185185 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.5185185185185 10.5533373213278 moveto +67.9012345679012 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +67.9012345679012 9.48417015616185 moveto +68.5185185185185 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +68.5185185185185 8.41500299099587 moveto +69.753086419753 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +69.753086419753 8.41500299099587 moveto +70.3703703703703 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.3703703703703 9.48417015616185 moveto +70.9876543209876 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.9876543209876 8.41500299099587 moveto +72.2222222222222 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.2222222222222 8.41500299099587 moveto +71.6049382716049 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +71.6049382716049 7.34583582582989 moveto +72.2222222222222 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.2222222222222 6.27666866066392 moveto +70.9876543209876 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.9876543209876 6.27666866066392 moveto +70.3703703703703 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.3703703703703 5.20750149549794 moveto +70.9876543209876 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.9876543209876 4.13833433033196 moveto +72.2222222222222 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.2222222222222 4.13833433033196 moveto +71.6049382716049 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +71.6049382716049 3.06916716516599 moveto +72.2222222222222 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +72.2222222222222 2 moveto +73.4567901234568 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +73.4567901234568 2 moveto +74.074074074074 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +74.074074074074 3.06916716516599 moveto +74.6913580246913 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +74.6913580246913 2 moveto +75.9259259259259 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.9259259259259 2 moveto +76.5432098765432 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +76.5432098765432 3.06916716516599 moveto +75.9259259259259 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +75.9259259259259 4.13833433033196 moveto +77.1604938271605 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +77.1604938271605 4.13833433033196 moveto +77.7777777777777 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +77.7777777777777 5.20750149549794 moveto +78.395061728395 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +78.395061728395 4.13833433033196 moveto +79.6296296296296 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +79.6296296296296 4.13833433033196 moveto +79.0123456790123 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +79.0123456790123 3.06916716516599 moveto +79.6296296296296 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +79.6296296296296 2 moveto +80.8641975308641 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +80.8641975308641 2 moveto +81.4814814814814 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +81.4814814814814 3.06916716516599 moveto +82.0987654320987 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +82.0987654320987 2 moveto +83.3333333333333 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 2 moveto +83.9506172839505 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.9506172839505 3.06916716516599 moveto +83.3333333333333 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 4.13833433033196 moveto +84.5679012345678 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 4.13833433033196 moveto +85.1851851851851 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1851851851851 5.20750149549794 moveto +84.5679012345678 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 6.27666866066392 moveto +83.3333333333333 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 6.27666866066392 moveto +83.9506172839505 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.9506172839505 7.34583582582989 moveto +83.3333333333333 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 8.41500299099587 moveto +84.5679012345678 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 8.41500299099587 moveto +85.1851851851851 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1851851851851 9.48417015616185 moveto +85.8024691358024 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.8024691358024 8.41500299099587 moveto +87.037037037037 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 8.41500299099587 moveto +87.6543209876542 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.6543209876542 9.48417015616185 moveto +87.037037037037 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 10.5533373213278 moveto +88.2716049382715 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.2716049382715 10.5533373213278 moveto +88.8888888888888 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.8888888888888 11.6225044864938 moveto +88.2716049382715 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.2716049382715 12.6916716516598 moveto +87.037037037037 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 12.6916716516598 moveto +87.6543209876542 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.6543209876542 13.7608388168258 moveto +87.037037037037 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 14.8300059819917 moveto +85.8024691358024 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.8024691358024 14.8300059819917 moveto +85.1851851851851 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1851851851851 13.7608388168258 moveto +84.5679012345678 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 14.8300059819917 moveto +83.3333333333333 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 14.8300059819917 moveto +83.9506172839505 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.9506172839505 15.8991731471577 moveto +83.3333333333333 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 16.9683403123237 moveto +84.5679012345678 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 16.9683403123237 moveto +85.1851851851851 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1851851851851 18.0375074774897 moveto +84.5679012345678 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 19.1066746426557 moveto +83.3333333333333 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 19.1066746426557 moveto +83.9506172839505 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.9506172839505 20.1758418078216 moveto +83.3333333333333 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +83.3333333333333 21.2450089729876 moveto +84.5679012345678 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +84.5679012345678 21.2450089729876 moveto +85.1851851851851 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.1851851851851 22.3141761381536 moveto +85.8024691358024 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +85.8024691358024 21.2450089729876 moveto +87.037037037037 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 21.2450089729876 moveto +87.6543209876542 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.6543209876542 22.3141761381536 moveto +87.037037037037 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +87.037037037037 23.3833433033196 moveto +88.2716049382715 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.2716049382715 23.3833433033196 moveto +88.8888888888888 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +88.8888888888888 24.4525104684856 moveto +89.5061728395061 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +89.5061728395061 23.3833433033196 moveto +90.7407407407407 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +90.7407407407407 23.3833433033196 moveto +90.1234567901234 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +90.1234567901234 22.3141761381536 moveto +90.7407407407407 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +90.7407407407407 21.2450089729876 moveto +91.9753086419752 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +91.9753086419752 21.2450089729876 moveto +92.5925925925925 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +92.5925925925925 22.3141761381536 moveto +93.2098765432098 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +93.2098765432098 21.2450089729876 moveto +94.4444444444444 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.4444444444444 21.2450089729876 moveto +95.0617283950616 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.0617283950616 22.3141761381536 moveto +94.4444444444444 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.4444444444444 23.3833433033196 moveto +95.6790123456789 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.6790123456789 23.3833433033196 moveto +96.2962962962962 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.2962962962962 24.4525104684856 moveto +95.6790123456789 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.6790123456789 25.5216776336515 moveto +94.4444444444444 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.4444444444444 25.5216776336515 moveto +95.0617283950616 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.0617283950616 26.5908447988175 moveto +94.4444444444444 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +94.4444444444444 27.6600119639835 moveto +95.6790123456789 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +95.6790123456789 27.6600119639835 moveto +96.2962962962962 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.2962962962962 28.7291791291495 moveto +96.9135802469135 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +96.9135802469135 27.6600119639835 moveto +98.1481481481481 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.1481481481481 27.6600119639835 moveto +98.7654320987653 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.7654320987653 28.7291791291495 moveto +98.1481481481481 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +98.1481481481481 29.7983462943155 moveto +99.3827160493826 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.3827160493826 29.7983462943155 moveto +99.9999999999999 30.8675134594814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +99.9999999999999 30.8675134594814 moveto +100.617283950617 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +100.617283950617 29.7983462943155 moveto +101.851851851852 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +101.851851851852 29.7983462943155 moveto +101.234567901234 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +101.234567901234 28.7291791291495 moveto +101.851851851852 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +101.851851851852 27.6600119639835 moveto +103.086419753086 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +103.086419753086 27.6600119639835 moveto +103.703703703704 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +103.703703703704 28.7291791291495 moveto +104.320987654321 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.320987654321 27.6600119639835 moveto +105.555555555555 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.555555555555 27.6600119639835 moveto +104.938271604938 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.938271604938 26.5908447988175 moveto +105.555555555555 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.555555555555 25.5216776336515 moveto +104.320987654321 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.320987654321 25.5216776336515 moveto +103.703703703704 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +103.703703703704 24.4525104684856 moveto +104.320987654321 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.320987654321 23.3833433033196 moveto +105.555555555555 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.555555555555 23.3833433033196 moveto +104.938271604938 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +104.938271604938 22.3141761381536 moveto +105.555555555555 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +105.555555555555 21.2450089729876 moveto +106.79012345679 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +106.79012345679 21.2450089729876 moveto +107.407407407407 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +107.407407407407 22.3141761381536 moveto +108.024691358025 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +108.024691358025 21.2450089729876 moveto +109.259259259259 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +109.259259259259 21.2450089729876 moveto +109.876543209876 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +109.876543209876 22.3141761381536 moveto +109.259259259259 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +109.259259259259 23.3833433033196 moveto +110.493827160494 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +110.493827160494 23.3833433033196 moveto +111.111111111111 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.111111111111 24.4525104684856 moveto +111.728395061728 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.728395061728 23.3833433033196 moveto +112.962962962963 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 23.3833433033196 moveto +112.345679012346 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.345679012346 22.3141761381536 moveto +112.962962962963 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 21.2450089729876 moveto +114.197530864197 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.197530864197 21.2450089729876 moveto +114.814814814815 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.814814814815 22.3141761381536 moveto +115.432098765432 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 21.2450089729876 moveto +116.666666666667 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 21.2450089729876 moveto +116.049382716049 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.049382716049 20.1758418078216 moveto +116.666666666667 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 19.1066746426557 moveto +115.432098765432 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 19.1066746426557 moveto +114.814814814815 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.814814814815 18.0375074774897 moveto +115.432098765432 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 16.9683403123237 moveto +116.666666666667 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 16.9683403123237 moveto +116.049382716049 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.049382716049 15.8991731471577 moveto +116.666666666667 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 14.8300059819917 moveto +115.432098765432 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 14.8300059819917 moveto +114.814814814815 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.814814814815 13.7608388168258 moveto +114.197530864197 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.197530864197 14.8300059819917 moveto +112.962962962963 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 14.8300059819917 moveto +112.345679012346 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.345679012346 13.7608388168258 moveto +112.962962962963 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 12.6916716516598 moveto +111.728395061728 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.728395061728 12.6916716516598 moveto +111.111111111111 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.111111111111 11.6225044864938 moveto +111.728395061728 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +111.728395061728 10.5533373213278 moveto +112.962962962963 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 10.5533373213278 moveto +112.345679012346 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.345679012346 9.48417015616185 moveto +112.962962962963 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +112.962962962963 8.41500299099587 moveto +114.197530864197 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.197530864197 8.41500299099587 moveto +114.814814814815 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.814814814815 9.48417015616185 moveto +115.432098765432 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 8.41500299099587 moveto +116.666666666667 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 8.41500299099587 moveto +116.049382716049 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.049382716049 7.34583582582989 moveto +116.666666666667 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 6.27666866066392 moveto +115.432098765432 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 6.27666866066392 moveto +114.814814814815 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +114.814814814815 5.20750149549794 moveto +115.432098765432 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +115.432098765432 4.13833433033196 moveto +116.666666666667 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 4.13833433033196 moveto +116.049382716049 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.049382716049 3.06916716516599 moveto +116.666666666667 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +116.666666666667 2 moveto +117.901234567901 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +117.901234567901 2 moveto +118.518518518518 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +118.518518518518 3.06916716516599 moveto +119.135802469136 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +119.135802469136 2 moveto +120.37037037037 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.37037037037 2 moveto +120.987654320988 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.987654320988 3.06916716516599 moveto +120.37037037037 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +120.37037037037 4.13833433033196 moveto +121.604938271605 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +121.604938271605 4.13833433033196 moveto +122.222222222222 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +122.222222222222 5.20750149549794 moveto +122.839506172839 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +122.839506172839 4.13833433033196 moveto +124.074074074074 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +124.074074074074 4.13833433033196 moveto +123.456790123457 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +123.456790123457 3.06916716516599 moveto +124.074074074074 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +124.074074074074 2 moveto +125.308641975308 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.308641975308 2 moveto +125.925925925926 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.925925925926 3.06916716516599 moveto +126.543209876543 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +126.543209876543 2 moveto +127.777777777778 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +127.777777777778 2 moveto +128.395061728395 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +128.395061728395 3.06916716516599 moveto +127.777777777778 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +127.777777777778 4.13833433033196 moveto +129.012345679012 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +129.012345679012 4.13833433033196 moveto +129.629629629629 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +129.629629629629 5.20750149549794 moveto +129.012345679012 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +129.012345679012 6.27666866066392 moveto +127.777777777778 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +127.777777777778 6.27666866066392 moveto +128.395061728395 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +128.395061728395 7.34583582582989 moveto +127.777777777778 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +127.777777777778 8.41500299099587 moveto +129.012345679012 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +129.012345679012 8.41500299099587 moveto +129.629629629629 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +129.629629629629 9.48417015616185 moveto +130.246913580247 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +130.246913580247 8.41500299099587 moveto +131.481481481481 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +131.481481481481 8.41500299099587 moveto +132.098765432099 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +132.098765432099 9.48417015616185 moveto +131.481481481481 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +131.481481481481 10.5533373213278 moveto +132.716049382716 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +132.716049382716 10.5533373213278 moveto +133.333333333333 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +133.333333333333 11.6225044864938 moveto +133.95061728395 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +133.95061728395 10.5533373213278 moveto +135.185185185185 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +135.185185185185 10.5533373213278 moveto +134.567901234568 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +134.567901234568 9.48417015616185 moveto +135.185185185185 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +135.185185185185 8.41500299099587 moveto +136.41975308642 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +136.41975308642 8.41500299099587 moveto +137.037037037037 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +137.037037037037 9.48417015616185 moveto +137.654320987654 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +137.654320987654 8.41500299099587 moveto +138.888888888889 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.888888888889 8.41500299099587 moveto +138.271604938271 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.271604938271 7.34583582582989 moveto +138.888888888889 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.888888888889 6.27666866066392 moveto +137.654320987654 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +137.654320987654 6.27666866066392 moveto +137.037037037037 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +137.037037037037 5.20750149549794 moveto +137.654320987654 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +137.654320987654 4.13833433033196 moveto +138.888888888889 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.888888888889 4.13833433033196 moveto +138.271604938271 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.271604938271 3.06916716516599 moveto +138.888888888889 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +138.888888888889 2 moveto +140.123456790123 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +140.123456790123 2 moveto +140.740740740741 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +140.740740740741 3.06916716516599 moveto +141.358024691358 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +141.358024691358 2 moveto +142.592592592592 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +142.592592592592 2 moveto +143.20987654321 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +143.20987654321 3.06916716516599 moveto +142.592592592592 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +142.592592592592 4.13833433033196 moveto +143.827160493827 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +143.827160493827 4.13833433033196 moveto +144.444444444444 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +144.444444444444 5.20750149549794 moveto +145.061728395062 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +145.061728395062 4.13833433033196 moveto +146.296296296296 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +146.296296296296 4.13833433033196 moveto +145.679012345679 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +145.679012345679 3.06916716516599 moveto +146.296296296296 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +146.296296296296 2 moveto +147.530864197531 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +147.530864197531 2 moveto +148.148148148148 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +148.148148148148 3.06916716516599 moveto +148.765432098765 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +148.765432098765 2 moveto +150 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 2 moveto +150.617283950617 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 3.06916716516599 moveto +150 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 4.13833433033196 moveto +151.234567901234 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 4.13833433033196 moveto +151.851851851852 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 5.20750149549794 moveto +151.234567901234 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 6.27666866066392 moveto +150 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 6.27666866066392 moveto +150.617283950617 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 7.34583582582989 moveto +150 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 8.41500299099587 moveto +151.234567901234 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 8.41500299099587 moveto +151.851851851852 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 9.48417015616185 moveto +152.469135802469 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 8.41500299099587 moveto +153.703703703704 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 8.41500299099587 moveto +154.320987654321 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 9.48417015616185 moveto +153.703703703704 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 10.5533373213278 moveto +154.938271604938 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 10.5533373213278 moveto +155.555555555555 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.555555555555 11.6225044864938 moveto +154.938271604938 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 12.6916716516598 moveto +153.703703703704 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 12.6916716516598 moveto +154.320987654321 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 13.7608388168258 moveto +153.703703703704 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 14.8300059819917 moveto +152.469135802469 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 14.8300059819917 moveto +151.851851851852 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 13.7608388168258 moveto +151.234567901234 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 14.8300059819917 moveto +150 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 14.8300059819917 moveto +150.617283950617 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 15.8991731471577 moveto +150 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 16.9683403123237 moveto +151.234567901234 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 16.9683403123237 moveto +151.851851851852 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 18.0375074774897 moveto +151.234567901234 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 19.1066746426557 moveto +150 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 19.1066746426557 moveto +150.617283950617 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 20.1758418078216 moveto +150 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 21.2450089729876 moveto +151.234567901234 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 21.2450089729876 moveto +151.851851851852 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 22.3141761381536 moveto +152.469135802469 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 21.2450089729876 moveto +153.703703703704 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 21.2450089729876 moveto +154.320987654321 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 22.3141761381536 moveto +153.703703703704 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 23.3833433033196 moveto +154.938271604938 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 23.3833433033196 moveto +155.555555555555 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.555555555555 24.4525104684856 moveto +156.172839506173 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.172839506173 23.3833433033196 moveto +157.407407407407 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 23.3833433033196 moveto +156.79012345679 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.79012345679 22.3141761381536 moveto +157.407407407407 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 21.2450089729876 moveto +158.641975308642 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +158.641975308642 21.2450089729876 moveto +159.259259259259 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.259259259259 22.3141761381536 moveto +159.876543209876 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.876543209876 21.2450089729876 moveto +161.111111111111 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 21.2450089729876 moveto +161.728395061728 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 22.3141761381536 moveto +161.111111111111 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 23.3833433033196 moveto +162.345679012346 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 23.3833433033196 moveto +162.962962962963 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 24.4525104684856 moveto +162.345679012346 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 25.5216776336515 moveto +161.111111111111 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 25.5216776336515 moveto +161.728395061728 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 26.5908447988175 moveto +161.111111111111 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 27.6600119639835 moveto +162.345679012346 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 27.6600119639835 moveto +162.962962962963 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 28.7291791291495 moveto +163.58024691358 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.58024691358 27.6600119639835 moveto +164.814814814815 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 27.6600119639835 moveto +165.432098765432 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +165.432098765432 28.7291791291495 moveto +164.814814814815 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 29.7983462943155 moveto +166.049382716049 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.049382716049 29.7983462943155 moveto +166.666666666667 30.8675134594814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.666666666667 30.8675134594814 moveto +166.049382716049 31.9366806246474 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.049382716049 31.9366806246474 moveto +164.814814814815 31.9366806246474 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 31.9366806246474 moveto +165.432098765432 33.0058477898134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +165.432098765432 33.0058477898134 moveto +164.814814814815 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 34.0750149549794 moveto +163.58024691358 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.58024691358 34.0750149549794 moveto +162.962962962963 33.0058477898134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 33.0058477898134 moveto +162.345679012346 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 34.0750149549794 moveto +161.111111111111 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 34.0750149549794 moveto +161.728395061728 35.1441821201453 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 35.1441821201453 moveto +161.111111111111 36.2133492853113 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 36.2133492853113 moveto +162.345679012346 36.2133492853113 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 36.2133492853113 moveto +162.962962962963 37.2825164504773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 37.2825164504773 moveto +162.345679012346 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 38.3516836156433 moveto +161.111111111111 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 38.3516836156433 moveto +161.728395061728 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 39.4208507808093 moveto +161.111111111111 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 40.4900179459752 moveto +159.876543209876 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.876543209876 40.4900179459752 moveto +159.259259259259 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.259259259259 39.4208507808093 moveto +158.641975308642 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +158.641975308642 40.4900179459752 moveto +157.407407407407 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 40.4900179459752 moveto +156.79012345679 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.79012345679 39.4208507808093 moveto +157.407407407407 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 38.3516836156433 moveto +156.172839506173 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.172839506173 38.3516836156433 moveto +155.555555555555 37.2825164504773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.555555555555 37.2825164504773 moveto +154.938271604938 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 38.3516836156433 moveto +153.703703703704 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 38.3516836156433 moveto +154.320987654321 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 39.4208507808093 moveto +153.703703703704 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 40.4900179459752 moveto +152.469135802469 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 40.4900179459752 moveto +151.851851851852 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 39.4208507808093 moveto +151.234567901234 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 40.4900179459752 moveto +150 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 40.4900179459752 moveto +150.617283950617 41.5591851111412 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 41.5591851111412 moveto +150 42.6283522763072 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 42.6283522763072 moveto +151.234567901234 42.6283522763072 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 42.6283522763072 moveto +151.851851851852 43.6975194414731 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 43.6975194414731 moveto +151.234567901234 44.7666866066391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 44.7666866066391 moveto +150 44.7666866066391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 44.7666866066391 moveto +150.617283950617 45.8358537718051 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 45.8358537718051 moveto +150 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 46.905020936971 moveto +151.234567901234 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 46.905020936971 moveto +151.851851851852 47.974188102137 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 47.974188102137 moveto +152.469135802469 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 46.905020936971 moveto +153.703703703704 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 46.905020936971 moveto +154.320987654321 47.974188102137 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 47.974188102137 moveto +153.703703703704 49.043355267303 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 49.043355267303 moveto +154.938271604938 49.043355267303 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 49.043355267303 moveto +155.555555555555 50.1125224324689 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.555555555555 50.1125224324689 moveto +154.938271604938 51.1816895976349 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 51.1816895976349 moveto +153.703703703704 51.1816895976349 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 51.1816895976349 moveto +154.320987654321 52.2508567628009 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 52.2508567628009 moveto +153.703703703704 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 53.3200239279668 moveto +152.469135802469 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 53.3200239279668 moveto +151.851851851852 52.2508567628009 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 52.2508567628009 moveto +151.234567901234 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 53.3200239279668 moveto +150 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 53.3200239279668 moveto +150.617283950617 54.3891910931328 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 54.3891910931328 moveto +150 55.4583582582987 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 55.4583582582987 moveto +151.234567901234 55.4583582582987 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 55.4583582582987 moveto +151.851851851852 56.5275254234647 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 56.5275254234647 moveto +151.234567901234 57.5966925886307 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 57.5966925886307 moveto +150 57.5966925886307 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 57.5966925886307 moveto +150.617283950617 58.6658597537966 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150.617283950617 58.6658597537966 moveto +150 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +150 59.7350269189626 moveto +151.234567901234 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.234567901234 59.7350269189626 moveto +151.851851851852 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +151.851851851852 60.8041940841286 moveto +152.469135802469 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +152.469135802469 59.7350269189626 moveto +153.703703703704 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 59.7350269189626 moveto +154.320987654321 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.320987654321 60.8041940841286 moveto +153.703703703704 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +153.703703703704 61.8733612492945 moveto +154.938271604938 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +154.938271604938 61.8733612492945 moveto +155.555555555555 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +155.555555555555 62.9425284144605 moveto +156.172839506173 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.172839506173 61.8733612492945 moveto +157.407407407407 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 61.8733612492945 moveto +156.79012345679 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +156.79012345679 60.8041940841286 moveto +157.407407407407 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +157.407407407407 59.7350269189626 moveto +158.641975308642 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +158.641975308642 59.7350269189626 moveto +159.259259259259 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.259259259259 60.8041940841286 moveto +159.876543209876 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +159.876543209876 59.7350269189626 moveto +161.111111111111 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 59.7350269189626 moveto +161.728395061728 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 60.8041940841286 moveto +161.111111111111 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 61.8733612492945 moveto +162.345679012346 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 61.8733612492945 moveto +162.962962962963 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 62.9425284144605 moveto +162.345679012346 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 64.0116955796265 moveto +161.111111111111 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 64.0116955796265 moveto +161.728395061728 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.728395061728 65.0808627447924 moveto +161.111111111111 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +161.111111111111 66.1500299099584 moveto +162.345679012346 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.345679012346 66.1500299099584 moveto +162.962962962963 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +162.962962962963 67.2191970751244 moveto +163.58024691358 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +163.58024691358 66.1500299099584 moveto +164.814814814815 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 66.1500299099584 moveto +165.432098765432 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +165.432098765432 67.2191970751244 moveto +164.814814814815 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +164.814814814815 68.2883642402903 moveto +166.049382716049 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.049382716049 68.2883642402903 moveto +166.666666666667 69.3575314054563 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +166.666666666667 69.3575314054563 moveto +167.283950617284 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +167.283950617284 68.2883642402903 moveto +168.518518518518 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +168.518518518518 68.2883642402903 moveto +167.901234567901 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +167.901234567901 67.2191970751244 moveto +168.518518518518 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +168.518518518518 66.1500299099584 moveto +169.753086419753 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +169.753086419753 66.1500299099584 moveto +170.37037037037 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.37037037037 67.2191970751244 moveto +170.987654320988 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.987654320988 66.1500299099584 moveto +172.222222222222 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.222222222222 66.1500299099584 moveto +171.604938271605 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +171.604938271605 65.0808627447924 moveto +172.222222222222 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.222222222222 64.0116955796265 moveto +170.987654320988 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.987654320988 64.0116955796265 moveto +170.37037037037 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.37037037037 62.9425284144605 moveto +170.987654320988 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +170.987654320988 61.8733612492945 moveto +172.222222222222 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.222222222222 61.8733612492945 moveto +171.604938271605 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +171.604938271605 60.8041940841286 moveto +172.222222222222 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +172.222222222222 59.7350269189626 moveto +173.456790123457 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +173.456790123457 59.7350269189626 moveto +174.074074074074 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +174.074074074074 60.8041940841286 moveto +174.691358024691 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +174.691358024691 59.7350269189626 moveto +175.925925925926 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +175.925925925926 59.7350269189626 moveto +176.543209876543 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +176.543209876543 60.8041940841286 moveto +175.925925925926 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +175.925925925926 61.8733612492945 moveto +177.16049382716 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +177.16049382716 61.8733612492945 moveto +177.777777777778 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +177.777777777778 62.9425284144605 moveto +178.395061728395 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +178.395061728395 61.8733612492945 moveto +179.62962962963 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.62962962963 61.8733612492945 moveto +179.012345679012 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.012345679012 60.8041940841286 moveto +179.62962962963 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +179.62962962963 59.7350269189626 moveto +180.864197530864 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +180.864197530864 59.7350269189626 moveto +181.481481481481 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +181.481481481481 60.8041940841286 moveto +182.098765432099 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +182.098765432099 59.7350269189626 moveto +183.333333333333 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 59.7350269189626 moveto +183.950617283951 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.950617283951 60.8041940841286 moveto +183.333333333333 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 61.8733612492945 moveto +184.567901234568 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 61.8733612492945 moveto +185.185185185185 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.185185185185 62.9425284144605 moveto +184.567901234568 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 64.0116955796265 moveto +183.333333333333 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 64.0116955796265 moveto +183.950617283951 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.950617283951 65.0808627447924 moveto +183.333333333333 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 66.1500299099584 moveto +184.567901234568 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 66.1500299099584 moveto +185.185185185185 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.185185185185 67.2191970751244 moveto +185.802469135802 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.802469135802 66.1500299099584 moveto +187.037037037037 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 66.1500299099584 moveto +187.654320987654 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.654320987654 67.2191970751244 moveto +187.037037037037 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 68.2883642402903 moveto +188.271604938272 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.271604938272 68.2883642402903 moveto +188.888888888889 69.3575314054563 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.888888888889 69.3575314054563 moveto +188.271604938272 70.4266985706222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.271604938272 70.4266985706222 moveto +187.037037037037 70.4266985706222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 70.4266985706222 moveto +187.654320987654 71.4958657357882 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.654320987654 71.4958657357882 moveto +187.037037037037 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 72.5650329009542 moveto +185.802469135802 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.802469135802 72.5650329009542 moveto +185.185185185185 71.4958657357882 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.185185185185 71.4958657357882 moveto +184.567901234568 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 72.5650329009542 moveto +183.333333333333 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 72.5650329009542 moveto +183.950617283951 73.6342000661201 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.950617283951 73.6342000661201 moveto +183.333333333333 74.7033672312861 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 74.7033672312861 moveto +184.567901234568 74.7033672312861 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 74.7033672312861 moveto +185.185185185185 75.7725343964521 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.185185185185 75.7725343964521 moveto +184.567901234568 76.841701561618 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 76.841701561618 moveto +183.333333333333 76.841701561618 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 76.841701561618 moveto +183.950617283951 77.910868726784 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.950617283951 77.910868726784 moveto +183.333333333333 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +183.333333333333 78.98003589195 moveto +184.567901234568 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +184.567901234568 78.98003589195 moveto +185.185185185185 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.185185185185 80.0492030571159 moveto +185.802469135802 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +185.802469135802 78.98003589195 moveto +187.037037037037 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 78.98003589195 moveto +187.654320987654 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.654320987654 80.0492030571159 moveto +187.037037037037 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +187.037037037037 81.1183702222819 moveto +188.271604938272 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.271604938272 81.1183702222819 moveto +188.888888888889 82.1875373874479 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +188.888888888889 82.1875373874479 moveto +189.506172839506 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +189.506172839506 81.1183702222819 moveto +190.740740740741 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.740740740741 81.1183702222819 moveto +190.123456790123 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.123456790123 80.0492030571159 moveto +190.740740740741 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +190.740740740741 78.98003589195 moveto +191.975308641975 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +191.975308641975 78.98003589195 moveto +192.592592592592 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +192.592592592592 80.0492030571159 moveto +193.20987654321 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +193.20987654321 78.98003589195 moveto +194.444444444444 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.444444444444 78.98003589195 moveto +195.061728395062 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.061728395062 80.0492030571159 moveto +194.444444444444 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.444444444444 81.1183702222819 moveto +195.679012345679 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.679012345679 81.1183702222819 moveto +196.296296296296 82.1875373874479 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.296296296296 82.1875373874479 moveto +195.679012345679 83.2567045526138 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.679012345679 83.2567045526138 moveto +194.444444444444 83.2567045526138 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.444444444444 83.2567045526138 moveto +195.061728395062 84.3258717177798 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.061728395062 84.3258717177798 moveto +194.444444444444 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.444444444444 85.3950388829458 moveto +195.679012345679 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +195.679012345679 85.3950388829458 moveto +196.296296296296 86.4642060481117 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.296296296296 86.4642060481117 moveto +196.913580246913 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +196.913580246913 85.3950388829458 moveto +198.148148148148 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.148148148148 85.3950388829458 moveto +198.765432098765 86.4642060481117 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.765432098765 86.4642060481117 moveto +198.148148148148 87.5333732132777 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +198.148148148148 87.5333732132777 moveto +199.382716049383 87.5333732132777 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +199.382716049383 87.5333732132777 moveto +200 88.6025403784436 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200 88.6025403784436 moveto +200.617283950617 87.5333732132777 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +200.617283950617 87.5333732132777 moveto +201.851851851852 87.5333732132777 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.851851851852 87.5333732132777 moveto +201.234567901234 86.4642060481117 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.234567901234 86.4642060481117 moveto +201.851851851852 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +201.851851851852 85.3950388829458 moveto +203.086419753086 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.086419753086 85.3950388829458 moveto +203.703703703704 86.4642060481117 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.703703703704 86.4642060481117 moveto +204.320987654321 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.320987654321 85.3950388829458 moveto +205.555555555555 85.3950388829458 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.555555555555 85.3950388829458 moveto +204.938271604938 84.3258717177798 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.938271604938 84.3258717177798 moveto +205.555555555555 83.2567045526138 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.555555555555 83.2567045526138 moveto +204.320987654321 83.2567045526138 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.320987654321 83.2567045526138 moveto +203.703703703704 82.1875373874479 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +203.703703703704 82.1875373874479 moveto +204.320987654321 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.320987654321 81.1183702222819 moveto +205.555555555555 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.555555555555 81.1183702222819 moveto +204.938271604938 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +204.938271604938 80.0492030571159 moveto +205.555555555555 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +205.555555555555 78.98003589195 moveto +206.79012345679 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +206.79012345679 78.98003589195 moveto +207.407407407407 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +207.407407407407 80.0492030571159 moveto +208.024691358025 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +208.024691358025 78.98003589195 moveto +209.259259259259 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.259259259259 78.98003589195 moveto +209.876543209876 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.876543209876 80.0492030571159 moveto +209.259259259259 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.259259259259 81.1183702222819 moveto +210.493827160494 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +210.493827160494 81.1183702222819 moveto +211.111111111111 82.1875373874479 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.111111111111 82.1875373874479 moveto +211.728395061728 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.728395061728 81.1183702222819 moveto +212.962962962963 81.1183702222819 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 81.1183702222819 moveto +212.345679012346 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.345679012346 80.0492030571159 moveto +212.962962962963 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 78.98003589195 moveto +214.197530864197 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.197530864197 78.98003589195 moveto +214.814814814815 80.0492030571159 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.814814814815 80.0492030571159 moveto +215.432098765432 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 78.98003589195 moveto +216.666666666667 78.98003589195 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 78.98003589195 moveto +216.049382716049 77.910868726784 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.049382716049 77.910868726784 moveto +216.666666666667 76.841701561618 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 76.841701561618 moveto +215.432098765432 76.841701561618 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 76.841701561618 moveto +214.814814814815 75.7725343964521 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.814814814815 75.7725343964521 moveto +215.432098765432 74.7033672312861 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 74.7033672312861 moveto +216.666666666667 74.7033672312861 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 74.7033672312861 moveto +216.049382716049 73.6342000661201 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.049382716049 73.6342000661201 moveto +216.666666666667 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 72.5650329009542 moveto +215.432098765432 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 72.5650329009542 moveto +214.814814814815 71.4958657357882 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.814814814815 71.4958657357882 moveto +214.197530864197 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.197530864197 72.5650329009542 moveto +212.962962962963 72.5650329009542 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 72.5650329009542 moveto +212.345679012346 71.4958657357882 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.345679012346 71.4958657357882 moveto +212.962962962963 70.4266985706222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 70.4266985706222 moveto +211.728395061728 70.4266985706222 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.728395061728 70.4266985706222 moveto +211.111111111111 69.3575314054563 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.111111111111 69.3575314054563 moveto +211.728395061728 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +211.728395061728 68.2883642402903 moveto +212.962962962963 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 68.2883642402903 moveto +212.345679012346 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.345679012346 67.2191970751244 moveto +212.962962962963 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +212.962962962963 66.1500299099584 moveto +214.197530864197 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.197530864197 66.1500299099584 moveto +214.814814814815 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.814814814815 67.2191970751244 moveto +215.432098765432 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 66.1500299099584 moveto +216.666666666667 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 66.1500299099584 moveto +216.049382716049 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.049382716049 65.0808627447924 moveto +216.666666666667 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 64.0116955796265 moveto +215.432098765432 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 64.0116955796265 moveto +214.814814814815 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +214.814814814815 62.9425284144605 moveto +215.432098765432 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +215.432098765432 61.8733612492945 moveto +216.666666666667 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 61.8733612492945 moveto +216.049382716049 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.049382716049 60.8041940841286 moveto +216.666666666667 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +216.666666666667 59.7350269189626 moveto +217.901234567901 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +217.901234567901 59.7350269189626 moveto +218.518518518518 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +218.518518518518 60.8041940841286 moveto +219.135802469136 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +219.135802469136 59.7350269189626 moveto +220.37037037037 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.37037037037 59.7350269189626 moveto +220.987654320988 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.987654320988 60.8041940841286 moveto +220.37037037037 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +220.37037037037 61.8733612492945 moveto +221.604938271605 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +221.604938271605 61.8733612492945 moveto +222.222222222222 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +222.222222222222 62.9425284144605 moveto +222.839506172839 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +222.839506172839 61.8733612492945 moveto +224.074074074074 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +224.074074074074 61.8733612492945 moveto +223.456790123457 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +223.456790123457 60.8041940841286 moveto +224.074074074074 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +224.074074074074 59.7350269189626 moveto +225.308641975309 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.308641975309 59.7350269189626 moveto +225.925925925926 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.925925925926 60.8041940841286 moveto +226.543209876543 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +226.543209876543 59.7350269189626 moveto +227.777777777778 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.777777777778 59.7350269189626 moveto +228.395061728395 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +228.395061728395 60.8041940841286 moveto +227.777777777778 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.777777777778 61.8733612492945 moveto +229.012345679012 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.012345679012 61.8733612492945 moveto +229.62962962963 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.62962962963 62.9425284144605 moveto +229.012345679012 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.012345679012 64.0116955796265 moveto +227.777777777778 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.777777777778 64.0116955796265 moveto +228.395061728395 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +228.395061728395 65.0808627447924 moveto +227.777777777778 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +227.777777777778 66.1500299099584 moveto +229.012345679012 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.012345679012 66.1500299099584 moveto +229.62962962963 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +229.62962962963 67.2191970751244 moveto +230.246913580247 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +230.246913580247 66.1500299099584 moveto +231.481481481481 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +231.481481481481 66.1500299099584 moveto +232.098765432099 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +232.098765432099 67.2191970751244 moveto +231.481481481481 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +231.481481481481 68.2883642402903 moveto +232.716049382716 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +232.716049382716 68.2883642402903 moveto +233.333333333333 69.3575314054563 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.333333333333 69.3575314054563 moveto +233.950617283951 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.950617283951 68.2883642402903 moveto +235.185185185185 68.2883642402903 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 68.2883642402903 moveto +234.567901234568 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +234.567901234568 67.2191970751244 moveto +235.185185185185 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 66.1500299099584 moveto +236.41975308642 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.41975308642 66.1500299099584 moveto +237.037037037037 67.2191970751244 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 67.2191970751244 moveto +237.654320987654 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 66.1500299099584 moveto +238.888888888889 66.1500299099584 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 66.1500299099584 moveto +238.271604938272 65.0808627447924 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 65.0808627447924 moveto +238.888888888889 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 64.0116955796265 moveto +237.654320987654 64.0116955796265 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 64.0116955796265 moveto +237.037037037037 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 62.9425284144605 moveto +237.654320987654 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 61.8733612492945 moveto +238.888888888889 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 61.8733612492945 moveto +238.271604938272 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 60.8041940841286 moveto +238.888888888889 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 59.7350269189626 moveto +240.123456790123 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.123456790123 59.7350269189626 moveto +240.740740740741 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.740740740741 60.8041940841286 moveto +241.358024691358 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +241.358024691358 59.7350269189626 moveto +242.592592592593 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 59.7350269189626 moveto +243.20987654321 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.20987654321 60.8041940841286 moveto +242.592592592593 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 61.8733612492945 moveto +243.827160493827 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.827160493827 61.8733612492945 moveto +244.444444444444 62.9425284144605 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.444444444444 62.9425284144605 moveto +245.061728395062 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 61.8733612492945 moveto +246.296296296296 61.8733612492945 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 61.8733612492945 moveto +245.679012345679 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 60.8041940841286 moveto +246.296296296296 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 59.7350269189626 moveto +247.530864197531 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 59.7350269189626 moveto +248.148148148148 60.8041940841286 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 60.8041940841286 moveto +248.765432098765 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 59.7350269189626 moveto +250 59.7350269189626 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 59.7350269189626 moveto +249.382716049383 58.6658597537966 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 58.6658597537966 moveto +250 57.5966925886307 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 57.5966925886307 moveto +248.765432098765 57.5966925886307 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 57.5966925886307 moveto +248.148148148148 56.5275254234647 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 56.5275254234647 moveto +248.765432098765 55.4583582582987 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 55.4583582582987 moveto +250 55.4583582582987 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 55.4583582582987 moveto +249.382716049383 54.3891910931328 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 54.3891910931328 moveto +250 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 53.3200239279668 moveto +248.765432098765 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 53.3200239279668 moveto +248.148148148148 52.2508567628009 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 52.2508567628009 moveto +247.530864197531 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 53.3200239279668 moveto +246.296296296296 53.3200239279668 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 53.3200239279668 moveto +245.679012345679 52.2508567628009 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 52.2508567628009 moveto +246.296296296296 51.1816895976349 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 51.1816895976349 moveto +245.061728395062 51.1816895976349 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 51.1816895976349 moveto +244.444444444444 50.1125224324689 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.444444444444 50.1125224324689 moveto +245.061728395062 49.043355267303 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 49.043355267303 moveto +246.296296296296 49.043355267303 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 49.043355267303 moveto +245.679012345679 47.974188102137 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 47.974188102137 moveto +246.296296296296 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 46.905020936971 moveto +247.530864197531 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 46.905020936971 moveto +248.148148148148 47.974188102137 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 47.974188102137 moveto +248.765432098765 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 46.905020936971 moveto +250 46.905020936971 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 46.905020936971 moveto +249.382716049383 45.8358537718051 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 45.8358537718051 moveto +250 44.7666866066391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 44.7666866066391 moveto +248.765432098765 44.7666866066391 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 44.7666866066391 moveto +248.148148148148 43.6975194414731 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 43.6975194414731 moveto +248.765432098765 42.6283522763072 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 42.6283522763072 moveto +250 42.6283522763072 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 42.6283522763072 moveto +249.382716049383 41.5591851111412 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 41.5591851111412 moveto +250 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 40.4900179459752 moveto +248.765432098765 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 40.4900179459752 moveto +248.148148148148 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 39.4208507808093 moveto +247.530864197531 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 40.4900179459752 moveto +246.296296296296 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 40.4900179459752 moveto +245.679012345679 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 39.4208507808093 moveto +246.296296296296 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 38.3516836156433 moveto +245.061728395062 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 38.3516836156433 moveto +244.444444444444 37.2825164504773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.444444444444 37.2825164504773 moveto +243.827160493827 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.827160493827 38.3516836156433 moveto +242.592592592593 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 38.3516836156433 moveto +243.20987654321 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.20987654321 39.4208507808093 moveto +242.592592592593 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 40.4900179459752 moveto +241.358024691358 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +241.358024691358 40.4900179459752 moveto +240.740740740741 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.740740740741 39.4208507808093 moveto +240.123456790123 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.123456790123 40.4900179459752 moveto +238.888888888889 40.4900179459752 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 40.4900179459752 moveto +238.271604938272 39.4208507808093 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 39.4208507808093 moveto +238.888888888889 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 38.3516836156433 moveto +237.654320987654 38.3516836156433 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 38.3516836156433 moveto +237.037037037037 37.2825164504773 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 37.2825164504773 moveto +237.654320987654 36.2133492853113 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 36.2133492853113 moveto +238.888888888889 36.2133492853113 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 36.2133492853113 moveto +238.271604938272 35.1441821201453 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 35.1441821201453 moveto +238.888888888889 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 34.0750149549794 moveto +237.654320987654 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 34.0750149549794 moveto +237.037037037037 33.0058477898134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 33.0058477898134 moveto +236.41975308642 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.41975308642 34.0750149549794 moveto +235.185185185185 34.0750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 34.0750149549794 moveto +234.567901234568 33.0058477898134 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +234.567901234568 33.0058477898134 moveto +235.185185185185 31.9366806246474 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 31.9366806246474 moveto +233.950617283951 31.9366806246474 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.950617283951 31.9366806246474 moveto +233.333333333333 30.8675134594814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.333333333333 30.8675134594814 moveto +233.950617283951 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +233.950617283951 29.7983462943155 moveto +235.185185185185 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 29.7983462943155 moveto +234.567901234568 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +234.567901234568 28.7291791291495 moveto +235.185185185185 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +235.185185185185 27.6600119639835 moveto +236.41975308642 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +236.41975308642 27.6600119639835 moveto +237.037037037037 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 28.7291791291495 moveto +237.654320987654 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 27.6600119639835 moveto +238.888888888889 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 27.6600119639835 moveto +238.271604938272 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 26.5908447988175 moveto +238.888888888889 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 25.5216776336515 moveto +237.654320987654 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 25.5216776336515 moveto +237.037037037037 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.037037037037 24.4525104684856 moveto +237.654320987654 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +237.654320987654 23.3833433033196 moveto +238.888888888889 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 23.3833433033196 moveto +238.271604938272 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.271604938272 22.3141761381536 moveto +238.888888888889 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +238.888888888889 21.2450089729876 moveto +240.123456790123 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.123456790123 21.2450089729876 moveto +240.740740740741 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +240.740740740741 22.3141761381536 moveto +241.358024691358 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +241.358024691358 21.2450089729876 moveto +242.592592592593 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 21.2450089729876 moveto +243.20987654321 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.20987654321 22.3141761381536 moveto +242.592592592593 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +242.592592592593 23.3833433033196 moveto +243.827160493827 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +243.827160493827 23.3833433033196 moveto +244.444444444444 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.444444444444 24.4525104684856 moveto +245.061728395062 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 23.3833433033196 moveto +246.296296296296 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 23.3833433033196 moveto +245.679012345679 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 22.3141761381536 moveto +246.296296296296 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 21.2450089729876 moveto +247.530864197531 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 21.2450089729876 moveto +248.148148148148 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 22.3141761381536 moveto +248.765432098765 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 21.2450089729876 moveto +250 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 21.2450089729876 moveto +249.382716049383 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 20.1758418078216 moveto +250 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 19.1066746426557 moveto +248.765432098765 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 19.1066746426557 moveto +248.148148148148 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 18.0375074774897 moveto +248.765432098765 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 16.9683403123237 moveto +250 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 16.9683403123237 moveto +249.382716049383 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 15.8991731471577 moveto +250 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 14.8300059819917 moveto +248.765432098765 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 14.8300059819917 moveto +248.148148148148 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 13.7608388168258 moveto +247.530864197531 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 14.8300059819917 moveto +246.296296296296 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 14.8300059819917 moveto +245.679012345679 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 13.7608388168258 moveto +246.296296296296 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 12.6916716516598 moveto +245.061728395062 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 12.6916716516598 moveto +244.444444444444 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +244.444444444444 11.6225044864938 moveto +245.061728395062 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.061728395062 10.5533373213278 moveto +246.296296296296 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 10.5533373213278 moveto +245.679012345679 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +245.679012345679 9.48417015616185 moveto +246.296296296296 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +246.296296296296 8.41500299099587 moveto +247.530864197531 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +247.530864197531 8.41500299099587 moveto +248.148148148148 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 9.48417015616185 moveto +248.765432098765 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 8.41500299099587 moveto +250 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 8.41500299099587 moveto +249.382716049383 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 7.34583582582989 moveto +250 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 6.27666866066392 moveto +248.765432098765 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 6.27666866066392 moveto +248.148148148148 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.148148148148 5.20750149549794 moveto +248.765432098765 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +248.765432098765 4.13833433033196 moveto +250 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 4.13833433033196 moveto +249.382716049383 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.382716049383 3.06916716516599 moveto +250 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 2 moveto +251.234567901235 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +251.234567901235 2 moveto +251.851851851852 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +251.851851851852 3.06916716516599 moveto +252.469135802469 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +252.469135802469 2 moveto +253.703703703704 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +253.703703703704 2 moveto +254.320987654321 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +254.320987654321 3.06916716516599 moveto +253.703703703704 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +253.703703703704 4.13833433033196 moveto +254.938271604938 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +254.938271604938 4.13833433033196 moveto +255.555555555556 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +255.555555555556 5.20750149549794 moveto +256.172839506173 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.172839506173 4.13833433033196 moveto +257.407407407407 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +257.407407407407 4.13833433033196 moveto +256.79012345679 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +256.79012345679 3.06916716516599 moveto +257.407407407407 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +257.407407407407 2 moveto +258.641975308642 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +258.641975308642 2 moveto +259.259259259259 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +259.259259259259 3.06916716516599 moveto +259.876543209877 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +259.876543209877 2 moveto +261.111111111111 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.111111111111 2 moveto +261.728395061728 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.728395061728 3.06916716516599 moveto +261.111111111111 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.111111111111 4.13833433033196 moveto +262.345679012346 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +262.345679012346 4.13833433033196 moveto +262.962962962963 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +262.962962962963 5.20750149549794 moveto +262.345679012346 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +262.345679012346 6.27666866066392 moveto +261.111111111111 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.111111111111 6.27666866066392 moveto +261.728395061728 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.728395061728 7.34583582582989 moveto +261.111111111111 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +261.111111111111 8.41500299099587 moveto +262.345679012346 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +262.345679012346 8.41500299099587 moveto +262.962962962963 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +262.962962962963 9.48417015616185 moveto +263.58024691358 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +263.58024691358 8.41500299099587 moveto +264.814814814815 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.814814814815 8.41500299099587 moveto +265.432098765432 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +265.432098765432 9.48417015616185 moveto +264.814814814815 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +264.814814814815 10.5533373213278 moveto +266.049382716049 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +266.049382716049 10.5533373213278 moveto +266.666666666667 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +266.666666666667 11.6225044864938 moveto +267.283950617284 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +267.283950617284 10.5533373213278 moveto +268.518518518519 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.518518518519 10.5533373213278 moveto +267.901234567901 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +267.901234567901 9.48417015616185 moveto +268.518518518519 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +268.518518518519 8.41500299099587 moveto +269.753086419753 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +269.753086419753 8.41500299099587 moveto +270.37037037037 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.37037037037 9.48417015616185 moveto +270.987654320988 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.987654320988 8.41500299099587 moveto +272.222222222222 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.222222222222 8.41500299099587 moveto +271.604938271605 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.604938271605 7.34583582582989 moveto +272.222222222222 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.222222222222 6.27666866066392 moveto +270.987654320988 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.987654320988 6.27666866066392 moveto +270.37037037037 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.37037037037 5.20750149549794 moveto +270.987654320988 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +270.987654320988 4.13833433033196 moveto +272.222222222222 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.222222222222 4.13833433033196 moveto +271.604938271605 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +271.604938271605 3.06916716516599 moveto +272.222222222222 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +272.222222222222 2 moveto +273.456790123457 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +273.456790123457 2 moveto +274.074074074074 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +274.074074074074 3.06916716516599 moveto +274.691358024691 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +274.691358024691 2 moveto +275.925925925926 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.925925925926 2 moveto +276.543209876543 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +276.543209876543 3.06916716516599 moveto +275.925925925926 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +275.925925925926 4.13833433033196 moveto +277.160493827161 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +277.160493827161 4.13833433033196 moveto +277.777777777778 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +277.777777777778 5.20750149549794 moveto +278.395061728395 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +278.395061728395 4.13833433033196 moveto +279.62962962963 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.62962962963 4.13833433033196 moveto +279.012345679012 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.012345679012 3.06916716516599 moveto +279.62962962963 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +279.62962962963 2 moveto +280.864197530864 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +280.864197530864 2 moveto +281.481481481481 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +281.481481481481 3.06916716516599 moveto +282.098765432099 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +282.098765432099 2 moveto +283.333333333333 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 2 moveto +283.950617283951 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.950617283951 3.06916716516599 moveto +283.333333333333 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 4.13833433033196 moveto +284.567901234568 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 4.13833433033196 moveto +285.185185185185 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.185185185185 5.20750149549794 moveto +284.567901234568 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 6.27666866066392 moveto +283.333333333333 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 6.27666866066392 moveto +283.950617283951 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.950617283951 7.34583582582989 moveto +283.333333333333 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 8.41500299099587 moveto +284.567901234568 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 8.41500299099587 moveto +285.185185185185 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.185185185185 9.48417015616185 moveto +285.802469135802 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.802469135802 8.41500299099587 moveto +287.037037037037 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 8.41500299099587 moveto +287.654320987654 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.654320987654 9.48417015616185 moveto +287.037037037037 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 10.5533373213278 moveto +288.271604938272 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.271604938272 10.5533373213278 moveto +288.888888888889 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.888888888889 11.6225044864938 moveto +288.271604938272 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.271604938272 12.6916716516598 moveto +287.037037037037 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 12.6916716516598 moveto +287.654320987654 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.654320987654 13.7608388168258 moveto +287.037037037037 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 14.8300059819917 moveto +285.802469135802 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.802469135802 14.8300059819917 moveto +285.185185185185 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.185185185185 13.7608388168258 moveto +284.567901234568 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 14.8300059819917 moveto +283.333333333333 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 14.8300059819917 moveto +283.950617283951 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.950617283951 15.8991731471577 moveto +283.333333333333 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 16.9683403123237 moveto +284.567901234568 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 16.9683403123237 moveto +285.185185185185 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.185185185185 18.0375074774897 moveto +284.567901234568 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 19.1066746426557 moveto +283.333333333333 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 19.1066746426557 moveto +283.950617283951 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.950617283951 20.1758418078216 moveto +283.333333333333 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +283.333333333333 21.2450089729876 moveto +284.567901234568 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +284.567901234568 21.2450089729876 moveto +285.185185185185 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.185185185185 22.3141761381536 moveto +285.802469135802 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +285.802469135802 21.2450089729876 moveto +287.037037037037 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 21.2450089729876 moveto +287.654320987654 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.654320987654 22.3141761381536 moveto +287.037037037037 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +287.037037037037 23.3833433033196 moveto +288.271604938272 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.271604938272 23.3833433033196 moveto +288.888888888889 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +288.888888888889 24.4525104684856 moveto +289.506172839506 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +289.506172839506 23.3833433033196 moveto +290.740740740741 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.740740740741 23.3833433033196 moveto +290.123456790123 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.123456790123 22.3141761381536 moveto +290.740740740741 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +290.740740740741 21.2450089729876 moveto +291.975308641975 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +291.975308641975 21.2450089729876 moveto +292.592592592593 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +292.592592592593 22.3141761381536 moveto +293.20987654321 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +293.20987654321 21.2450089729876 moveto +294.444444444444 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.444444444444 21.2450089729876 moveto +295.061728395062 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.061728395062 22.3141761381536 moveto +294.444444444444 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.444444444444 23.3833433033196 moveto +295.679012345679 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.679012345679 23.3833433033196 moveto +296.296296296296 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.296296296296 24.4525104684856 moveto +295.679012345679 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.679012345679 25.5216776336515 moveto +294.444444444444 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.444444444444 25.5216776336515 moveto +295.061728395062 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.061728395062 26.5908447988175 moveto +294.444444444444 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +294.444444444444 27.6600119639835 moveto +295.679012345679 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +295.679012345679 27.6600119639835 moveto +296.296296296296 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.296296296296 28.7291791291495 moveto +296.913580246914 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +296.913580246914 27.6600119639835 moveto +298.148148148148 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.148148148148 27.6600119639835 moveto +298.765432098765 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.765432098765 28.7291791291495 moveto +298.148148148148 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +298.148148148148 29.7983462943155 moveto +299.382716049383 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +299.382716049383 29.7983462943155 moveto +300 30.8675134594814 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300 30.8675134594814 moveto +300.617283950617 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +300.617283950617 29.7983462943155 moveto +301.851851851852 29.7983462943155 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.851851851852 29.7983462943155 moveto +301.234567901235 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.234567901235 28.7291791291495 moveto +301.851851851852 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +301.851851851852 27.6600119639835 moveto +303.086419753086 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.086419753086 27.6600119639835 moveto +303.703703703704 28.7291791291495 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.703703703704 28.7291791291495 moveto +304.320987654321 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.320987654321 27.6600119639835 moveto +305.555555555555 27.6600119639835 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.555555555555 27.6600119639835 moveto +304.938271604938 26.5908447988175 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.938271604938 26.5908447988175 moveto +305.555555555555 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.555555555555 25.5216776336515 moveto +304.320987654321 25.5216776336515 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.320987654321 25.5216776336515 moveto +303.703703703704 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +303.703703703704 24.4525104684856 moveto +304.320987654321 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.320987654321 23.3833433033196 moveto +305.555555555555 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.555555555555 23.3833433033196 moveto +304.938271604938 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +304.938271604938 22.3141761381536 moveto +305.555555555555 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +305.555555555555 21.2450089729876 moveto +306.79012345679 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +306.79012345679 21.2450089729876 moveto +307.407407407407 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +307.407407407407 22.3141761381536 moveto +308.024691358025 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +308.024691358025 21.2450089729876 moveto +309.259259259259 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.259259259259 21.2450089729876 moveto +309.876543209876 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.876543209876 22.3141761381536 moveto +309.259259259259 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +309.259259259259 23.3833433033196 moveto +310.493827160494 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +310.493827160494 23.3833433033196 moveto +311.111111111111 24.4525104684856 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.111111111111 24.4525104684856 moveto +311.728395061728 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.728395061728 23.3833433033196 moveto +312.962962962963 23.3833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 23.3833433033196 moveto +312.345679012346 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.345679012346 22.3141761381536 moveto +312.962962962963 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 21.2450089729876 moveto +314.197530864197 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.197530864197 21.2450089729876 moveto +314.814814814815 22.3141761381536 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.814814814815 22.3141761381536 moveto +315.432098765432 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 21.2450089729876 moveto +316.666666666667 21.2450089729876 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 21.2450089729876 moveto +316.049382716049 20.1758418078216 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.049382716049 20.1758418078216 moveto +316.666666666667 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 19.1066746426557 moveto +315.432098765432 19.1066746426557 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 19.1066746426557 moveto +314.814814814815 18.0375074774897 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.814814814815 18.0375074774897 moveto +315.432098765432 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 16.9683403123237 moveto +316.666666666667 16.9683403123237 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 16.9683403123237 moveto +316.049382716049 15.8991731471577 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.049382716049 15.8991731471577 moveto +316.666666666667 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 14.8300059819917 moveto +315.432098765432 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 14.8300059819917 moveto +314.814814814815 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.814814814815 13.7608388168258 moveto +314.197530864197 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.197530864197 14.8300059819917 moveto +312.962962962963 14.8300059819917 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 14.8300059819917 moveto +312.345679012346 13.7608388168258 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.345679012346 13.7608388168258 moveto +312.962962962963 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 12.6916716516598 moveto +311.728395061728 12.6916716516598 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.728395061728 12.6916716516598 moveto +311.111111111111 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.111111111111 11.6225044864938 moveto +311.728395061728 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +311.728395061728 10.5533373213278 moveto +312.962962962963 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 10.5533373213278 moveto +312.345679012346 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.345679012346 9.48417015616185 moveto +312.962962962963 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +312.962962962963 8.41500299099587 moveto +314.197530864197 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.197530864197 8.41500299099587 moveto +314.814814814815 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.814814814815 9.48417015616185 moveto +315.432098765432 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 8.41500299099587 moveto +316.666666666667 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 8.41500299099587 moveto +316.049382716049 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.049382716049 7.34583582582989 moveto +316.666666666667 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 6.27666866066392 moveto +315.432098765432 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 6.27666866066392 moveto +314.814814814815 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +314.814814814815 5.20750149549794 moveto +315.432098765432 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +315.432098765432 4.13833433033196 moveto +316.666666666667 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 4.13833433033196 moveto +316.049382716049 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.049382716049 3.06916716516599 moveto +316.666666666667 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +316.666666666667 2 moveto +317.901234567901 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +317.901234567901 2 moveto +318.518518518518 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +318.518518518518 3.06916716516599 moveto +319.135802469136 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +319.135802469136 2 moveto +320.37037037037 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.37037037037 2 moveto +320.987654320988 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.987654320988 3.06916716516599 moveto +320.37037037037 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +320.37037037037 4.13833433033196 moveto +321.604938271605 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +321.604938271605 4.13833433033196 moveto +322.222222222222 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +322.222222222222 5.20750149549794 moveto +322.839506172839 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +322.839506172839 4.13833433033196 moveto +324.074074074074 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.074074074074 4.13833433033196 moveto +323.456790123457 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +323.456790123457 3.06916716516599 moveto +324.074074074074 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +324.074074074074 2 moveto +325.308641975309 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +325.308641975309 2 moveto +325.925925925926 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +325.925925925926 3.06916716516599 moveto +326.543209876543 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +326.543209876543 2 moveto +327.777777777778 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.777777777778 2 moveto +328.395061728395 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.395061728395 3.06916716516599 moveto +327.777777777778 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.777777777778 4.13833433033196 moveto +329.012345679012 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.012345679012 4.13833433033196 moveto +329.62962962963 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.62962962963 5.20750149549794 moveto +329.012345679012 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.012345679012 6.27666866066392 moveto +327.777777777778 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.777777777778 6.27666866066392 moveto +328.395061728395 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +328.395061728395 7.34583582582989 moveto +327.777777777778 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +327.777777777778 8.41500299099587 moveto +329.012345679012 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.012345679012 8.41500299099587 moveto +329.62962962963 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +329.62962962963 9.48417015616185 moveto +330.246913580247 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +330.246913580247 8.41500299099587 moveto +331.481481481481 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.481481481481 8.41500299099587 moveto +332.098765432099 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +332.098765432099 9.48417015616185 moveto +331.481481481481 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +331.481481481481 10.5533373213278 moveto +332.716049382716 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +332.716049382716 10.5533373213278 moveto +333.333333333333 11.6225044864938 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +333.333333333333 11.6225044864938 moveto +333.95061728395 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +333.95061728395 10.5533373213278 moveto +335.185185185185 10.5533373213278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.185185185185 10.5533373213278 moveto +334.567901234568 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +334.567901234568 9.48417015616185 moveto +335.185185185185 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +335.185185185185 8.41500299099587 moveto +336.41975308642 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +336.41975308642 8.41500299099587 moveto +337.037037037037 9.48417015616185 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +337.037037037037 9.48417015616185 moveto +337.654320987654 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +337.654320987654 8.41500299099587 moveto +338.888888888889 8.41500299099587 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.888888888889 8.41500299099587 moveto +338.271604938271 7.34583582582989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.271604938271 7.34583582582989 moveto +338.888888888889 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.888888888889 6.27666866066392 moveto +337.654320987654 6.27666866066392 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +337.654320987654 6.27666866066392 moveto +337.037037037037 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +337.037037037037 5.20750149549794 moveto +337.654320987654 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +337.654320987654 4.13833433033196 moveto +338.888888888889 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.888888888889 4.13833433033196 moveto +338.271604938271 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.271604938271 3.06916716516599 moveto +338.888888888889 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +338.888888888889 2 moveto +340.123456790123 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +340.123456790123 2 moveto +340.740740740741 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +340.740740740741 3.06916716516599 moveto +341.358024691358 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +341.358024691358 2 moveto +342.592592592592 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +342.592592592592 2 moveto +343.20987654321 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.20987654321 3.06916716516599 moveto +342.592592592592 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +342.592592592592 4.13833433033196 moveto +343.827160493827 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +343.827160493827 4.13833433033196 moveto +344.444444444444 5.20750149549794 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +344.444444444444 5.20750149549794 moveto +345.061728395062 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +345.061728395062 4.13833433033196 moveto +346.296296296296 4.13833433033196 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +346.296296296296 4.13833433033196 moveto +345.679012345679 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +345.679012345679 3.06916716516599 moveto +346.296296296296 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +346.296296296296 2 moveto +347.530864197531 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +347.530864197531 2 moveto +348.148148148148 3.06916716516599 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +348.148148148148 3.06916716516599 moveto +348.765432098765 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +348.765432098765 2 moveto +350 2 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +restore showpage + +%%Trailer +end +%%EOF diff --git a/book_kr/figs/koch.pdf b/book_kr/figs/koch.pdf new file mode 100644 index 0000000..4c8ad6d Binary files /dev/null and b/book_kr/figs/koch.pdf differ diff --git a/book_kr/figs/list1.eps b/book_kr/figs/list1.eps new file mode 100644 index 0000000..c3a3e7d --- /dev/null +++ b/book_kr/figs/list1.eps @@ -0,0 +1,166 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: list1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 +%%CreationDate: Thu Jan 3 09:32:30 2008 +%%For: downey@rocky (Allen Downey,,,) +%%BoundingBox: 0 0 218 42 +%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 42 moveto 0 0 lineto 218 0 lineto 218 42 lineto closepath clip newpath +-107.3 99.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 3825 975 m 5400 975 l 5400 1650 l 3825 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 975 m 3375 975 l 3375 1650 l 1800 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +4375 1413 m 4522 1375 l 4507 1317 l 4360 1355 l 4360 1355 l 4484 1354 l 4375 1413 l cp +eoclip +n 4125 1447 m + 4500 1350 l gs col0 s gr gr + +% arrowhead +n 4375 1413 m 4484 1354 l 4360 1355 l col0 s +% Polyline +gs clippath +4360 1259 m 4504 1308 l 4523 1251 l 4380 1202 l 4380 1202 l 4484 1270 l 4360 1259 l cp +eoclip +n 4125 1147 m + 4500 1275 l gs col0 s gr gr + +% arrowhead +n 4360 1259 m 4484 1270 l 4380 1202 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 183.33 scf sf +4050 1200 m +gs 1 -1 sc (a) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4050 1500 m +gs 1 -1 sc (b) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4575 1350 m +gs 1 -1 sc ('banana') col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (a) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (b) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('banana') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc ('banana') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/list1.fig b/book_kr/figs/list1.fig new file mode 100644 index 0000000..57f0e00 --- /dev/null +++ b/book_kr/figs/list1.fig @@ -0,0 +1,32 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4125 1447 4500 1350 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4125 1147 4500 1275 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3825 975 5400 975 5400 1650 3825 1650 3825 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3375 975 3375 1650 1800 1650 1800 975 +4 2 0 50 0 16 11 0.0000 4 105 105 4050 1200 a\001 +4 2 0 50 0 16 11 0.0000 4 135 105 4050 1500 b\001 +4 0 0 50 0 16 11 0.0000 4 135 720 4575 1350 'banana'\001 +4 2 0 50 0 16 11 0.0000 4 105 105 2025 1200 a\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1500 b\001 +4 0 0 50 0 16 11 0.0000 4 135 720 2550 1200 'banana'\001 +4 0 0 50 0 16 11 0.0000 4 135 720 2550 1500 'banana'\001 diff --git a/book_kr/figs/list1.pdf b/book_kr/figs/list1.pdf new file mode 100644 index 0000000..fea00a3 Binary files /dev/null and b/book_kr/figs/list1.pdf differ diff --git a/book_kr/figs/list2.eps b/book_kr/figs/list2.eps new file mode 100644 index 0000000..ebe15aa --- /dev/null +++ b/book_kr/figs/list2.eps @@ -0,0 +1,128 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: list2.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Thu Dec 6 09:32:48 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 97 43 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 43 moveto 0 0 lineto 97 0 lineto 97 43 lineto closepath clip newpath +-107.0 100.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1800 975 m 3375 975 l 3375 1650 l 1800 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (a) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (b) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ([ 1, 2, 3 ]) col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc ([ 1, 2, 3 ]) col0 sh gr +$F2psEnd +rs diff --git a/book_kr/figs/list2.fig b/book_kr/figs/list2.fig new file mode 100644 index 0000000..73d6dd0 --- /dev/null +++ b/book_kr/figs/list2.fig @@ -0,0 +1,21 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3375 975 3375 1650 1800 1650 1800 975 +4 2 0 50 0 16 11 0.0000 4 90 75 2025 1200 a\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 b\001 +4 0 0 50 0 16 11 0.0000 4 150 630 2550 1200 [ 1, 2, 3 ]\001 +4 0 0 50 0 16 11 0.0000 4 150 630 2550 1500 [ 1, 2, 3 ]\001 diff --git a/book_kr/figs/list2.pdf b/book_kr/figs/list2.pdf new file mode 100644 index 0000000..0d3d7e1 Binary files /dev/null and b/book_kr/figs/list2.pdf differ diff --git a/book_kr/figs/list3.eps b/book_kr/figs/list3.eps new file mode 100644 index 0000000..dfec837 --- /dev/null +++ b/book_kr/figs/list3.eps @@ -0,0 +1,140 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: list3.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Tue May 22 16:12:59 2012 +%%BoundingBox: 0 0 96 42 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 42 moveto 0 0 lineto 96 0 lineto 96 42 lineto closepath clip newpath +-107.3 99.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1800 975 m 3375 975 l 3375 1650 l 1800 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2350 1413 m 2497 1375 l 2482 1317 l 2335 1355 l 2335 1355 l 2459 1354 l 2350 1413 l cp +eoclip +n 2100 1447 m + 2475 1350 l gs col0 s gr gr + +% arrowhead +n 2350 1413 m 2459 1354 l 2335 1355 l col0 s +% Polyline +gs clippath +2335 1259 m 2479 1308 l 2498 1251 l 2355 1202 l 2355 1202 l 2459 1270 l 2335 1259 l cp +eoclip +n 2100 1147 m + 2475 1275 l gs col0 s gr gr + +% arrowhead +n 2335 1259 m 2459 1270 l 2355 1202 l col0 s +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (a) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (b) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1350 m +gs 1 -1 sc ([ 1, 2, 3 ]) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/list3.fig b/book_kr/figs/list3.fig new file mode 100644 index 0000000..ae60d05 --- /dev/null +++ b/book_kr/figs/list3.fig @@ -0,0 +1,20 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1350 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1275 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3375 975 3375 1650 1800 1650 1800 975 +4 2 0 50 0 16 11 0.0000 4 90 75 2025 1200 a\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 b\001 +4 0 0 50 0 16 11 0.0000 4 150 630 2550 1350 [ 1, 2, 3 ]\001 diff --git a/book_kr/figs/list3.pdf b/book_kr/figs/list3.pdf new file mode 100644 index 0000000..edc5f89 Binary files /dev/null and b/book_kr/figs/list3.pdf differ diff --git a/book_kr/figs/liststate.eps b/book_kr/figs/liststate.eps new file mode 100644 index 0000000..56544ee --- /dev/null +++ b/book_kr/figs/liststate.eps @@ -0,0 +1,255 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: liststate.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:23:07 2015 +%%BoundingBox: 0 0 218 204 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 204 moveto 0 0 lineto 218 0 lineto 218 204 lineto closepath clip newpath +-12.8 243.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1650 3675 m 1950 3675 l 1950 3975 l 1650 3975 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 975 m 3675 975 l 3675 1950 l 1650 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1650 2325 m 3225 2325 l 3225 3300 l 1650 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 2527 m 2490 2527 l 2490 2467 l 2338 2467 l 2338 2467 l 2458 2497 l 2338 2527 l cp +eoclip +n 2100 2497 m + 2475 2497 l gs col0 s gr gr + +% arrowhead +n 2338 2527 m 2458 2497 l 2338 2467 l col0 s +% Polyline +gs clippath +1438 2505 m 1590 2505 l 1590 2445 l 1438 2445 l 1438 2445 l 1558 2475 l 1438 2505 l cp +eoclip +n 1200 2475 m + 1575 2475 l gs col0 s gr gr + +% arrowhead +n 1438 2505 m 1558 2475 l 1438 2445 l col0 s +% Polyline +gs clippath +2342 3029 m 2472 3108 l 2503 3056 l 2373 2978 l 2373 2978 l 2461 3066 l 2342 3029 l cp +eoclip +n 2100 2850 m + 2475 3075 l gs col0 s gr gr + +% arrowhead +n 2342 3029 m 2461 3066 l 2373 2978 l col0 s +% Polyline + [15 60] 60 sd +n 2100 2797 m + 2475 2797 l gs col0 s gr [] 0 sd +% Polyline +n 2550 2700 m + 2850 2850 l gs col0 s gr +% Polyline +n 2850 2700 m + 2550 2850 l gs col0 s gr +% Polyline +gs clippath +1438 3855 m 1590 3855 l 1590 3795 l 1438 3795 l 1438 3795 l 1558 3825 l 1438 3855 l cp +eoclip +n 1200 3825 m + 1575 3825 l gs col0 s gr gr + +% arrowhead +n 1438 3855 m 1558 3825 l 1438 3795 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1777 m 2490 1777 l 2490 1717 l 2338 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +1438 1155 m 1590 1155 l 1590 1095 l 1438 1095 l 1438 1095 l 1558 1125 l 1438 1155 l cp +eoclip +n 1200 1125 m + 1575 1125 l gs col0 s gr gr + +% arrowhead +n 1438 1155 m 1558 1125 l 1438 1095 l col0 s +% Polyline +n 225 675 m 3825 675 l 3825 4050 l 225 4050 l + cp gs col7 s gr +/Helvetica ff 183.33 scf sf +2025 2550 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2850 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 2550 m +gs 1 -1 sc (numbers) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2850 m +gs 1 -1 sc (123) col0 sh gr +/Helvetica ff 183.33 scf sf +2550 3150 m +gs 1 -1 sc (5) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 3600 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 3900 m +gs 1 -1 sc (empty) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('Cheddar') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc ('Edam') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1800 m +gs 1 -1 sc ('Gouda') col0 sh gr +/Helvetica ff 183.33 scf sf +1650 900 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +1125 1200 m +gs 1 -1 sc (cheeses) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2550 m +gs 1 -1 sc (42) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/liststate.fig b/book_kr/figs/liststate.fig new file mode 100644 index 0000000..79bb4cb --- /dev/null +++ b/book_kr/figs/liststate.fig @@ -0,0 +1,64 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 2700 2850 2850 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 2700 2550 2850 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 1950 3675 1950 3975 1650 3975 1650 3675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +2 2 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 225 675 3825 675 3825 4050 225 4050 225 675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3225 2325 3225 3300 1650 3300 1650 2325 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 2250 list\001 +4 2 0 50 0 16 11 0.0000 4 135 720 1125 2550 numbers\001 +4 0 0 50 0 16 11 0.0000 4 120 315 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 120 105 2550 3150 5\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 165 495 1125 3900 empty\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 120 105 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 135 780 2550 1200 'Cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 135 540 2550 1500 'Edam'\001 +4 0 0 50 0 16 11 0.0000 4 135 615 2550 1800 'Gouda'\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 135 690 1125 1200 cheeses\001 +4 0 0 50 0 16 11 0.0000 4 120 210 2550 2550 42\001 diff --git a/book_kr/figs/liststate.fig.bak b/book_kr/figs/liststate.fig.bak new file mode 100644 index 0000000..55fcf23 --- /dev/null +++ b/book_kr/figs/liststate.fig.bak @@ -0,0 +1,64 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 2700 2850 2850 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 2700 2550 2850 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3225 2325 3225 3300 1650 3300 1650 2325 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 1950 3675 1950 3975 1650 3975 1650 3675 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +2 2 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 225 675 3825 675 3825 4050 225 4050 225 675 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 2250 list\001 +4 2 0 50 0 16 11 0.0000 4 135 705 1125 2550 numbers\001 +4 0 0 50 0 16 11 0.0000 4 135 210 2550 2550 17\001 +4 0 0 50 0 16 11 0.0000 4 135 315 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 135 105 2550 3150 5\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 180 495 1125 3900 empty\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 135 105 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 135 810 2550 1200 'Cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 135 555 2550 1500 'Edam'\001 +4 0 0 50 0 16 11 0.0000 4 135 645 2550 1800 'Gouda'\001 +4 0 0 50 0 16 11 0.0000 4 135 225 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 135 705 1125 1200 cheeses\001 diff --git a/book_kr/figs/liststate.pdf b/book_kr/figs/liststate.pdf new file mode 100644 index 0000000..0c4d6f5 Binary files /dev/null and b/book_kr/figs/liststate.pdf differ diff --git a/book_kr/figs/listsum1.eps b/book_kr/figs/listsum1.eps new file mode 100644 index 0000000..27870ec --- /dev/null +++ b/book_kr/figs/listsum1.eps @@ -0,0 +1,1740 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: listsum1.eps +%%Creator: matplotlib version 0.99.1.1, http://matplotlib.sourceforge.net/ +%%CreationDate: Fri Aug 5 16:02:46 2011 +%%Orientation: portrait +%%BoundingBox: 18 180 594 612 +%%EndComments +%%BeginProlog +/mpldict 8 dict def +mpldict begin +/m { moveto } bind def +/l { lineto } bind def +/r { rlineto } bind def +/c { curveto } bind def +/cl { closepath } bind def +/box { +m +1 index 0 r +0 exch r +neg 0 r +cl +} bind def +/clipbox { +box +clip +newpath +} bind def +%!PS-Adobe-3.0 Resource-Font +%%Title: DejaVu Sans +%%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain +%%Creator: Converted from TrueType by PPR +25 dict begin +/_d{bind def}bind def +/_m{moveto}_d +/_l{lineto}_d +/_cl{closepath eofill}_d +/_c{curveto}_d +/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d +/_e{exec}_d +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix[.001 0 0 .001 0 0]def +/FontBBox[-1020 -349 1681 1167]def +/FontType 3 def +/Encoding StandardEncoding def +/FontInfo 10 dict dup begin +/FamilyName (DejaVu Sans) def +/FullName (DejaVu Sans) def +/Notice (Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain ) def +/Weight (Book) def +/Version (Version 2.30) def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -130 def +/UnderlineThickness 90 def +end readonly def +/CharStrings 23 dict dup begin +/space{318 0 0 0 0 0 _sc +}_d +/parenleft{390 0 86 -131 310 759 _sc +310 759 _m +266 683 234 609 213 536 _c +191 463 181 389 181 314 _c +181 238 191 164 213 91 _c +234 17 266 -56 310 -131 _c +232 -131 _l +183 -54 146 20 122 94 _c +98 168 86 241 86 314 _c +86 386 98 459 122 533 _c +146 607 182 682 232 759 _c +310 759 _l +_cl}_d +/parenright{390 0 80 -131 304 759 _sc +80 759 _m +158 759 _l +206 682 243 607 267 533 _c +291 459 304 386 304 314 _c +304 241 291 168 267 94 _c +243 20 206 -54 158 -131 _c +80 -131 _l +123 -56 155 17 177 91 _c +198 164 209 238 209 314 _c +209 389 198 463 177 536 _c +155 609 123 683 80 759 _c +_cl}_d +/hyphen{361 0 49 234 312 314 _sc +49 314 _m +312 314 _l +312 234 _l +49 234 _l +49 314 _l +_cl}_d +/zero{636 0 66 -13 570 742 _sc +318 664 _m +267 664 229 639 203 589 _c +177 539 165 464 165 364 _c +165 264 177 189 203 139 _c +229 89 267 64 318 64 _c +369 64 407 89 433 139 _c +458 189 471 264 471 364 _c +471 464 458 539 433 589 _c +407 639 369 664 318 664 _c +318 742 _m +399 742 461 709 505 645 _c +548 580 570 486 570 364 _c +570 241 548 147 505 83 _c +461 19 399 -13 318 -13 _c +236 -13 173 19 130 83 _c +87 147 66 241 66 364 _c +66 486 87 580 130 645 _c +173 709 236 742 318 742 _c +_cl}_d +/one{636 0 110 0 544 729 _sc +124 83 _m +285 83 _l +285 639 _l +110 604 _l +110 694 _l +284 729 _l +383 729 _l +383 83 _l +544 83 _l +544 0 _l +124 0 _l +124 83 _l +_cl}_d +/two{{636 0 73 0 536 742 _sc +192 83 _m +536 83 _l +536 0 _l +73 0 _l +73 83 _l +110 121 161 173 226 239 _c +290 304 331 346 348 365 _c +380 400 402 430 414 455 _c +426 479 433 504 433 528 _c +433 566 419 598 392 622 _c +365 646 330 659 286 659 _c +255 659 222 653 188 643 _c +154 632 117 616 78 594 _c +78 694 _l +118 710 155 722 189 730 _c +223 738 255 742 284 742 _c +359 742 419 723 464 685 _c +509 647 532 597 532 534 _c +532 504 526 475 515 449 _c +504 422 484 390 454 354 _c +446 344 420 317 376 272 _c +332 227 271 164 192 83 _c +_cl}_e}_d +/five{{636 0 77 -13 549 729 _sc +108 729 _m +495 729 _l +495 646 _l +198 646 _l +198 467 _l +212 472 227 476 241 478 _c +255 480 270 482 284 482 _c +365 482 429 459 477 415 _c +525 370 549 310 549 234 _c +549 155 524 94 475 51 _c +426 8 357 -13 269 -13 _c +238 -13 207 -10 175 -6 _c +143 -1 111 6 77 17 _c +77 116 _l +106 100 136 88 168 80 _c +199 72 232 69 267 69 _c +323 69 368 83 401 113 _c +433 143 450 183 450 234 _c +450 284 433 324 401 354 _c +368 384 323 399 267 399 _c +241 399 214 396 188 390 _c +162 384 135 375 108 363 _c +108 729 _l +_cl}_e}_d +/six{{636 0 70 -13 573 742 _sc +330 404 _m +286 404 251 388 225 358 _c +199 328 186 286 186 234 _c +186 181 199 139 225 109 _c +251 79 286 64 330 64 _c +374 64 409 79 435 109 _c +461 139 474 181 474 234 _c +474 286 461 328 435 358 _c +409 388 374 404 330 404 _c +526 713 _m +526 623 _l +501 635 476 644 451 650 _c +425 656 400 659 376 659 _c +310 659 260 637 226 593 _c +192 549 172 482 168 394 _c +187 422 211 444 240 459 _c +269 474 301 482 336 482 _c +409 482 467 459 509 415 _c +551 371 573 310 573 234 _c +573 159 550 99 506 54 _c +462 9 403 -13 330 -13 _c +246 -13 181 19 137 83 _c +92 147 70 241 70 364 _c +70 479 97 571 152 639 _c +206 707 280 742 372 742 _c +}_e{396 742 421 739 447 735 _c +472 730 498 723 526 713 _c +_cl}_e}_d +/seven{636 0 82 0 551 729 _sc +82 729 _m +551 729 _l +551 687 _l +286 0 _l +183 0 _l +432 646 _l +82 646 _l +82 729 _l +_cl}_d +/underscore{500 0 -9 -235 510 -165 _sc +510 -165 _m +510 -235 _l +-9 -235 _l +-9 -165 _l +510 -165 _l +_cl}_d +/d{{635 0 55 -13 544 760 _sc +454 464 _m +454 760 _l +544 760 _l +544 0 _l +454 0 _l +454 82 _l +435 49 411 25 382 10 _c +353 -5 319 -13 279 -13 _c +213 -13 159 13 117 65 _c +75 117 55 187 55 273 _c +55 359 75 428 117 481 _c +159 533 213 560 279 560 _c +319 560 353 552 382 536 _c +411 520 435 496 454 464 _c +148 273 _m +148 207 161 155 188 117 _c +215 79 253 61 301 61 _c +348 61 385 79 413 117 _c +440 155 454 207 454 273 _c +454 339 440 390 413 428 _c +385 466 348 485 301 485 _c +253 485 215 466 188 428 _c +161 390 148 339 148 273 _c +_cl}_e}_d +/e{{615 0 55 -13 562 560 _sc +562 296 _m +562 252 _l +149 252 _l +153 190 171 142 205 110 _c +238 78 284 62 344 62 _c +378 62 412 66 444 74 _c +476 82 509 95 541 113 _c +541 28 _l +509 14 476 3 442 -3 _c +408 -9 373 -13 339 -13 _c +251 -13 182 12 131 62 _c +80 112 55 181 55 268 _c +55 357 79 428 127 481 _c +175 533 241 560 323 560 _c +397 560 455 536 498 489 _c +540 441 562 377 562 296 _c +472 322 _m +471 371 457 410 431 440 _c +404 469 368 484 324 484 _c +274 484 234 469 204 441 _c +174 413 156 373 152 322 _c +472 322 _l +_cl}_e}_d +/i{278 0 94 0 184 760 _sc +94 547 _m +184 547 _l +184 0 _l +94 0 _l +94 547 _l +94 760 _m +184 760 _l +184 646 _l +94 646 _l +94 760 _l +_cl}_d +/l{278 0 94 0 184 760 _sc +94 760 _m +184 760 _l +184 0 _l +94 0 _l +94 760 _l +_cl}_d +/m{{974 0 91 0 889 560 _sc +520 442 _m +542 482 569 511 600 531 _c +631 550 668 560 711 560 _c +767 560 811 540 842 500 _c +873 460 889 403 889 330 _c +889 0 _l +799 0 _l +799 327 _l +799 379 789 418 771 444 _c +752 469 724 482 686 482 _c +639 482 602 466 575 435 _c +548 404 535 362 535 309 _c +535 0 _l +445 0 _l +445 327 _l +445 379 435 418 417 444 _c +398 469 369 482 331 482 _c +285 482 248 466 221 435 _c +194 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +201 495 226 520 255 536 _c +283 552 317 560 357 560 _c +397 560 430 550 458 530 _c +486 510 506 480 520 442 _c +}_e{_cl}_e}_d +/n{634 0 91 0 549 560 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/p{{635 0 91 -207 580 560 _sc +181 82 _m +181 -207 _l +91 -207 _l +91 547 _l +181 547 _l +181 464 _l +199 496 223 520 252 536 _c +281 552 316 560 356 560 _c +422 560 476 533 518 481 _c +559 428 580 359 580 273 _c +580 187 559 117 518 65 _c +476 13 422 -13 356 -13 _c +316 -13 281 -5 252 10 _c +223 25 199 49 181 82 _c +487 273 _m +487 339 473 390 446 428 _c +418 466 381 485 334 485 _c +286 485 249 466 222 428 _c +194 390 181 339 181 273 _c +181 207 194 155 222 117 _c +249 79 286 61 334 61 _c +381 61 418 79 446 117 _c +473 155 487 207 487 273 _c +_cl}_e}_d +/r{411 0 91 0 411 560 _sc +411 463 _m +401 469 390 473 378 476 _c +366 478 353 480 339 480 _c +288 480 249 463 222 430 _c +194 397 181 350 181 288 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +199 495 224 520 254 536 _c +284 552 321 560 365 560 _c +371 560 378 559 386 559 _c +393 558 401 557 411 555 _c +411 463 _l +_cl}_d +/s{{521 0 54 -13 472 560 _sc +443 531 _m +443 446 _l +417 458 391 468 364 475 _c +336 481 308 485 279 485 _c +234 485 200 478 178 464 _c +156 450 145 430 145 403 _c +145 382 153 366 169 354 _c +185 342 217 330 265 320 _c +296 313 _l +360 299 405 279 432 255 _c +458 230 472 195 472 151 _c +472 100 452 60 412 31 _c +372 1 316 -13 246 -13 _c +216 -13 186 -10 154 -5 _c +122 0 89 8 54 20 _c +54 113 _l +87 95 120 82 152 74 _c +184 65 216 61 248 61 _c +290 61 323 68 346 82 _c +368 96 380 117 380 144 _c +380 168 371 187 355 200 _c +339 213 303 226 247 238 _c +216 245 _l +160 257 119 275 95 299 _c +70 323 58 356 58 399 _c +58 450 76 490 112 518 _c +148 546 200 560 268 560 _c +}_e{301 560 332 557 362 552 _c +391 547 418 540 443 531 _c +_cl}_e}_d +/t{392 0 27 0 368 702 _sc +183 702 _m +183 547 _l +368 547 _l +368 477 _l +183 477 _l +183 180 _l +183 135 189 106 201 94 _c +213 81 238 75 276 75 _c +368 75 _l +368 0 _l +276 0 _l +206 0 158 13 132 39 _c +106 65 93 112 93 180 _c +93 477 _l +27 477 _l +27 547 _l +93 547 _l +93 702 _l +183 702 _l +_cl}_d +/u{634 0 85 -13 543 560 _sc +85 216 _m +85 547 _l +175 547 _l +175 219 _l +175 167 185 129 205 103 _c +225 77 255 64 296 64 _c +344 64 383 79 411 110 _c +439 141 453 183 453 237 _c +453 547 _l +543 547 _l +543 0 _l +453 0 _l +453 84 _l +431 50 405 26 377 10 _c +348 -5 315 -13 277 -13 _c +214 -13 166 6 134 45 _c +101 83 85 140 85 216 _c +_cl}_d +/x{592 0 29 0 559 547 _sc +549 547 _m +351 281 _l +559 0 _l +453 0 _l +294 215 _l +135 0 _l +29 0 _l +241 286 _l +47 547 _l +153 547 _l +298 352 _l +443 547 _l +549 547 _l +_cl}_d +end readonly def + +/BuildGlyph + {exch begin + CharStrings exch + 2 copy known not{pop /.notdef}if + true 3 1 roll get exec + end}_d + +/BuildChar { + 1 index /Encoding get exch get + 1 index /BuildGlyph get exec +}_d + +FontName currentdict end definefont pop +end +%%EndProlog +mpldict begin +18 180 translate +576 432 0 0 clipbox +1.000 setlinewidth +1 setlinejoin +2 setlinecap +[] 0 setdash +1.000 setgray +gsave +0 0 m +576 0 l +576 432 l +0 432 l +0 0 l +gsave +fill +grestore +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +518.4 388.8 l +72 388.8 l +72 43.2 l +fill +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 187.425 m +178.493 217.853 l +206.38 239.442 l +228.01 256.189 l +245.683 269.871 l +260.626 281.439 l +273.57 291.46 l +284.987 300.3 l +295.2 308.207 l +304.439 315.359 l +312.873 321.889 l +320.632 327.896 l +327.816 333.457 l +334.504 338.635 l +340.76 343.478 l +346.636 348.028 l +352.177 352.318 l +357.418 356.375 l +362.39 360.225 l +367.119 363.886 l +371.629 367.377 l +375.938 370.713 l +380.063 373.907 l +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 177.665 m +178.493 223.153 l +206.38 235.689 l +228.01 255.822 l +245.683 268.018 l +260.626 275.171 l +273.57 284.764 l +284.987 293.269 l +295.2 300.907 l +304.439 310.015 l +312.873 320.036 l +320.632 321.889 l +327.816 327.189 l +334.504 336.782 l +340.76 338.268 l +346.636 342.558 l +352.177 350.465 l +357.418 349.203 l +362.39 356.471 l +367.119 367.211 l +371.629 364.147 l +375.938 363.097 l +380.063 373.907 l +stroke +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 153.243 m +178.493 183.671 l +206.38 205.261 l +228.01 222.007 l +245.683 235.689 l +260.626 247.258 l +273.57 257.279 l +284.987 266.118 l +295.2 274.025 l +304.439 281.178 l +312.873 287.707 l +320.632 293.714 l +327.816 299.276 l +334.504 304.453 l +340.76 309.297 l +346.636 313.846 l +352.177 318.136 l +357.418 322.193 l +362.39 326.043 l +367.119 329.704 l +371.629 333.196 l +375.938 336.531 l +380.063 339.725 l +stroke +grestore +3.000 setlinewidth +0.000 0.502 0.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 147.236 m +178.493 177.665 l +206.38 216 l +228.01 216 l +245.683 235.689 l +260.626 241.251 l +273.57 251.272 l +284.987 271.679 l +295.2 281.701 l +304.439 287.707 l +312.873 290.54 l +320.632 293.269 l +327.816 303.29 l +334.504 303.29 l +340.76 310.015 l +346.636 312.129 l +352.177 316.187 l +357.418 328.875 l +362.39 327.189 l +367.119 330.525 l +371.629 333.718 l +375.938 336.782 l +380.063 339.725 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +61.000000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/five glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +295.2 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +295.2 388.8 o +grestore +gsave +284.200000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/six glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +507.400000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/seven glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +139.19 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +139.19 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +178.493 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +178.493 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +206.38 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +206.38 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +228.01 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +228.01 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +245.683 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +245.683 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +260.626 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +260.626 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +273.57 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +273.57 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +284.987 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +284.987 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +362.39 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +362.39 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +401.693 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +401.693 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +429.58 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +429.58 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +451.21 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +451.21 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +468.883 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +468.883 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +483.826 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +483.826 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +496.77 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +496.77 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +508.187 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +508.187 388.8 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +292.45 12.481 m +(n) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +43.000000 35.700000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/two glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 216 o +grestore +gsave +43.000000 208.500000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +46.000000 381.300000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/zero glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 147.236 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 147.236 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 163.982 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 163.982 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 177.665 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 177.665 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 189.233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 189.233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 199.254 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 199.254 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 208.093 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 208.093 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 320.036 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 320.036 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 336.782 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 336.782 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 350.465 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 350.465 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 362.033 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 362.033 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 372.054 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 372.054 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 380.893 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 380.893 o +grestore +38 181.258 m +gsave +90 rotate +0 1.578 rmoveto +(run time \(s\)) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +72 388.8 m +518.4 388.8 l +stroke +grestore +gsave +518.4 43.2 m +518.4 388.8 l +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +stroke +grestore +gsave +72 43.2 m +72 388.8 l +stroke +grestore +gsave +373.844 50.4 m +511.2 50.4 l +511.2 96.995 l +373.844 96.995 l +373.844 50.4 l +cl +gsave +1.000 setgray +fill +grestore +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +383.924 85.6344 m +404.084 85.6344 l +stroke +grestore +0.000 setgray +/DejaVuSans findfont +14.400 scalefont +setfont +419.924 77.297 m +0 3.297 rmoveto +(sum_extend) show +0.000 0.502 0.000 setrgbcolor +gsave +383.924 64.4969 m +404.084 64.4969 l +stroke +grestore +0.000 setgray +419.924 56.16 m +0 3.297 rmoveto +(sum_plus) show + +end +showpage diff --git a/book_kr/figs/listsum1.pdf b/book_kr/figs/listsum1.pdf new file mode 100644 index 0000000..103db19 Binary files /dev/null and b/book_kr/figs/listsum1.pdf differ diff --git a/book_kr/figs/listsum2.eps b/book_kr/figs/listsum2.eps new file mode 100644 index 0000000..f771ec9 --- /dev/null +++ b/book_kr/figs/listsum2.eps @@ -0,0 +1,2086 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: listsum2.eps +%%Creator: matplotlib version 0.99.1.1, http://matplotlib.sourceforge.net/ +%%CreationDate: Wed Aug 3 16:20:28 2011 +%%Orientation: portrait +%%BoundingBox: 18 180 594 612 +%%EndComments +%%BeginProlog +/mpldict 8 dict def +mpldict begin +/m { moveto } bind def +/l { lineto } bind def +/r { rlineto } bind def +/c { curveto } bind def +/cl { closepath } bind def +/box { +m +1 index 0 r +0 exch r +neg 0 r +cl +} bind def +/clipbox { +box +clip +newpath +} bind def +%!PS-Adobe-3.0 Resource-Font +%%Title: DejaVu Sans +%%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain +%%Creator: Converted from TrueType by PPR +25 dict begin +/_d{bind def}bind def +/_m{moveto}_d +/_l{lineto}_d +/_cl{closepath eofill}_d +/_c{curveto}_d +/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d +/_e{exec}_d +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix[.001 0 0 .001 0 0]def +/FontBBox[-1020 -349 1681 1167]def +/FontType 3 def +/Encoding StandardEncoding def +/FontInfo 10 dict dup begin +/FamilyName (DejaVu Sans) def +/FullName (DejaVu Sans) def +/Notice (Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain ) def +/Weight (Book) def +/Version (Version 2.30) def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -130 def +/UnderlineThickness 90 def +end readonly def +/CharStrings 19 dict dup begin +/space{318 0 0 0 0 0 _sc +}_d +/parenleft{390 0 86 -131 310 759 _sc +310 759 _m +266 683 234 609 213 536 _c +191 463 181 389 181 314 _c +181 238 191 164 213 91 _c +234 17 266 -56 310 -131 _c +232 -131 _l +183 -54 146 20 122 94 _c +98 168 86 241 86 314 _c +86 386 98 459 122 533 _c +146 607 182 682 232 759 _c +310 759 _l +_cl}_d +/parenright{390 0 80 -131 304 759 _sc +80 759 _m +158 759 _l +206 682 243 607 267 533 _c +291 459 304 386 304 314 _c +304 241 291 168 267 94 _c +243 20 206 -54 158 -131 _c +80 -131 _l +123 -56 155 17 177 91 _c +198 164 209 238 209 314 _c +209 389 198 463 177 536 _c +155 609 123 683 80 759 _c +_cl}_d +/hyphen{361 0 49 234 312 314 _sc +49 314 _m +312 314 _l +312 234 _l +49 234 _l +49 314 _l +_cl}_d +/zero{636 0 66 -13 570 742 _sc +318 664 _m +267 664 229 639 203 589 _c +177 539 165 464 165 364 _c +165 264 177 189 203 139 _c +229 89 267 64 318 64 _c +369 64 407 89 433 139 _c +458 189 471 264 471 364 _c +471 464 458 539 433 589 _c +407 639 369 664 318 664 _c +318 742 _m +399 742 461 709 505 645 _c +548 580 570 486 570 364 _c +570 241 548 147 505 83 _c +461 19 399 -13 318 -13 _c +236 -13 173 19 130 83 _c +87 147 66 241 66 364 _c +66 486 87 580 130 645 _c +173 709 236 742 318 742 _c +_cl}_d +/one{636 0 110 0 544 729 _sc +124 83 _m +285 83 _l +285 639 _l +110 604 _l +110 694 _l +284 729 _l +383 729 _l +383 83 _l +544 83 _l +544 0 _l +124 0 _l +124 83 _l +_cl}_d +/two{{636 0 73 0 536 742 _sc +192 83 _m +536 83 _l +536 0 _l +73 0 _l +73 83 _l +110 121 161 173 226 239 _c +290 304 331 346 348 365 _c +380 400 402 430 414 455 _c +426 479 433 504 433 528 _c +433 566 419 598 392 622 _c +365 646 330 659 286 659 _c +255 659 222 653 188 643 _c +154 632 117 616 78 594 _c +78 694 _l +118 710 155 722 189 730 _c +223 738 255 742 284 742 _c +359 742 419 723 464 685 _c +509 647 532 597 532 534 _c +532 504 526 475 515 449 _c +504 422 484 390 454 354 _c +446 344 420 317 376 272 _c +332 227 271 164 192 83 _c +_cl}_e}_d +/three{{636 0 76 -13 556 742 _sc +406 393 _m +453 383 490 362 516 330 _c +542 298 556 258 556 212 _c +556 140 531 84 482 45 _c +432 6 362 -13 271 -13 _c +240 -13 208 -10 176 -4 _c +144 1 110 10 76 22 _c +76 117 _l +103 101 133 89 166 81 _c +198 73 232 69 268 69 _c +330 69 377 81 409 105 _c +441 129 458 165 458 212 _c +458 254 443 288 413 312 _c +383 336 341 349 287 349 _c +202 349 _l +202 430 _l +291 430 _l +339 430 376 439 402 459 _c +428 478 441 506 441 543 _c +441 580 427 609 401 629 _c +374 649 336 659 287 659 _c +260 659 231 656 200 650 _c +169 644 135 635 98 623 _c +98 711 _l +135 721 170 729 203 734 _c +235 739 266 742 296 742 _c +}_e{370 742 429 725 473 691 _c +517 657 539 611 539 553 _c +539 513 527 479 504 451 _c +481 423 448 403 406 393 _c +_cl}_e}_d +/four{636 0 49 0 580 729 _sc +378 643 _m +129 254 _l +378 254 _l +378 643 _l +352 729 _m +476 729 _l +476 254 _l +580 254 _l +580 172 _l +476 172 _l +476 0 _l +378 0 _l +378 172 _l +49 172 _l +49 267 _l +352 729 _l +_cl}_d +/five{{636 0 77 -13 549 729 _sc +108 729 _m +495 729 _l +495 646 _l +198 646 _l +198 467 _l +212 472 227 476 241 478 _c +255 480 270 482 284 482 _c +365 482 429 459 477 415 _c +525 370 549 310 549 234 _c +549 155 524 94 475 51 _c +426 8 357 -13 269 -13 _c +238 -13 207 -10 175 -6 _c +143 -1 111 6 77 17 _c +77 116 _l +106 100 136 88 168 80 _c +199 72 232 69 267 69 _c +323 69 368 83 401 113 _c +433 143 450 183 450 234 _c +450 284 433 324 401 354 _c +368 384 323 399 267 399 _c +241 399 214 396 188 390 _c +162 384 135 375 108 363 _c +108 729 _l +_cl}_e}_d +/underscore{500 0 -9 -235 510 -165 _sc +510 -165 _m +510 -235 _l +-9 -235 _l +-9 -165 _l +510 -165 _l +_cl}_d +/e{{615 0 55 -13 562 560 _sc +562 296 _m +562 252 _l +149 252 _l +153 190 171 142 205 110 _c +238 78 284 62 344 62 _c +378 62 412 66 444 74 _c +476 82 509 95 541 113 _c +541 28 _l +509 14 476 3 442 -3 _c +408 -9 373 -13 339 -13 _c +251 -13 182 12 131 62 _c +80 112 55 181 55 268 _c +55 357 79 428 127 481 _c +175 533 241 560 323 560 _c +397 560 455 536 498 489 _c +540 441 562 377 562 296 _c +472 322 _m +471 371 457 410 431 440 _c +404 469 368 484 324 484 _c +274 484 234 469 204 441 _c +174 413 156 373 152 322 _c +472 322 _l +_cl}_e}_d +/i{278 0 94 0 184 760 _sc +94 547 _m +184 547 _l +184 0 _l +94 0 _l +94 547 _l +94 760 _m +184 760 _l +184 646 _l +94 646 _l +94 760 _l +_cl}_d +/m{{974 0 91 0 889 560 _sc +520 442 _m +542 482 569 511 600 531 _c +631 550 668 560 711 560 _c +767 560 811 540 842 500 _c +873 460 889 403 889 330 _c +889 0 _l +799 0 _l +799 327 _l +799 379 789 418 771 444 _c +752 469 724 482 686 482 _c +639 482 602 466 575 435 _c +548 404 535 362 535 309 _c +535 0 _l +445 0 _l +445 327 _l +445 379 435 418 417 444 _c +398 469 369 482 331 482 _c +285 482 248 466 221 435 _c +194 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +201 495 226 520 255 536 _c +283 552 317 560 357 560 _c +397 560 430 550 458 530 _c +486 510 506 480 520 442 _c +}_e{_cl}_e}_d +/n{634 0 91 0 549 560 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/r{411 0 91 0 411 560 _sc +411 463 _m +401 469 390 473 378 476 _c +366 478 353 480 339 480 _c +288 480 249 463 222 430 _c +194 397 181 350 181 288 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +199 495 224 520 254 536 _c +284 552 321 560 365 560 _c +371 560 378 559 386 559 _c +393 558 401 557 411 555 _c +411 463 _l +_cl}_d +/s{{521 0 54 -13 472 560 _sc +443 531 _m +443 446 _l +417 458 391 468 364 475 _c +336 481 308 485 279 485 _c +234 485 200 478 178 464 _c +156 450 145 430 145 403 _c +145 382 153 366 169 354 _c +185 342 217 330 265 320 _c +296 313 _l +360 299 405 279 432 255 _c +458 230 472 195 472 151 _c +472 100 452 60 412 31 _c +372 1 316 -13 246 -13 _c +216 -13 186 -10 154 -5 _c +122 0 89 8 54 20 _c +54 113 _l +87 95 120 82 152 74 _c +184 65 216 61 248 61 _c +290 61 323 68 346 82 _c +368 96 380 117 380 144 _c +380 168 371 187 355 200 _c +339 213 303 226 247 238 _c +216 245 _l +160 257 119 275 95 299 _c +70 323 58 356 58 399 _c +58 450 76 490 112 518 _c +148 546 200 560 268 560 _c +}_e{301 560 332 557 362 552 _c +391 547 418 540 443 531 _c +_cl}_e}_d +/t{392 0 27 0 368 702 _sc +183 702 _m +183 547 _l +368 547 _l +368 477 _l +183 477 _l +183 180 _l +183 135 189 106 201 94 _c +213 81 238 75 276 75 _c +368 75 _l +368 0 _l +276 0 _l +206 0 158 13 132 39 _c +106 65 93 112 93 180 _c +93 477 _l +27 477 _l +27 547 _l +93 547 _l +93 702 _l +183 702 _l +_cl}_d +/u{634 0 85 -13 543 560 _sc +85 216 _m +85 547 _l +175 547 _l +175 219 _l +175 167 185 129 205 103 _c +225 77 255 64 296 64 _c +344 64 383 79 411 110 _c +439 141 453 183 453 237 _c +453 547 _l +543 547 _l +543 0 _l +453 0 _l +453 84 _l +431 50 405 26 377 10 _c +348 -5 315 -13 277 -13 _c +214 -13 166 6 134 45 _c +101 83 85 140 85 216 _c +_cl}_d +end readonly def + +/BuildGlyph + {exch begin + CharStrings exch + 2 copy known not{pop /.notdef}if + true 3 1 roll get exec + end}_d + +/BuildChar { + 1 index /Encoding get exch get + 1 index /BuildGlyph get exec +}_d + +FontName currentdict end definefont pop +end +%%EndProlog +mpldict begin +18 180 translate +576 432 0 0 clipbox +1.000 setlinewidth +1 setlinejoin +2 setlinecap +[] 0 setdash +1.000 setgray +gsave +0 0 m +576 0 l +576 432 l +0 432 l +0 0 l +gsave +fill +grestore +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +518.4 388.8 l +72 388.8 l +72 43.2 l +fill +grestore +2.000 setlinewidth +0.700 setgray +gsave +446.4 345.6 72 43.2 clipbox +139.19 144.289 m +178.493 174.718 l +206.38 196.307 l +228.01 213.054 l +245.683 226.736 l +260.626 238.304 l +273.57 248.325 l +284.987 257.165 l +295.2 265.071 l +304.439 272.224 l +312.873 278.754 l +320.632 284.761 l +327.816 290.322 l +334.504 295.5 l +340.76 300.343 l +346.636 304.893 l +352.177 309.183 l +357.418 313.24 l +362.39 317.089 l +367.119 320.751 l +371.629 324.242 l +375.938 327.578 l +380.063 330.772 l +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +446.4 345.6 72 43.2 clipbox +139.19 129.6 m +178.493 181.618 l +206.38 189.991 l +228.01 212.047 l +245.683 225.845 l +260.626 235.911 l +273.57 248.85 l +284.987 257.223 l +295.2 264.065 l +304.439 271.594 l +312.873 279.279 l +320.632 285.654 l +327.816 291.102 l +334.504 295.408 l +340.76 299.677 l +346.636 306.316 l +352.177 310.472 l +357.418 313.661 l +362.39 317.111 l +367.119 320.502 l +371.629 324.036 l +375.938 328.221 l +380.063 330.772 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +61.000000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/three glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +295.2 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +295.2 388.8 o +grestore +gsave +284.200000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/four glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +507.400000 24.200000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/five glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +139.19 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +139.19 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +178.493 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +178.493 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +206.38 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +206.38 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +228.01 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +228.01 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +245.683 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +245.683 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +260.626 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +260.626 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +273.57 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +273.57 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +284.987 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +284.987 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +362.39 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +362.39 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +401.693 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +401.693 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +429.58 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +429.58 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +451.21 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +451.21 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +468.883 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +468.883 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +483.826 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +483.826 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +496.77 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +496.77 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 2 l +stroke +grestore +} bind def +508.187 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -2 l +stroke +grestore +} bind def +508.187 388.8 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +292.45 12.481 m +(n) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 43.2 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 43.2 o +grestore +gsave +43.000000 35.700000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/three glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 129.6 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 129.6 o +grestore +gsave +43.000000 122.100000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/two glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 216 o +grestore +gsave +43.000000 208.500000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 302.4 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 302.4 o +grestore +gsave +46.000000 294.900000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/zero glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +72 388.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +518.4 388.8 o +grestore +gsave +46.000000 381.300000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 69.209 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 69.209 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 84.4233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 84.4233 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 95.218 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 103.591 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 103.591 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 110.432 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 110.432 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 116.216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 116.216 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 121.227 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 121.227 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 125.647 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 155.609 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 155.609 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 170.823 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 170.823 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 181.618 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 181.618 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 189.991 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 189.991 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 196.832 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 196.832 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 202.616 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 202.616 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 207.627 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 207.627 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 212.047 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 212.047 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 242.009 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 242.009 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 257.223 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 257.223 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 268.018 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 276.391 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 276.391 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 283.232 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 283.232 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 289.016 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 289.016 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 294.027 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 294.027 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 298.447 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 328.409 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 328.409 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 343.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 343.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 354.418 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 354.418 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 362.791 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 362.791 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 369.632 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 369.632 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 375.416 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 375.416 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 380.427 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 380.427 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +72 384.847 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +518.4 384.847 o +grestore +38 181.258 m +gsave +90 rotate +0 1.578 rmoveto +(run time \(s\)) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +72 388.8 m +518.4 388.8 l +stroke +grestore +gsave +518.4 43.2 m +518.4 388.8 l +stroke +grestore +gsave +72 43.2 m +518.4 43.2 l +stroke +grestore +gsave +72 43.2 m +72 388.8 l +stroke +grestore +gsave +392.985 50.4 m +511.2 50.4 l +511.2 75.8575 l +392.985 75.8575 l +392.985 50.4 l +cl +gsave +1.000 setgray +fill +grestore +stroke +grestore +3.000 setlinewidth +0.000 0.000 1.000 setrgbcolor +gsave +403.065 64.4969 m +423.225 64.4969 l +stroke +grestore +0.000 setgray +/DejaVuSans findfont +14.400 scalefont +setfont +439.065 56.16 m +0 3.297 rmoveto +(sum_sum) show + +end +showpage diff --git a/book_kr/figs/listsum2.pdf b/book_kr/figs/listsum2.pdf new file mode 100644 index 0000000..1b5e77d Binary files /dev/null and b/book_kr/figs/listsum2.pdf differ diff --git a/book_kr/figs/loop.py b/book_kr/figs/loop.py new file mode 100644 index 0000000..1e4dea2 --- /dev/null +++ b/book_kr/figs/loop.py @@ -0,0 +1,20 @@ +import sys, os +from glob import glob + +def pipe(cmd): + fp = os.popen(cmd) + res = fp.read() + stat = fp.close() + return res, stat + +def main(script, files='*.eps'): + for filename in sorted(glob(files)): + destination = '.'.join(filename.split('.')[:-1]) + '.pdf' + cmd = 'convert %s %s' % (filename, destination) + print cmd + + res, stat = pipe(cmd) + print res, stat + +if __name__ == '__main__': + main(*sys.argv) diff --git a/book_kr/figs/loop.py~ b/book_kr/figs/loop.py~ new file mode 100644 index 0000000..0c6189a --- /dev/null +++ b/book_kr/figs/loop.py~ @@ -0,0 +1,19 @@ +import sys, os +from glob import glob + +def pipe(cmd): + fp = os.popen(cmd) + res = fp.read() + stat = fp.close() + return res, stat + +def main(script, files='*.pdf'): + for file in glob(files): + cmd = 'pdf2ps %s temp.ps; lprdup temp.ps' % (file,) + print cmd + + res, stat = pipe(cmd) + print res, stat + +if __name__ == '__main__': + main(*sys.argv) diff --git a/book_kr/figs/pies.eps b/book_kr/figs/pies.eps new file mode 100644 index 0000000..486986f --- /dev/null +++ b/book_kr/figs/pies.eps @@ -0,0 +1,875 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Tk Canvas Widget +%%For: Allen Downey +%%Title: Window .-1211895540 +%%CreationDate: Mon Jul 2 10:01:49 2007 +%%BoundingBox: 196 360 416 432 +%%Pages: 1 +%%DocumentData: Clean7Bit +%%Orientation: Portrait +%%EndComments + +%%BeginProlog +/CurrentEncoding [ +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle +/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash +/zero/one/two/three/four/five/six/seven +/eight/nine/colon/semicolon/less/equal/greater/question +/at/A/B/C/D/E/F/G +/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W +/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore +/grave/a/b/c/d/e/f/g +/h/i/j/k/l/m/n/o +/p/q/r/s/t/u/v/w +/x/y/z/braceleft/bar/braceright/asciitilde/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/space/space/space/space/space/space/space +/space/exclamdown/cent/sterling/currency/yen/brokenbar/section +/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron +/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered +/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis +/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply +/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls +/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide +/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis +] def + +50 dict begin +% This is a standard prolog for Postscript generated by Tk's canvas +% widget. +% RCS: @(#) $Id: mkpsenc.tcl,v 1.3 2002/07/19 14:37:21 drh Exp $ + +% The definitions below just define all of the variables used in +% any of the procedures here. This is needed for obscure reasons +% explained on p. 716 of the Postscript manual (Section H.2.7, +% "Initializing Variables," in the section on Encapsulated Postscript). + +/baseline 0 def +/stipimage 0 def +/height 0 def +/justify 0 def +/lineLength 0 def +/spacing 0 def +/stipple 0 def +/strings 0 def +/xoffset 0 def +/yoffset 0 def +/tmpstip null def + + +/cstringshow { + { + dup type /stringtype eq + { show } { glyphshow } + ifelse + } + forall +} bind def + + + +/cstringwidth { + 0 exch 0 exch + { + dup type /stringtype eq + { stringwidth } { + currentfont /Encoding get exch 1 exch put (\001) stringwidth + } + ifelse + exch 3 1 roll add 3 1 roll add exch + } + forall +} bind def + +% font ISOEncode font +% This procedure changes the encoding of a font from the default +% Postscript encoding to current system encoding. It's typically invoked just +% before invoking "setfont". The body of this procedure comes from +% Section 5.6.1 of the Postscript book. + +/ISOEncode { + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding CurrentEncoding def + currentdict + end + + % I'm not sure why it's necessary to use "definefont" on this new + % font, but it seems to be important; just use the name "Temporary" + % for the font. + + /Temporary exch definefont +} bind def + +% StrokeClip +% +% This procedure converts the current path into a clip area under +% the assumption of stroking. It's a bit tricky because some Postscript +% interpreters get errors during strokepath for dashed lines. If +% this happens then turn off dashes and try again. + +/StrokeClip { + {strokepath} stopped { + (This Postscript printer gets limitcheck overflows when) = + (stippling dashed lines; lines will be printed solid instead.) = + [] 0 setdash strokepath} if + clip +} bind def + +% desiredSize EvenPixels closestSize +% +% The procedure below is used for stippling. Given the optimal size +% of a dot in a stipple pattern in the current user coordinate system, +% compute the closest size that is an exact multiple of the device's +% pixel size. This allows stipple patterns to be displayed without +% aliasing effects. + +/EvenPixels { + % Compute exact number of device pixels per stipple dot. + dup 0 matrix currentmatrix dtransform + dup mul exch dup mul add sqrt + + % Round to an integer, make sure the number is at least 1, and compute + % user coord distance corresponding to this. + dup round dup 1 lt {pop 1} if + exch div mul +} bind def + +% width height string StippleFill -- +% +% Given a path already set up and a clipping region generated from +% it, this procedure will fill the clipping region with a stipple +% pattern. "String" contains a proper image description of the +% stipple pattern and "width" and "height" give its dimensions. Each +% stipple dot is assumed to be about one unit across in the current +% user coordinate system. This procedure trashes the graphics state. + +/StippleFill { + % The following code is needed to work around a NeWSprint bug. + + /tmpstip 1 index def + + % Change the scaling so that one user unit in user coordinates + % corresponds to the size of one stipple dot. + 1 EvenPixels dup scale + + % Compute the bounding box occupied by the path (which is now + % the clipping region), and round the lower coordinates down + % to the nearest starting point for the stipple pattern. Be + % careful about negative numbers, since the rounding works + % differently on them. + + pathbbox + 4 2 roll + 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll + 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll + + % Stack now: width height string y1 y2 x1 x2 + % Below is a doubly-nested for loop to iterate across this area + % in units of the stipple pattern size, going up columns then + % across rows, blasting out a stipple-pattern-sized rectangle at + % each position + + 6 index exch { + 2 index 5 index 3 index { + % Stack now: width height string y1 y2 x y + + gsave + 1 index exch translate + 5 index 5 index true matrix tmpstip imagemask + grestore + } for + pop + } for + pop pop pop pop pop +} bind def + +% -- AdjustColor -- +% Given a color value already set for output by the caller, adjusts +% that value to a grayscale or mono value if requested by the CL +% variable. + +/AdjustColor { + CL 2 lt { + currentgray + CL 0 eq { + .5 lt {0} {1} ifelse + } if + setgray + } if +} bind def + +% x y strings spacing xoffset yoffset justify stipple DrawText -- +% This procedure does all of the real work of drawing text. The +% color and font must already have been set by the caller, and the +% following arguments must be on the stack: +% +% x, y - Coordinates at which to draw text. +% strings - An array of strings, one for each line of the text item, +% in order from top to bottom. +% spacing - Spacing between lines. +% xoffset - Horizontal offset for text bbox relative to x and y: 0 for +% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se. +% yoffset - Vertical offset for text bbox relative to x and y: 0 for +% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se. +% justify - 0 for left justification, 0.5 for center, 1 for right justify. +% stipple - Boolean value indicating whether or not text is to be +% drawn in stippled fashion. If text is stippled, +% procedure StippleText must have been defined to call +% StippleFill in the right way. +% +% Also, when this procedure is invoked, the color and font must already +% have been set for the text. + +/DrawText { + /stipple exch def + /justify exch def + /yoffset exch def + /xoffset exch def + /spacing exch def + /strings exch def + + % First scan through all of the text to find the widest line. + + /lineLength 0 def + strings { + cstringwidth pop + dup lineLength gt {/lineLength exch def} {pop} ifelse + newpath + } forall + + % Compute the baseline offset and the actual font height. + + 0 0 moveto (TXygqPZ) false charpath + pathbbox dup /baseline exch def + exch pop exch sub /height exch def pop + newpath + + % Translate coordinates first so that the origin is at the upper-left + % corner of the text's bounding box. Remember that x and y for + % positioning are still on the stack. + + translate + lineLength xoffset mul + strings length 1 sub spacing mul height add yoffset mul translate + + % Now use the baseline and justification information to translate so + % that the origin is at the baseline and positioning point for the + % first line of text. + + justify lineLength mul baseline neg translate + + % Iterate over each of the lines to output it. For each line, + % compute its width again so it can be properly justified, then + % display it. + + strings { + dup cstringwidth pop + justify neg mul 0 moveto + stipple { + + + % The text is stippled, so turn it into a path and print + % by calling StippledText, which in turn calls StippleFill. + % Unfortunately, many Postscript interpreters will get + % overflow errors if we try to do the whole string at + % once, so do it a character at a time. + + gsave + /char (X) def + { + dup type /stringtype eq { + % This segment is a string. + { + char 0 3 -1 roll put + currentpoint + gsave + char true charpath clip StippleText + grestore + char stringwidth translate + moveto + } forall + } { + % This segment is glyph name + % Temporary override + currentfont /Encoding get exch 1 exch put + currentpoint + gsave (\001) true charpath clip StippleText + grestore + (\001) stringwidth translate + moveto + } ifelse + } forall + grestore + } {cstringshow} ifelse + 0 spacing neg translate + } forall +} bind def + +%%EndProlog +%%BeginSetup +/CL 2 def +%%EndSetup + +%%Page: 1 1 +save +306.0 396.0 translate +0.846 0.846 scale +-158 -42 translate +28 84 moveto 288 84 lineto 288 0 lineto 28 0 lineto closepath clip newpath +gsave +70 42 moveto +102.360679774998 18.4885899083011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.360679774998 18.4885899083011 moveto +102.360679774998 65.5114100916989 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.360679774998 65.5114100916989 moveto +70 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70 42 moveto +102.360679774998 65.511410091699 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.360679774998 65.511410091699 moveto +57.6393202250021 80.0422606518062 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.6393202250021 80.0422606518062 moveto +70 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70 42 moveto +57.6393202250022 80.0422606518062 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.6393202250022 80.0422606518062 moveto +30.0000000000001 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +30.0000000000001 42 moveto +70.0000000000001 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.0000000000001 42 moveto +30.0000000000001 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +30.0000000000001 42 moveto +57.6393202250021 3.95773934819377 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.6393202250021 3.95773934819377 moveto +70.0000000000001 41.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +70.0000000000001 41.9999999999999 moveto +57.6393202250021 3.95773934819377 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +57.6393202250021 3.95773934819377 moveto +102.360679774998 18.4885899083011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +102.360679774998 18.4885899083011 moveto +70 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 41.9999999999999 moveto +194.641016151377 21.9999999999998 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.641016151377 21.9999999999998 moveto +194.641016151377 61.9999999999997 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.641016151377 61.9999999999997 moveto +160 41.9999999999998 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 41.9999999999998 moveto +194.641016151377 61.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.641016151377 61.9999999999999 moveto +160 81.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 81.9999999999999 moveto +160 41.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 41.9999999999999 moveto +160 81.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 81.9999999999999 moveto +125.358983848622 62 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.358983848622 62 moveto +160 42.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 42.0000000000001 moveto +125.358983848622 62.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.358983848622 62.0000000000001 moveto +125.358983848622 22.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.358983848622 22.0000000000001 moveto +160 42.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 42.0000000000001 moveto +125.358983848622 22 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +125.358983848622 22 moveto +160 2.00000000000006 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 2.00000000000006 moveto +160 42.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 42.0000000000001 moveto +160 2.00000000000006 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +160 2.00000000000006 moveto +194.641016151377 22.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +194.641016151377 22.0000000000001 moveto +160 42.0000000000001 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 42.0000000000005 moveto +286.038754716097 24.6446504352984 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.038754716097 24.6446504352984 moveto +286.038754716097 59.3553495647031 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.038754716097 59.3553495647031 moveto +250 42.0000000000011 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +250 42.0000000000011 moveto +286.038754716096 59.3553495647037 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.038754716096 59.3553495647037 moveto +258.900837358252 80.9971164872744 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +258.900837358252 80.9971164872744 moveto +249.999999999999 42.0000000000015 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.999999999999 42.0000000000015 moveto +258.900837358252 80.9971164872746 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +258.900837358252 80.9971164872746 moveto +225.06040792565 73.2732592987229 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.06040792565 73.2732592987229 moveto +249.999999999999 42.0000000000014 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.999999999999 42.0000000000014 moveto +225.060407925649 73.2732592987224 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.060407925649 73.2732592987224 moveto +209.999999999998 42.0000000000013 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.999999999998 42.0000000000013 moveto +249.999999999998 42.0000000000008 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.999999999998 42.0000000000008 moveto +209.999999999998 42 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +209.999999999998 42 moveto +225.060407925649 10.7267407012788 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.060407925649 10.7267407012788 moveto +249.999999999999 41.9999999999997 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.999999999999 41.9999999999997 moveto +225.06040792565 10.726740701278 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +225.06040792565 10.726740701278 moveto +258.900837358252 3.00288351272661 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +258.900837358252 3.00288351272661 moveto +249.999999999999 41.9999999999995 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +249.999999999999 41.9999999999995 moveto +258.900837358253 3.00288351272675 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +258.900837358253 3.00288351272675 moveto +286.038754716097 24.6446504352977 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +gsave +286.038754716097 24.6446504352977 moveto +250 41.9999999999999 lineto +0 setlinecap +1 setlinejoin +1 setlinewidth +[] 0 setdash +0.000 0.000 0.000 setrgbcolor AdjustColor +stroke +grestore +restore showpage + +%%Trailer +end +%%EOF diff --git a/book_kr/figs/pies.pdf b/book_kr/figs/pies.pdf new file mode 100644 index 0000000..b3a18a4 Binary files /dev/null and b/book_kr/figs/pies.pdf differ diff --git a/book_kr/figs/point.eps b/book_kr/figs/point.eps new file mode 100644 index 0000000..8356ba9 --- /dev/null +++ b/book_kr/figs/point.eps @@ -0,0 +1,147 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: point.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Wed Jul 25 13:34:31 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 118 53 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 53 moveto 0 0 lineto 118 0 lineto 118 53 lineto closepath clip newpath +-58.8 99.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1800 975 m 2925 975 l 2925 1650 l 1800 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +1815 1147 m 1815 1087 l 1663 1087 l 1783 1117 l 1663 1147 l cp +eoclip +n 1425 1117 m + 1800 1117 l gs col0 s gr gr + +% arrowhead +n 1663 1147 m 1783 1117 l 1663 1087 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (y) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc (3.0) col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc (4.0) col0 sh gr +/Helvetica ff 165.00 scf sf +1350 1170 m +gs 1 -1 sc (blank) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +1800 900 m +gs 1 -1 sc (Point) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/point.fig b/book_kr/figs/point.fig new file mode 100644 index 0000000..30afbce --- /dev/null +++ b/book_kr/figs/point.fig @@ -0,0 +1,26 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 2925 975 2925 1650 1800 1650 1800 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1425 1117 1800 1117 +4 2 0 50 0 16 11 0.0000 4 90 90 2025 1200 x\001 +4 2 0 50 0 16 11 0.0000 4 120 75 2025 1500 y\001 +4 0 0 50 0 16 11 0.0000 4 120 225 2550 1200 3.0\001 +4 0 0 50 0 16 11 0.0000 4 120 225 2550 1500 4.0\001 +4 2 0 50 0 16 11 0.0000 4 120 360 1350 1170 blank\001 +4 0 0 50 0 16 11 0.0000 4 120 375 1800 900 Point\001 diff --git a/book_kr/figs/point.pdf b/book_kr/figs/point.pdf new file mode 100644 index 0000000..36952d7 Binary files /dev/null and b/book_kr/figs/point.pdf differ diff --git a/book_kr/figs/rectangle.eps b/book_kr/figs/rectangle.eps new file mode 100644 index 0000000..26ad4a9 --- /dev/null +++ b/book_kr/figs/rectangle.eps @@ -0,0 +1,206 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rectangle.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:35:27 2012 +%%BoundingBox: 0 0 219 74 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 74 moveto 0 0 lineto 219 0 lineto 219 74 lineto closepath clip newpath +-39.1 117.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 3300 1350 m 4275 1350 l 4275 1950 l 3300 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 975 m 3075 975 l 3075 1950 l 1425 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3763 1852 m 3915 1852 l 3915 1792 l 3763 1792 l 3763 1792 l 3883 1822 l 3763 1852 l cp +eoclip +n 3525 1822 m + 3900 1822 l gs col0 s gr gr + +% arrowhead +n 3763 1852 m 3883 1822 l 3763 1792 l col0 s +% Polyline +gs clippath +3763 1552 m 3915 1552 l 3915 1492 l 3763 1492 l 3763 1492 l 3883 1522 l 3763 1552 l cp +eoclip +n 3525 1522 m + 3900 1522 l gs col0 s gr gr + +% arrowhead +n 3763 1552 m 3883 1522 l 3763 1492 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +3158 1775 m 3310 1774 l 3309 1714 l 3157 1715 l 3157 1715 l 3278 1745 l 3158 1775 l cp +eoclip +n 2100 1747 m + 3295 1745 l gs col0 s gr gr + +% arrowhead +n 3158 1775 m 3278 1745 l 3157 1715 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +1276 1170 m 1428 1170 l 1428 1110 l 1276 1110 l 1276 1110 l 1396 1140 l 1276 1170 l cp +eoclip +n 1028 1140 m + 1413 1140 l gs col0 s gr gr + +% arrowhead +n 1276 1170 m 1396 1140 l 1276 1110 l col0 s +/Helvetica ff 183.33 scf sf +3450 1875 m +gs 1 -1 sc (y) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1575 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +3450 1575 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1875 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (width) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc (100.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (corner) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc (200.0) col0 sh gr +/Helvetica ff 183.33 scf sf +3300 1275 m +gs 1 -1 sc (Point) col0 sh gr +/Helvetica ff 183.33 scf sf +1500 900 m +gs 1 -1 sc (Rectangle) col0 sh gr +/Helvetica ff 183.33 scf sf +975 1200 m +gs 1 -1 sc (box) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (height) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/rectangle.fig b/book_kr/figs/rectangle.fig new file mode 100644 index 0000000..6ce860c --- /dev/null +++ b/book_kr/figs/rectangle.fig @@ -0,0 +1,45 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3300 1350 4275 1950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1822 3900 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1522 3900 1522 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3300 1350 4275 1350 4275 1950 3300 1950 3300 1350 +4 2 0 50 0 16 11 0.0000 4 150 105 3450 1875 y\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1575 0.0\001 +4 2 0 50 0 16 11 0.0000 4 105 90 3450 1575 x\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1875 0.0\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 3295 1745 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1028 1140 1413 1140 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 3075 975 3075 1950 1425 1950 1425 975 +4 2 0 50 0 16 11 0.0000 4 135 435 2025 1200 width\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1200 100.0\001 +4 2 0 50 0 16 11 0.0000 4 105 540 2025 1800 corner\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1500 200.0\001 +4 0 0 50 0 16 11 0.0000 4 135 420 3300 1275 Point\001 +4 0 0 50 0 16 11 0.0000 4 180 840 1500 900 Rectangle\001 +4 2 0 50 0 16 11 0.0000 4 135 300 975 1200 box\001 +4 2 0 50 0 16 11 0.0000 4 180 510 2025 1500 height\001 diff --git a/book_kr/figs/rectangle.pdf b/book_kr/figs/rectangle.pdf new file mode 100644 index 0000000..79bc921 Binary files /dev/null and b/book_kr/figs/rectangle.pdf differ diff --git a/book_kr/figs/rectangle2.eps b/book_kr/figs/rectangle2.eps new file mode 100644 index 0000000..2819cf2 --- /dev/null +++ b/book_kr/figs/rectangle2.eps @@ -0,0 +1,257 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: rectangle2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 30 11:38:48 2012 +%%BoundingBox: 0 0 370 60 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 60 moveto 0 0 lineto 370 0 lineto 370 60 lineto closepath clip newpath +-43.6 117.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 3300 1350 m 4275 1350 l 4275 1950 l 3300 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 975 m 3075 975 l 3075 1950 l 1425 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4500 975 m 6075 975 l 6075 1950 l 4500 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +3763 1852 m 3915 1852 l 3915 1792 l 3763 1792 l 3763 1792 l 3883 1822 l 3763 1852 l cp +eoclip +n 3525 1822 m + 3900 1822 l gs col0 s gr gr + +% arrowhead +n 3763 1852 m 3883 1822 l 3763 1792 l col0 s +% Polyline +gs clippath +3763 1552 m 3915 1552 l 3915 1492 l 3763 1492 l 3763 1492 l 3883 1522 l 3763 1552 l cp +eoclip +n 3525 1522 m + 3900 1522 l gs col0 s gr gr + +% arrowhead +n 3763 1552 m 3883 1522 l 3763 1492 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +5162 1417 m 5010 1417 l 5010 1477 l 5162 1477 l 5162 1477 l 5042 1447 l 5162 1417 l cp +eoclip +n 5400 1447 m + 5025 1447 l gs col0 s gr gr + +% arrowhead +n 5162 1417 m 5042 1447 l 5162 1477 l col0 s +% Polyline +gs clippath +5162 1117 m 5010 1117 l 5010 1177 l 5162 1177 l 5162 1177 l 5042 1147 l 5162 1117 l cp +eoclip +n 5400 1147 m + 5025 1147 l gs col0 s gr gr + +% arrowhead +n 5162 1117 m 5042 1147 l 5162 1177 l col0 s +% Polyline +gs clippath +3158 1775 m 3310 1774 l 3309 1714 l 3157 1715 l 3157 1715 l 3278 1745 l 3158 1775 l cp +eoclip +n 2100 1747 m + 3295 1745 l gs col0 s gr gr + +% arrowhead +n 3158 1775 m 3278 1745 l 3157 1715 l col0 s +% Polyline +gs clippath +4409 1725 m 4257 1724 l 4256 1784 l 4408 1785 l 4408 1785 l 4289 1755 l 4409 1725 l cp +eoclip +n 5467 1757 m + 4272 1755 l gs col0 s gr gr + +% arrowhead +n 4409 1725 m 4289 1755 l 4408 1785 l col0 s +% Polyline +gs clippath +1303 1177 m 1455 1177 l 1455 1117 l 1303 1117 l 1303 1117 l 1423 1147 l 1303 1177 l cp +eoclip +n 1080 1147 m + 1440 1147 l gs col0 s gr gr + +% arrowhead +n 1303 1177 m 1423 1147 l 1303 1117 l col0 s +% Polyline +gs clippath +6227 1117 m 6075 1117 l 6075 1177 l 6227 1177 l 6227 1177 l 6107 1147 l 6227 1117 l cp +eoclip +n 6435 1147 m + 6090 1147 l gs col0 s gr gr + +% arrowhead +n 6227 1117 m 6107 1147 l 6227 1177 l col0 s +/Helvetica ff 183.33 scf sf +3450 1875 m +gs 1 -1 sc (y) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1575 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +3450 1575 m +gs 1 -1 sc (x) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3975 1875 m +gs 1 -1 sc (0.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (width) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (height) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc (100.0) col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (corner) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc (200.0) col0 sh gr +/Helvetica ff 183.33 scf sf +1050 1200 m +gs 1 -1 sc (box) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4575 1200 m +gs 1 -1 sc (100.0) col0 sh gr +/Helvetica ff 183.33 scf sf +4575 1500 m +gs 1 -1 sc (200.0) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1200 m +gs 1 -1 sc (width) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1500 m +gs 1 -1 sc (height) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1800 m +gs 1 -1 sc (corner) col0 sh gr +/Helvetica ff 183.33 scf sf +6450 1200 m +gs 1 -1 sc (box2) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/rectangle2.fig b/book_kr/figs/rectangle2.fig new file mode 100644 index 0000000..8eb0f4a --- /dev/null +++ b/book_kr/figs/rectangle2.fig @@ -0,0 +1,67 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3300 1350 4275 1950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1822 3900 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3525 1522 3900 1522 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3300 1350 4275 1350 4275 1950 3300 1950 3300 1350 +4 2 0 50 0 16 11 0.0000 4 150 105 3450 1875 y\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1575 0.0\001 +4 2 0 50 0 16 11 0.0000 4 105 90 3450 1575 x\001 +4 0 0 50 0 16 11 0.0000 4 135 255 3975 1875 0.0\001 +-6 +6 2100 1050 2475 1500 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +-6 +6 5025 1050 5400 1500 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 1447 5025 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5400 1147 5025 1147 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 3295 1745 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5467 1757 4272 1755 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1080 1147 1440 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 3075 975 3075 1950 1425 1950 1425 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6435 1147 6090 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4500 975 6075 975 6075 1950 4500 1950 4500 975 +4 2 0 50 0 16 11 0.0000 4 135 435 2025 1200 width\001 +4 2 0 50 0 16 11 0.0000 4 180 510 2025 1500 height\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1200 100.0\001 +4 2 0 50 0 16 11 0.0000 4 105 540 2025 1800 corner\001 +4 0 0 50 0 16 11 0.0000 4 135 465 2550 1500 200.0\001 +4 2 0 50 0 16 11 0.0000 4 135 300 1050 1200 box\001 +4 0 0 50 0 16 11 0.0000 4 135 465 4575 1200 100.0\001 +4 0 0 50 0 16 11 0.0000 4 135 465 4575 1500 200.0\001 +4 0 0 50 0 16 11 0.0000 4 135 435 5475 1200 width\001 +4 0 0 50 0 16 11 0.0000 4 180 510 5475 1500 height\001 +4 0 0 50 0 16 11 0.0000 4 105 540 5475 1800 corner\001 +4 0 0 50 0 16 11 0.0000 4 135 405 6450 1200 box2\001 diff --git a/book_kr/figs/rectangle2.pdf b/book_kr/figs/rectangle2.pdf new file mode 100644 index 0000000..3197c5c Binary files /dev/null and b/book_kr/figs/rectangle2.pdf differ diff --git a/book_kr/figs/stack.eps b/book_kr/figs/stack.eps new file mode 100644 index 0000000..c377a9b --- /dev/null +++ b/book_kr/figs/stack.eps @@ -0,0 +1,219 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:38:05 2015 +%%BoundingBox: 0 0 284 141 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 141 moveto 0 0 lineto 284 0 lineto 284 141 lineto closepath clip newpath +-14.6 198.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1424 2925 m 4950 2925 l 4950 3300 l 1424 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 1800 m 4950 1800 l 4950 2775 l 1425 2775 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1425 975 m 4950 975 l 4950 1650 l 1425 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 2302 m 2490 2302 l 2490 2242 l 2338 2242 l 2338 2242 l 2458 2272 l 2338 2302 l cp +eoclip +n 2100 2272 m + 2475 2272 l gs col0 s gr gr + +% arrowhead +n 2338 2302 m 2458 2272 l 2338 2242 l col0 s +% Polyline +gs clippath +2338 2602 m 2490 2602 l 2490 2542 l 2338 2542 l 2338 2542 l 2458 2572 l 2338 2602 l cp +eoclip +n 2100 2572 m + 2475 2572 l gs col0 s gr gr + +% arrowhead +n 2338 2602 m 2458 2572 l 2338 2542 l col0 s +% Polyline +gs clippath +2338 2002 m 2490 2002 l 2490 1942 l 2338 1942 l 2338 1942 l 2458 1972 l 2338 2002 l cp +eoclip +n 2100 1972 m + 2475 1972 l gs col0 s gr gr + +% arrowhead +n 2338 2002 m 2458 1972 l 2338 1942 l col0 s +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +2330 3127 m 2482 3127 l 2482 3067 l 2330 3067 l 2330 3067 l 2450 3097 l 2330 3127 l cp +eoclip +n 2092 3097 m + 2467 3097 l gs col0 s gr gr + +% arrowhead +n 2330 3127 m 2450 3097 l 2330 3067 l col0 s +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (line1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (line2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc ('tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2025 m +gs 1 -1 sc (part1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2325 m +gs 1 -1 sc (part2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 2625 m +gs 1 -1 sc (cat) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2017 3150 m +gs 1 -1 sc (bruce) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('Bing tiddle ') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2025 m +gs 1 -1 sc ('Bing tiddle ') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2325 m +gs 1 -1 sc ('tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 2625 m +gs 1 -1 sc ('Bing tiddle tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 3150 m +gs 1 -1 sc ('Bing tiddle tiddle bang.') col0 sh gr +/Helvetica ff 183.33 scf sf +1275 2325 m +gs 1 -1 sc (cat_twice) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1275 3150 m +gs 1 -1 sc (print_twice) dup sw pop neg 0 rm col0 sh gr +% __main__ +/Helvetica ff 183.33 scf sf +1275 1350 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/stack.fig b/book_kr/figs/stack.fig new file mode 100644 index 0000000..a8e4b9e --- /dev/null +++ b/book_kr/figs/stack.fig @@ -0,0 +1,51 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2100 1897 2475 2647 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2272 2475 2272 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2572 2475 2572 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1972 2475 1972 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2092 3097 2467 3097 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1424 2925 4950 2925 4950 3300 1424 3300 1424 2925 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 1800 4950 1800 4950 2775 1425 2775 1425 1800 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 4950 975 4950 1650 1425 1650 1425 975 +4 2 0 50 0 16 11 0.0000 4 135 450 2025 1200 line1\001 +4 2 0 50 0 16 11 0.0000 4 135 450 2025 1500 line2\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 1500 'tiddle bang.'\001 +4 2 0 50 0 16 11 0.0000 4 165 450 2025 2025 part1\001 +4 2 0 50 0 16 11 0.0000 4 165 450 2025 2325 part2\001 +4 2 0 50 0 16 11 0.0000 4 120 270 2025 2625 cat\001 +4 2 0 50 0 16 11 0.0000 4 135 450 2017 3150 bruce\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 1200 'Bing tiddle '\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 2025 'Bing tiddle '\001 +4 0 0 50 0 16 11 0.0000 4 165 1260 2550 2325 'tiddle bang.'\001 +4 0 0 50 0 16 11 0.0000 4 165 2340 2550 2625 'Bing tiddle tiddle bang.'\001 +4 0 0 50 0 16 11 0.0000 4 165 2340 2550 3150 'Bing tiddle tiddle bang.'\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1275 2325 cat_twice\001 +4 2 0 50 0 16 11 0.0000 4 150 990 1275 3150 print_twice\001 +# __main__ +4 2 0 50 0 16 11 0.0000 4 135 720 1275 1350 __main__\001 diff --git a/book_kr/figs/stack.pdf b/book_kr/figs/stack.pdf new file mode 100644 index 0000000..f402410 Binary files /dev/null and b/book_kr/figs/stack.pdf differ diff --git a/book_kr/figs/stack2.eps b/book_kr/figs/stack2.eps new file mode 100644 index 0000000..0e82547 --- /dev/null +++ b/book_kr/figs/stack2.eps @@ -0,0 +1,200 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5d +%%CreationDate: Mon Oct 19 10:20:09 2015 +%%BoundingBox: 0 0 139 150 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 150 moveto 0 0 lineto 139 0 lineto 139 150 lineto closepath clip newpath +-42.7 176.2 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1800 450 m 3000 450 l 3000 825 l 1800 825 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 975 m 3000 975 l 3000 1350 l 1800 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 1500 m 3000 1500 l 3000 1875 l 1800 1875 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2025 m 3000 2025 l 3000 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2550 m 3000 2550 l 3000 2925 l 1800 2925 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2413 1177 m 2565 1177 l 2565 1117 l 2413 1117 l 2413 1117 l 2533 1147 l 2413 1177 l cp +eoclip +n 2175 1147 m + 2550 1147 l gs col0 s gr gr + +% arrowhead +n 2413 1177 m 2533 1147 l 2413 1117 l col0 s +% Polyline +gs clippath +2413 1702 m 2565 1702 l 2565 1642 l 2413 1642 l 2413 1642 l 2533 1672 l 2413 1702 l cp +eoclip +n 2175 1672 m + 2550 1672 l gs col0 s gr gr + +% arrowhead +n 2413 1702 m 2533 1672 l 2413 1642 l col0 s +% Polyline +gs clippath +2413 2227 m 2565 2227 l 2565 2167 l 2413 2167 l 2413 2167 l 2533 2197 l 2413 2227 l cp +eoclip +n 2175 2197 m + 2550 2197 l gs col0 s gr gr + +% arrowhead +n 2413 2227 m 2533 2197 l 2413 2167 l col0 s +% Polyline +gs clippath +2413 2752 m 2565 2752 l 2565 2692 l 2413 2692 l 2413 2692 l 2533 2722 l 2413 2752 l cp +eoclip +n 2175 2722 m + 2550 2722 l gs col0 s gr gr + +% arrowhead +n 2413 2752 m 2533 2722 l 2413 2692 l col0 s +/Helvetica ff 183.33 scf sf +1650 675 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1200 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1725 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2775 m +gs 1 -1 sc (countdown) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1200 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1200 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1725 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2250 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2775 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2775 m +gs 1 -1 sc (0) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/stack2.fig b/book_kr/figs/stack2.fig new file mode 100644 index 0000000..4826deb --- /dev/null +++ b/book_kr/figs/stack2.fig @@ -0,0 +1,44 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 450 3000 450 3000 825 1800 825 1800 450 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 3000 975 3000 1350 1800 1350 1800 975 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1500 3000 1500 3000 1875 1800 1875 1800 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2025 3000 2025 3000 2400 1800 2400 1800 2025 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2550 3000 2550 3000 2925 1800 2925 1800 2550 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1147 2550 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1672 2550 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2197 2550 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2722 2550 2722 +4 2 0 50 0 16 11 0.0000 4 135 720 1650 675 __main__\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1200 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1725 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2250 countdown\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2775 countdown\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1200 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1200 3\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1725 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1725 2\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2250 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2775 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2775 0\001 diff --git a/book_kr/figs/stack2.pdf b/book_kr/figs/stack2.pdf new file mode 100644 index 0000000..8625e86 Binary files /dev/null and b/book_kr/figs/stack2.pdf differ diff --git a/book_kr/figs/stack3.eps b/book_kr/figs/stack3.eps new file mode 100644 index 0000000..b894ef6 --- /dev/null +++ b/book_kr/figs/stack3.eps @@ -0,0 +1,342 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack3.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:39:42 2015 +%%BoundingBox: 0 0 319 150 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 150 moveto 0 0 lineto 319 0 lineto 319 150 lineto closepath clip newpath +-48.2 176.2 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1800 975 m 5700 975 l 5700 1350 l 1800 1350 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 1500 m 5700 1500 l 5700 1875 l 1800 1875 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2025 m 5700 2025 l 5700 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 2550 m 5700 2550 l 5700 2925 l 1800 2925 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 450 m 5700 450 l 5700 825 l 1800 825 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2413 1177 m 2565 1177 l 2565 1117 l 2413 1117 l 2413 1117 l 2533 1147 l 2413 1177 l cp +eoclip +n 2175 1147 m + 2550 1147 l gs col0 s gr gr + +% arrowhead +n 2413 1177 m 2533 1147 l 2413 1117 l col0 s +% Polyline +gs clippath +3913 1177 m 4065 1177 l 4065 1117 l 3913 1117 l 3913 1117 l 4033 1147 l 3913 1177 l cp +eoclip +n 3675 1147 m + 4050 1147 l gs col0 s gr gr + +% arrowhead +n 3913 1177 m 4033 1147 l 3913 1117 l col0 s +% Polyline +gs clippath +3913 1702 m 4065 1702 l 4065 1642 l 3913 1642 l 3913 1642 l 4033 1672 l 3913 1702 l cp +eoclip +n 3675 1672 m + 4050 1672 l gs col0 s gr gr + +% arrowhead +n 3913 1702 m 4033 1672 l 3913 1642 l col0 s +% Polyline +gs clippath +3913 2227 m 4065 2227 l 4065 2167 l 3913 2167 l 3913 2167 l 4033 2197 l 3913 2227 l cp +eoclip +n 3675 2197 m + 4050 2197 l gs col0 s gr gr + +% arrowhead +n 3913 2227 m 4033 2197 l 3913 2167 l col0 s +% Arc +gs clippath +5839 2262 m 5694 2216 l 5676 2274 l 5821 2319 l 5821 2319 l 5716 2255 l 5839 2262 l cp +eoclip +n 5700.0 2475.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 2262 m 5716 2255 l 5821 2319 l col0 s +% Arc +gs clippath +5839 1737 m 5694 1691 l 5676 1749 l 5821 1794 l 5821 1794 l 5716 1730 l 5839 1737 l cp +eoclip +n 5700.0 1950.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 1737 m 5716 1730 l 5821 1794 l col0 s +% Arc +gs clippath +5839 687 m 5694 641 l 5676 699 l 5821 744 l 5821 744 l 5716 680 l 5839 687 l cp +eoclip +n 5700.0 900.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 687 m 5716 680 l 5821 744 l col0 s +% Arc +gs clippath +5839 1212 m 5694 1166 l 5676 1224 l 5821 1269 l 5821 1269 l 5716 1205 l 5839 1212 l cp +eoclip +n 5700.0 1425.0 225.0 90.0000 -90.0000 arcn +gs col0 s gr + gr + +% arrowhead +n 5839 1212 m 5716 1205 l 5821 1269 l col0 s +% Polyline +gs clippath +2413 1702 m 2565 1702 l 2565 1642 l 2413 1642 l 2413 1642 l 2533 1672 l 2413 1702 l cp +eoclip +n 2175 1672 m + 2550 1672 l gs col0 s gr gr + +% arrowhead +n 2413 1702 m 2533 1672 l 2413 1642 l col0 s +% Polyline +gs clippath +2413 2227 m 2565 2227 l 2565 2167 l 2413 2167 l 2413 2167 l 2533 2197 l 2413 2227 l cp +eoclip +n 2175 2197 m + 2550 2197 l gs col0 s gr gr + +% arrowhead +n 2413 2227 m 2533 2197 l 2413 2167 l col0 s +% Polyline +gs clippath +2413 2752 m 2565 2752 l 2565 2692 l 2413 2692 l 2413 2692 l 2533 2722 l 2413 2752 l cp +eoclip +n 2175 2722 m + 2550 2722 l gs col0 s gr gr + +% arrowhead +n 2413 2752 m 2533 2722 l 2413 2692 l col0 s +% Polyline +gs clippath +5263 2227 m 5415 2227 l 5415 2167 l 5263 2167 l 5263 2167 l 5383 2197 l 5263 2227 l cp +eoclip +n 5025 2197 m + 5400 2197 l gs col0 s gr gr + +% arrowhead +n 5263 2227 m 5383 2197 l 5263 2167 l col0 s +% Polyline +gs clippath +5263 1702 m 5415 1702 l 5415 1642 l 5263 1642 l 5263 1642 l 5383 1672 l 5263 1702 l cp +eoclip +n 5025 1672 m + 5400 1672 l gs col0 s gr gr + +% arrowhead +n 5263 1702 m 5383 1672 l 5263 1642 l col0 s +% Polyline +gs clippath +5263 1177 m 5415 1177 l 5415 1117 l 5263 1117 l 5263 1117 l 5383 1147 l 5263 1177 l cp +eoclip +n 5025 1147 m + 5400 1147 l gs col0 s gr gr + +% arrowhead +n 5263 1177 m 5383 1147 l 5263 1117 l col0 s +/Helvetica ff 183.33 scf sf +2100 1200 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1200 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 1200 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1200 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 1725 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1725 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +3600 2250 m +gs 1 -1 sc (recurse) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4125 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 675 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1200 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1725 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2250 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 2775 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 2775 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 183.33 scf sf +1650 1725 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2250 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +1650 2775 m +gs 1 -1 sc (factorial) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +6000 2550 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 2025 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 1500 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +6000 975 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 183.33 scf sf +4950 2250 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1725 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 183.33 scf sf +5475 1200 m +gs 1 -1 sc (6) col0 sh gr +/Helvetica ff 183.33 scf sf +4950 1200 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4950 1725 m +gs 1 -1 sc (result) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/stack3.fig b/book_kr/figs/stack3.fig new file mode 100644 index 0000000..623fa28 --- /dev/null +++ b/book_kr/figs/stack3.fig @@ -0,0 +1,96 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 2475.000 5700 2700 5925 2475 5700 2250 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 1950.000 5700 2175 5925 1950 5700 1725 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 900.000 5700 1125 5925 900 5700 675 + 0 0 1.00 60.00 120.00 +5 1 0 1 0 7 50 0 -1 0.000 0 1 1 0 5700.000 1425.000 5700 1650 5925 1425 5700 1200 + 0 0 1.00 60.00 120.00 +6 1950 1050 2775 1200 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1147 2550 1147 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1200 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1200 3\001 +-6 +6 3075 1050 4275 2250 +6 3075 1050 4275 1200 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 1147 4050 1147 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 1200 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 1200 2\001 +-6 +6 3075 1575 4275 1725 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 1672 4050 1672 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 1725 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 1725 1\001 +-6 +6 3075 2100 4275 2250 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3675 2197 4050 2197 +4 2 0 50 0 16 11 0.0000 4 90 630 3600 2250 recurse\001 +4 0 0 50 0 16 11 0.0000 4 135 90 4125 2250 1\001 +-6 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1672 2550 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2197 2550 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2722 2550 2722 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 975 5700 975 5700 1350 1800 1350 1800 975 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1500 5700 1500 5700 1875 1800 1875 1800 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2025 5700 2025 5700 2400 1800 2400 1800 2025 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 2550 5700 2550 5700 2925 1800 2925 1800 2550 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 450 5700 450 5700 825 1800 825 1800 450 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 2197 5400 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 1672 5400 1672 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5025 1147 5400 1147 +4 2 0 50 0 16 11 0.0000 4 135 720 1650 675 __main__\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1200 factorial\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 1725 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 1725 2\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2250 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2775 n\001 +4 0 0 50 0 16 11 0.0000 4 135 90 2625 2775 0\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 1725 factorial\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2250 factorial\001 +4 2 0 50 0 16 11 0.0000 4 135 810 1650 2775 factorial\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 2550 1\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 2025 1\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 1500 2\001 +4 0 0 50 0 16 11 0.0000 4 135 90 6000 975 6\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 2250 result\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 1725 2\001 +4 0 0 50 0 16 11 0.0000 4 135 90 5475 1200 6\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 1200 result\001 +4 2 0 50 0 16 11 0.0000 4 135 540 4950 1725 result\001 diff --git a/book_kr/figs/stack3.pdf b/book_kr/figs/stack3.pdf new file mode 100644 index 0000000..456bd93 Binary files /dev/null and b/book_kr/figs/stack3.pdf differ diff --git a/book_kr/figs/stack4.eps b/book_kr/figs/stack4.eps new file mode 100644 index 0000000..430a3d4 --- /dev/null +++ b/book_kr/figs/stack4.eps @@ -0,0 +1,173 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: stack4.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Fri Dec 14 14:02:13 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 222 101 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 101 moveto 0 0 lineto 222 0 lineto 222 101 lineto closepath clip newpath +-40.0 145.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1800 1725 m 4350 1725 l 4350 2400 l 1800 2400 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 1800 750 m 4350 750 l 4350 1575 l 1800 1575 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline + [15 45] 45 sd +n 2175 1125 m + 2550 1125 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 2175 1125 m + 2550 900 l gs col0 s gr [] 0 sd +% Polyline +gs clippath +2547 1383 m 2578 1331 l 2448 1253 l 2536 1341 l 2417 1304 l cp +eoclip +n 2175 1125 m + 2550 1350 l gs col0 s gr gr + +% arrowhead +n 2417 1304 m 2536 1341 l 2448 1253 l col0 s +/Helvetica ff 165.00 scf sf +2100 1200 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2625 1200 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +2625 975 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2625 1425 m +gs 1 -1 sc (3) col0 sh gr +% Polyline +gs clippath +2565 2130 m 2565 2070 l 2413 2070 l 2533 2100 l 2413 2130 l cp +eoclip +n 2175 2100 m + 2550 2100 l gs col0 s gr gr + +% arrowhead +n 2413 2130 m 2533 2100 l 2413 2070 l col0 s +% Polyline + [15 45] 45 sd +n 3300 2100 m + 3675 1875 l gs col0 s gr [] 0 sd +% Polyline +gs clippath +3690 2130 m 3690 2070 l 3538 2070 l 3658 2100 l 3538 2130 l cp +eoclip +n 3300 2100 m + 3675 2100 l gs col0 s gr gr + +% arrowhead +n 3538 2130 m 3658 2100 l 3538 2070 l col0 s +/Helvetica ff 165.00 scf sf +2100 2175 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2625 2175 m +gs 1 -1 sc (3) col0 sh gr +/Helvetica ff 165.00 scf sf +3225 2175 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3750 2175 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +3750 1950 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +675 975 m +gs 1 -1 sc (printMultTable) col0 sh gr +/Helvetica ff 165.00 scf sf +750 1950 m +gs 1 -1 sc (printMultiples) col0 sh gr +$F2psEnd +rs diff --git a/book_kr/figs/stack4.fig b/book_kr/figs/stack4.fig new file mode 100644 index 0000000..d79f4c7 --- /dev/null +++ b/book_kr/figs/stack4.fig @@ -0,0 +1,41 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2025 825 2775 1425 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2175 1125 2550 1125 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 2175 1125 2550 900 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1125 2550 1350 +4 2 0 50 0 16 11 0.0000 4 120 30 2100 1200 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 1200 2\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 975 1\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 1425 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 2100 2550 2100 +2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2 + 3300 2100 3675 1875 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3300 2100 3675 2100 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 1725 4350 1725 4350 2400 1800 2400 1800 1725 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1800 750 4350 750 4350 1575 1800 1575 1800 750 +4 2 0 50 0 16 11 0.0000 4 90 90 2100 2175 n\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2625 2175 3\001 +4 2 0 50 0 16 11 0.0000 4 120 30 3225 2175 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3750 2175 2\001 +4 0 0 50 0 16 11 0.0000 4 120 90 3750 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 150 975 675 975 printMultTable\001 +4 0 0 50 0 16 11 0.0000 4 150 930 750 1950 printMultiples\001 diff --git a/book_kr/figs/stack4.pdf b/book_kr/figs/stack4.pdf new file mode 100644 index 0000000..0797d08 Binary files /dev/null and b/book_kr/figs/stack4.pdf differ diff --git a/book_kr/figs/stack5.eps b/book_kr/figs/stack5.eps new file mode 100644 index 0000000..92a8a36 --- /dev/null +++ b/book_kr/figs/stack5.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: stack5.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5e +%%CreationDate: Mon Jul 27 11:40:36 2015 +%%BoundingBox: 0 0 238 74 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 74 moveto 0 0 lineto 238 0 lineto 238 74 lineto closepath clip newpath +-96.1 162.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 2700 1500 m 3675 1500 l 3675 1950 l 2700 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 2700 2100 m 3675 2100 l 3675 2550 l 2700 2550 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4125 1725 m 5550 1725 l 5550 2700 l 4125 2700 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +4813 2227 m 4965 2227 l 4965 2167 l 4813 2167 l 4813 2167 l 4933 2197 l 4813 2227 l cp +eoclip +n 4575 2197 m + 4950 2197 l gs col0 s gr gr + +% arrowhead +n 4813 2227 m 4933 2197 l 4813 2167 l col0 s +% Polyline +gs clippath +4813 2527 m 4965 2527 l 4965 2467 l 4813 2467 l 4813 2467 l 4933 2497 l 4813 2527 l cp +eoclip +n 4575 2497 m + 4950 2497 l gs col0 s gr gr + +% arrowhead +n 4813 2527 m 4933 2497 l 4813 2467 l col0 s +% Polyline +gs clippath +4813 1927 m 4965 1927 l 4965 1867 l 4813 1867 l 4813 1867 l 4933 1897 l 4813 1927 l cp +eoclip +n 4575 1897 m + 4950 1897 l gs col0 s gr gr + +% arrowhead +n 4813 1927 m 4933 1897 l 4813 1867 l col0 s +% Polyline +gs clippath +3953 2051 m 4079 1966 l 4045 1916 l 3919 2001 l 3919 2001 l 4036 1959 l 3953 2051 l cp +eoclip +n 3507 2318 m + 4050 1950 l gs col0 s gr gr + +% arrowhead +n 3953 2051 m 4036 1959 l 3919 2001 l col0 s +% Polyline +gs clippath +3910 1867 m 4056 1907 l 4072 1850 l 3926 1809 l 3926 1809 l 4034 1871 l 3910 1867 l cp +eoclip +n 3510 1725 m + 4050 1875 l gs col0 s gr gr + +% arrowhead +n 3910 1867 m 4034 1871 l 3926 1809 l col0 s +/Helvetica ff 183.33 scf sf +4500 1950 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4500 2250 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +4500 2550 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +5025 1950 m +gs 1 -1 sc ('a') col0 sh gr +/Helvetica ff 183.33 scf sf +5025 2250 m +gs 1 -1 sc ('b') col0 sh gr +/Helvetica ff 183.33 scf sf +5025 2550 m +gs 1 -1 sc ('c') col0 sh gr +/Helvetica ff 183.33 scf sf +4125 1650 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 183.33 scf sf +3450 2377 m +gs 1 -1 sc (t) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +3465 1770 m +gs 1 -1 sc (letters) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2632 2377 m +gs 1 -1 sc (delete_head) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2617 1770 m +gs 1 -1 sc (__main__) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/stack5.fig b/book_kr/figs/stack5.fig new file mode 100644 index 0000000..6db872a --- /dev/null +++ b/book_kr/figs/stack5.fig @@ -0,0 +1,41 @@ +#FIG 3.2 Produced by xfig version 3.2.5c +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 2197 4950 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 2497 4950 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4575 1897 4950 1897 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2700 1500 3675 1500 3675 1950 2700 1950 2700 1500 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 2700 2100 3675 2100 3675 2550 2700 2550 2700 2100 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3507 2318 4050 1950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3510 1725 4050 1875 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4125 1725 5550 1725 5550 2700 4125 2700 4125 1725 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 1950 0\001 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 2250 1\001 +4 2 0 50 0 16 11 0.0000 4 135 90 4500 2550 2\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 2250 'b'\001 +4 0 0 50 0 16 11 0.0000 4 135 270 5025 2550 'c'\001 +4 0 0 50 0 16 11 0.0000 4 135 360 4125 1650 list\001 +4 2 0 50 0 16 11 0.0000 4 120 90 3450 2377 t\001 +4 2 0 50 0 16 11 0.0000 4 135 630 3465 1770 letters\001 +4 2 0 50 0 16 11 0.0000 4 150 990 2632 2377 delete_head\001 +4 2 0 50 0 16 11 0.0000 4 135 720 2617 1770 __main__\001 diff --git a/book_kr/figs/stack5.pdf b/book_kr/figs/stack5.pdf new file mode 100644 index 0000000..b2b781b Binary files /dev/null and b/book_kr/figs/stack5.pdf differ diff --git a/book_kr/figs/state.eps b/book_kr/figs/state.eps new file mode 100644 index 0000000..eec6614 --- /dev/null +++ b/book_kr/figs/state.eps @@ -0,0 +1,143 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3c +%%CreationDate: Thu Dec 6 11:03:45 2001 +%%For: downey@rocky.wellesley.edu (Allen B. Downey) +%%BoundingBox: 0 0 173 61 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 61 moveto 0 0 lineto 173 0 lineto 173 61 lineto closepath clip newpath +-71.0 118.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +%%Page: 1 1 +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +% Polyline +7.500 slw +n 1200 975 m 4050 975 l 4050 1950 l 1200 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1777 m 2490 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (message) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1800 m +gs 1 -1 sc (pi) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ("What's up, Doc?") col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc (17) col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1800 m +gs 1 -1 sc (3.14159) col0 sh gr +$F2psEnd +rs diff --git a/book_kr/figs/state.fig b/book_kr/figs/state.fig new file mode 100644 index 0000000..512fe95 --- /dev/null +++ b/book_kr/figs/state.fig @@ -0,0 +1,60 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 525 750 3675 1950 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1950 1650 1950 1650 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 1125 1575 1125 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 1\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1800 2\001 +4 0 0 50 0 16 11 0.0000 4 120 615 2550 1200 'cheddar'\001 +4 0 0 50 0 16 11 0.0000 4 120 420 2550 1500 'edam'\001 +4 0 0 50 0 16 11 0.0000 4 150 480 2550 1800 'gouda'\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 900 list\001 +4 2 0 50 0 16 11 0.0000 4 120 540 1125 1200 cheeses\001 +-6 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 2325 3675 2325 3675 3300 1650 3300 1650 2325 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2497 2475 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 2475 1575 2475 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 3675 3675 3675 3675 4650 1650 4650 1650 3675 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1200 3825 1575 3825 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2850 2475 3075 +2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 + 2100 2797 2475 2797 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 2550 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 2850 1\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 2250 list\001 +4 0 0 50 0 16 11 0.0000 4 120 195 1650 3600 list\001 +4 2 0 50 0 16 11 0.0000 4 120 585 1125 2550 numbers\001 +4 2 0 50 0 16 11 0.0000 4 150 420 1125 3900 empty\001 +4 0 0 50 0 16 11 0.0000 4 120 180 2550 2550 17\001 +4 0 0 50 0 16 11 0.0000 4 120 270 2550 2850 123\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2550 3150 5\001 diff --git a/book_kr/figs/state.pdf b/book_kr/figs/state.pdf new file mode 100644 index 0000000..d820979 Binary files /dev/null and b/book_kr/figs/state.pdf differ diff --git a/book_kr/figs/state2.eps b/book_kr/figs/state2.eps new file mode 100644 index 0000000..b0b1931 --- /dev/null +++ b/book_kr/figs/state2.eps @@ -0,0 +1,158 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state2.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Thu May 10 10:30:01 2012 +%%BoundingBox: 0 0 312 60 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 60 moveto 0 0 lineto 312 0 lineto 312 60 lineto closepath clip newpath +-71.3 117.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1200 975 m 6375 975 l 6375 1950 l 1200 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2338 1477 m 2490 1477 l 2490 1417 l 2338 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2338 1777 m 2490 1777 l 2490 1717 l 2338 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2338 1177 m 2490 1177 l 2490 1117 l 2338 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 183.33 scf sf +2025 1200 m +gs 1 -1 sc (message) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1500 m +gs 1 -1 sc (n) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2025 1800 m +gs 1 -1 sc (pi) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1500 m +gs 1 -1 sc (17) col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1200 m +gs 1 -1 sc ('And now for something completely different') col0 sh gr +/Helvetica ff 183.33 scf sf +2550 1800 m +gs 1 -1 sc (3.1415926535897932) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/state2.fig b/book_kr/figs/state2.fig new file mode 100644 index 0000000..d18e62f --- /dev/null +++ b/book_kr/figs/state2.fig @@ -0,0 +1,28 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 2100 1072 2475 1822 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +-6 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1200 975 6375 975 6375 1950 1200 1950 1200 975 +4 2 0 50 0 16 11 0.0000 4 150 735 2025 1200 message\001 +4 2 0 50 0 16 11 0.0000 4 105 105 2025 1500 n\001 +4 2 0 50 0 16 11 0.0000 4 180 150 2025 1800 pi\001 +4 0 0 50 0 16 11 0.0000 4 135 210 2550 1500 17\001 +4 0 0 50 0 16 11 0.0000 4 180 3690 2550 1200 'And now for something completely different'\001 +4 0 0 50 0 16 11 0.0000 4 135 1830 2550 1800 3.1415926535897932\001 diff --git a/book_kr/figs/state2.pdf b/book_kr/figs/state2.pdf new file mode 100644 index 0000000..dedfcf4 Binary files /dev/null and b/book_kr/figs/state2.pdf differ diff --git a/book_kr/figs/state3.eps b/book_kr/figs/state3.eps new file mode 100644 index 0000000..9f499f6 --- /dev/null +++ b/book_kr/figs/state3.eps @@ -0,0 +1,162 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state3.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 10 08:51:50 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 132 78 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 78 moveto 0 0 lineto 132 0 lineto 132 78 lineto closepath clip newpath +-71.3 135.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1200 975 m 3375 975 l 3375 2250 l 1200 2250 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1777 m 2490 1717 l 2338 1717 l 2458 1747 l 2338 1777 l cp +eoclip +n 2100 1747 m + 2475 1747 l gs col0 s gr gr + +% arrowhead +n 2338 1777 m 2458 1747 l 2338 1717 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +% Polyline +gs clippath +2490 2055 m 2490 1995 l 2338 1995 l 2458 2025 l 2338 2055 l cp +eoclip +n 2100 2025 m + 2475 2025 l gs col0 s gr gr + +% arrowhead +n 2338 2055 m 2458 2025 l 2338 1995 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (word1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (word2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ('pots') col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc ('stop') col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1800 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1800 m +gs 1 -1 sc (0) col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2100 m +gs 1 -1 sc (j) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 2100 m +gs 1 -1 sc (3) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/state3.fig b/book_kr/figs/state3.fig new file mode 100644 index 0000000..076e294 --- /dev/null +++ b/book_kr/figs/state3.fig @@ -0,0 +1,31 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1747 2475 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 2025 2475 2025 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1200 975 3375 975 3375 2250 1200 2250 1200 975 +4 2 0 50 0 16 11 0.0000 4 120 450 2025 1200 word1\001 +4 2 0 50 0 16 11 0.0000 4 120 450 2025 1500 word2\001 +4 0 0 50 0 16 11 0.0000 4 150 375 2550 1200 'pots'\001 +4 0 0 50 0 16 11 0.0000 4 150 375 2550 1500 'stop'\001 +4 2 0 50 0 16 11 0.0000 4 120 30 2025 1800 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2550 1800 0\001 +4 2 0 50 0 16 11 0.0000 4 150 30 2025 2100 j\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2550 2100 3\001 diff --git a/book_kr/figs/state3.pdf b/book_kr/figs/state3.pdf new file mode 100644 index 0000000..f41407d Binary files /dev/null and b/book_kr/figs/state3.pdf differ diff --git a/book_kr/figs/state4.eps b/book_kr/figs/state4.eps new file mode 100644 index 0000000..1e34b6e --- /dev/null +++ b/book_kr/figs/state4.eps @@ -0,0 +1,170 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state4.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 10 08:59:59 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 245 56 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 56 moveto 0 0 lineto 245 0 lineto 245 56 lineto closepath clip newpath +-62.3 221.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1050 2775 m 5100 2775 l 5100 3675 l 1050 3675 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2340 3502 m 2340 3442 l 2188 3442 l 2308 3472 l 2188 3502 l cp +eoclip +n 1950 3472 m + 2325 3472 l gs col0 s gr gr + +% arrowhead +n 2188 3502 m 2308 3472 l 2188 3442 l col0 s +/Helvetica ff 165.00 scf sf +1875 3525 m +gs 1 -1 sc (i) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2400 3525 m +gs 1 -1 sc (0) col0 sh gr +% Polyline +gs clippath +4440 3480 m 4440 3420 l 4288 3420 l 4408 3450 l 4288 3480 l cp +eoclip +n 4050 3450 m + 4425 3450 l gs col0 s gr gr + +% arrowhead +n 4288 3480 m 4408 3450 l 4288 3420 l col0 s +/Helvetica ff 165.00 scf sf +3975 3525 m +gs 1 -1 sc (j) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4500 3525 m +gs 1 -1 sc (3) col0 sh gr +% Polyline +gs clippath +2340 2977 m 2340 2917 l 2188 2917 l 2308 2947 l 2188 2977 l cp +eoclip +n 1950 2947 m + 2325 2947 l gs col0 s gr gr + +% arrowhead +n 2188 2977 m 2308 2947 l 2188 2917 l col0 s +% Polyline +gs clippath +4140 2977 m 4140 2917 l 3988 2917 l 4108 2947 l 3988 2977 l cp +eoclip +n 3750 2947 m + 4125 2947 l gs col0 s gr gr + +% arrowhead +n 3988 2977 m 4108 2947 l 3988 2917 l col0 s +% Polyline + [15 45] 45 sd +n 2475 3300 m + 2475 3075 l gs col0 s gr [] 0 sd +% Polyline + [15 45] 45 sd +n 4537 3307 m + 4537 3082 l gs col0 s gr [] 0 sd +/Helvetica ff 165.00 scf sf +1875 3000 m +gs 1 -1 sc (word1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2400 3000 m +gs 1 -1 sc ('pots') col0 sh gr +/Helvetica ff 165.00 scf sf +3675 3000 m +gs 1 -1 sc (word2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4200 3000 m +gs 1 -1 sc ('stop') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/state4.fig b/book_kr/figs/state4.fig new file mode 100644 index 0000000..c6c35d2 --- /dev/null +++ b/book_kr/figs/state4.fig @@ -0,0 +1,39 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 1800 3375 2550 3525 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1950 3472 2325 3472 +4 2 0 50 0 16 11 0.0000 4 120 30 1875 3525 i\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2400 3525 0\001 +-6 +6 3900 3375 4650 3600 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4050 3450 4425 3450 +4 2 0 50 0 16 11 0.0000 4 150 30 3975 3525 j\001 +4 0 0 50 0 16 11 0.0000 4 120 90 4500 3525 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1950 2947 2325 2947 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2947 4125 2947 +2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 2475 3300 2475 3075 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1050 2775 5100 2775 5100 3675 1050 3675 1050 2775 +2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 4537 3307 4537 3082 +4 2 0 50 0 16 11 0.0000 4 120 450 1875 3000 word1\001 +4 0 0 50 0 16 11 0.0000 4 150 375 2400 3000 'pots'\001 +4 2 0 50 0 16 11 0.0000 4 120 450 3675 3000 word2\001 +4 0 0 50 0 16 11 0.0000 4 150 375 4200 3000 'stop'\001 diff --git a/book_kr/figs/state4.pdf b/book_kr/figs/state4.pdf new file mode 100644 index 0000000..455a16e Binary files /dev/null and b/book_kr/figs/state4.pdf differ diff --git a/book_kr/figs/state5.eps b/book_kr/figs/state5.eps new file mode 100644 index 0000000..d1e3ee5 --- /dev/null +++ b/book_kr/figs/state5.eps @@ -0,0 +1,321 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: state5.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 17 12:07:18 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 316 134 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 134 moveto 0 0 lineto 316 0 lineto 316 134 lineto closepath clip newpath +-27.0 225.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1125 1725 m 2400 1725 l 2400 3300 l 1125 3300 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 1725 m 5700 1725 l 5700 3000 l 4350 3000 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 3375 1725 m 4050 1725 l 4050 3750 l 3375 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +n 4350 3375 m 5700 3375 l 5700 3750 l 4350 3750 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +1965 2227 m 1965 2167 l 1813 2167 l 1933 2197 l 1813 2227 l cp +eoclip +n 1575 2197 m + 1950 2197 l gs col0 s gr gr + +% arrowhead +n 1813 2227 m 1933 2197 l 1813 2167 l col0 s +% Polyline +gs clippath +1965 1927 m 1965 1867 l 1813 1867 l 1933 1897 l 1813 1927 l cp +eoclip +n 1575 1897 m + 1950 1897 l gs col0 s gr gr + +% arrowhead +n 1813 1927 m 1933 1897 l 1813 1867 l col0 s +% Polyline +gs clippath +1140 1905 m 1140 1845 l 988 1845 l 1108 1875 l 988 1905 l cp +eoclip +n 750 1875 m + 1125 1875 l gs col0 s gr gr + +% arrowhead +n 988 1905 m 1108 1875 l 988 1845 l col0 s +% Polyline +gs clippath +1965 2827 m 1965 2767 l 1813 2767 l 1933 2797 l 1813 2827 l cp +eoclip +n 1575 2797 m + 1950 2797 l gs col0 s gr gr + +% arrowhead +n 1813 2827 m 1933 2797 l 1813 2767 l col0 s +% Polyline +gs clippath +1965 3127 m 1965 3067 l 1813 3067 l 1933 3097 l 1813 3127 l cp +eoclip +n 1575 3097 m + 1950 3097 l gs col0 s gr gr + +% arrowhead +n 1813 3127 m 1933 3097 l 1813 3067 l col0 s +% Polyline +gs clippath +1965 2527 m 1965 2467 l 1813 2467 l 1933 2497 l 1813 2527 l cp +eoclip +n 1575 2497 m + 1950 2497 l gs col0 s gr gr + +% arrowhead +n 1813 2527 m 1933 2497 l 1813 2467 l col0 s +/Helvetica ff 165.00 scf sf +1500 1950 m +gs 1 -1 sc ('a') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1950 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2250 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1125 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +450 1950 m +gs 1 -1 sc (hist) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2250 m +gs 1 -1 sc ('p') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2850 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 3150 m +gs 1 -1 sc ('o') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 3150 m +gs 1 -1 sc (1) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2550 m +gs 1 -1 sc ('r') dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 2550 m +gs 1 -1 sc (2) col0 sh gr +/Helvetica ff 165.00 scf sf +1500 2850 m +gs 1 -1 sc ('t') dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +5190 2227 m 5190 2167 l 5038 2167 l 5158 2197 l 5038 2227 l cp +eoclip +n 4800 2197 m + 5175 2197 l gs col0 s gr gr + +% arrowhead +n 5038 2227 m 5158 2197 l 5038 2167 l col0 s +% Polyline +gs clippath +5190 1927 m 5190 1867 l 5038 1867 l 5158 1897 l 5038 1927 l cp +eoclip +n 4800 1897 m + 5175 1897 l gs col0 s gr gr + +% arrowhead +n 5038 1927 m 5158 1897 l 5038 1867 l col0 s +% Polyline +gs clippath +5190 2527 m 5190 2467 l 5038 2467 l 5158 2497 l 5038 2527 l cp +eoclip +n 4800 2497 m + 5175 2497 l gs col0 s gr gr + +% arrowhead +n 5038 2527 m 5158 2497 l 5038 2467 l col0 s +% Polyline +gs clippath +5190 2827 m 5190 2767 l 5038 2767 l 5158 2797 l 5038 2827 l cp +eoclip +n 4800 2797 m + 5175 2797 l gs col0 s gr gr + +% arrowhead +n 5038 2827 m 5158 2797 l 5038 2767 l col0 s +/Helvetica ff 165.00 scf sf +4725 1950 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2250 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 1950 m +gs 1 -1 sc ('a') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2250 m +gs 1 -1 sc ('p') col0 sh gr +/Helvetica ff 165.00 scf sf +4350 1650 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2550 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2550 m +gs 1 -1 sc ('t') col0 sh gr +/Helvetica ff 165.00 scf sf +5250 2850 m +gs 1 -1 sc ('o') col0 sh gr +/Helvetica ff 165.00 scf sf +4725 2850 m +gs 1 -1 sc (3) dup sw pop neg 0 rm col0 sh gr +% Polyline +gs clippath +4365 1919 m 4364 1859 l 4212 1861 l 4333 1890 l 4213 1921 l cp +eoclip +n 3825 1897 m + 4350 1890 l gs col0 s gr gr + +% arrowhead +n 4213 1921 m 4333 1890 l 4212 1861 l col0 s +% Polyline +gs clippath +3390 1905 m 3390 1845 l 3238 1845 l 3358 1875 l 3238 1905 l cp +eoclip +n 3000 1875 m + 3375 1875 l gs col0 s gr gr + +% arrowhead +n 3238 1905 m 3358 1875 l 3238 1845 l col0 s +% Polyline +gs clippath +4365 3551 m 4364 3491 l 4212 3493 l 4333 3522 l 4213 3553 l cp +eoclip +n 3825 3529 m + 4350 3522 l gs col0 s gr gr + +% arrowhead +n 4213 3553 m 4333 3522 l 4212 3493 l col0 s +% Polyline +gs clippath +5190 3577 m 5190 3517 l 5038 3517 l 5158 3547 l 5038 3577 l cp +eoclip +n 4800 3547 m + 5175 3547 l gs col0 s gr gr + +% arrowhead +n 5038 3577 m 5158 3547 l 5038 3517 l col0 s +/Helvetica ff 165.00 scf sf +3750 1950 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +3375 1650 m +gs 1 -1 sc (dict) col0 sh gr +/Helvetica ff 165.00 scf sf +2700 1950 m +gs 1 -1 sc (inv) col0 sh gr +/Helvetica ff 165.00 scf sf +3750 3600 m +gs 1 -1 sc (2) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4725 3600 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +4350 3300 m +gs 1 -1 sc (list) col0 sh gr +/Helvetica ff 165.00 scf sf +5250 3600 m +gs 1 -1 sc ('r') col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/state5.fig b/book_kr/figs/state5.fig new file mode 100644 index 0000000..f1cf02e --- /dev/null +++ b/book_kr/figs/state5.fig @@ -0,0 +1,91 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 450 1500 2400 3300 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2197 1950 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 1897 1950 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 750 1875 1125 1875 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2797 1950 2797 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 3097 1950 3097 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1575 2497 1950 2497 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1125 1725 2400 1725 2400 3300 1125 3300 1125 1725 +4 2 0 50 0 16 11 0.0000 4 120 135 1500 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 1125 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 255 450 1950 hist\001 +4 2 0 50 0 16 11 0.0000 4 150 150 1500 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2850 1\001 +4 2 0 50 0 16 11 0.0000 4 120 150 1500 3150 'o'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 3150 1\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2550 'r'\001 +4 0 0 50 0 16 11 0.0000 4 120 90 2025 2550 2\001 +4 2 0 50 0 16 11 0.0000 4 120 120 1500 2850 't'\001 +-6 +6 4350 1500 5700 3000 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2197 5175 2197 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 1897 5175 1897 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2497 5175 2497 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 2797 5175 2797 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 1725 5700 1725 5700 3000 4350 3000 4350 1725 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 1950 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2250 1\001 +4 0 0 50 0 16 11 0.0000 4 120 135 5250 1950 'a'\001 +4 0 0 50 0 16 11 0.0000 4 150 150 5250 2250 'p'\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 1650 list\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2550 2\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 2550 't'\001 +4 0 0 50 0 16 11 0.0000 4 120 150 5250 2850 'o'\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 2850 3\001 +-6 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 1897 4350 1890 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 1875 3375 1875 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 3375 1725 4050 1725 4050 3750 3375 3750 3375 1725 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3825 3529 4350 3522 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4800 3547 5175 3547 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 4350 3375 5700 3375 5700 3750 4350 3750 4350 3375 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 1950 1\001 +4 0 0 50 0 16 11 0.0000 4 120 255 3375 1650 dict\001 +4 0 0 50 0 16 11 0.0000 4 120 210 2700 1950 inv\001 +4 2 0 50 0 16 11 0.0000 4 120 90 3750 3600 2\001 +4 2 0 50 0 16 11 0.0000 4 120 90 4725 3600 0\001 +4 0 0 50 0 16 11 0.0000 4 120 195 4350 3300 list\001 +4 0 0 50 0 16 11 0.0000 4 120 120 5250 3600 'r'\001 diff --git a/book_kr/figs/state5.pdf b/book_kr/figs/state5.pdf new file mode 100644 index 0000000..59a7dc8 Binary files /dev/null and b/book_kr/figs/state5.pdf differ diff --git a/book_kr/figs/time.eps b/book_kr/figs/time.eps new file mode 100644 index 0000000..4ba15b2 --- /dev/null +++ b/book_kr/figs/time.eps @@ -0,0 +1,173 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: time.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 23 14:46:23 2012 +%%BoundingBox: 0 0 139 73 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 73 moveto 0 0 lineto 139 0 lineto 139 73 lineto closepath clip newpath +-37.3 117.7 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +0 slj +0 slc +7.500 slw +n 1425 975 m 2925 975 l 2925 1950 l 1425 1950 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2413 1477 m 2565 1477 l 2565 1417 l 2413 1417 l 2413 1417 l 2533 1447 l 2413 1477 l cp +eoclip +n 2175 1447 m + 2550 1447 l gs col0 s gr gr + +% arrowhead +n 2413 1477 m 2533 1447 l 2413 1417 l col0 s +% Polyline +gs clippath +2405 1777 m 2557 1777 l 2557 1717 l 2405 1717 l 2405 1717 l 2525 1747 l 2405 1777 l cp +eoclip +n 2175 1747 m + 2542 1747 l gs col0 s gr gr + +% arrowhead +n 2405 1777 m 2525 1747 l 2405 1717 l col0 s +% Polyline +gs clippath +2413 1177 m 2565 1177 l 2565 1117 l 2413 1117 l 2413 1117 l 2533 1147 l 2413 1177 l cp +eoclip +n 2175 1147 m + 2550 1147 l gs col0 s gr gr + +% arrowhead +n 2413 1177 m 2533 1147 l 2413 1117 l col0 s +% Polyline +gs clippath +1275 1177 m 1427 1177 l 1427 1117 l 1275 1117 l 1275 1117 l 1395 1147 l 1275 1177 l cp +eoclip +n 1027 1147 m + 1412 1147 l gs col0 s gr gr + +% arrowhead +n 1275 1177 m 1395 1147 l 1275 1117 l col0 s +/Helvetica ff 183.33 scf sf +2625 1500 m +gs 1 -1 sc (59) col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1800 m +gs 1 -1 sc (30) col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1200 m +gs 1 -1 sc (hour) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1500 m +gs 1 -1 sc (minute) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2100 1800 m +gs 1 -1 sc (second) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 183.33 scf sf +2625 1200 m +gs 1 -1 sc (11) col0 sh gr +/Helvetica ff 183.33 scf sf +1425 900 m +gs 1 -1 sc (Time) col0 sh gr +/Helvetica ff 183.33 scf sf +975 1200 m +gs 1 -1 sc (time) dup sw pop neg 0 rm col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/time.fig b/book_kr/figs/time.fig new file mode 100644 index 0000000..d829e6b --- /dev/null +++ b/book_kr/figs/time.fig @@ -0,0 +1,31 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1447 2550 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1747 2542 1747 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2175 1147 2550 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1425 975 2925 975 2925 1950 1425 1950 1425 975 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1027 1147 1412 1147 +4 0 0 50 0 16 11 0.0000 4 120 180 2625 1500 59\001 +4 0 0 50 0 16 11 0.0000 4 120 180 2625 1800 30\001 +4 2 0 50 0 16 11 0.0000 4 120 315 2100 1200 hour\001 +4 2 0 50 0 16 11 0.0000 4 120 450 2100 1500 minute\001 +4 2 0 50 0 16 11 0.0000 4 120 495 2100 1800 second\001 +4 0 0 50 0 16 11 0.0000 4 120 180 2625 1200 11\001 +4 0 0 50 0 16 11 0.0000 4 120 300 1425 900 Time\001 +4 2 0 50 0 16 11 0.0000 4 120 285 975 1200 time\001 diff --git a/book_kr/figs/time.pdf b/book_kr/figs/time.pdf new file mode 100644 index 0000000..c2053de Binary files /dev/null and b/book_kr/figs/time.pdf differ diff --git a/book_kr/figs/towers.eps b/book_kr/figs/towers.eps new file mode 100644 index 0000000..f1fcd2a --- /dev/null +++ b/book_kr/figs/towers.eps @@ -0,0 +1,317 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: towers.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5a +%%CreationDate: Wed May 23 14:46:36 2012 +%%BoundingBox: 0 0 657 158 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 158 moveto 0 0 lineto 657 0 lineto 657 158 lineto closepath clip newpath +-64.4 176.5 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06299 0.06299 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +n 1035 2520 m 1305 2520 l 1305 2790 l 1035 2790 l + cp gs col0 s gr +% Polyline +n 1305 2520 m 1575 2520 l 1575 2790 l 1305 2790 l + cp gs col0 s gr +% Polyline +n 1620 2520 m 1890 2520 l 1890 2790 l 1620 2790 l + cp gs col0 s gr +% Polyline +n 1890 2520 m 2160 2520 l 2160 2790 l 1890 2790 l + cp gs col0 s gr +% Polyline +n 2205 2520 m 2475 2520 l 2475 2790 l 2205 2790 l + cp gs col0 s gr +% Polyline +n 2475 2520 m 2745 2520 l 2745 2790 l 2475 2790 l + cp gs col0 s gr +% Polyline +n 2745 2520 m 3015 2520 l 3015 2790 l 2745 2790 l + cp gs col0 s gr +% Polyline +n 3015 2520 m 3285 2520 l 3285 2790 l 3015 2790 l + cp gs col0 s gr +% Polyline +n 3330 2520 m 3600 2520 l 3600 2790 l 3330 2790 l + cp gs col0 s gr +% Polyline +n 3600 2520 m 3870 2520 l 3870 2790 l 3600 2790 l + cp gs col0 s gr +% Polyline +n 3870 2520 m 4140 2520 l 4140 2790 l 3870 2790 l + cp gs col0 s gr +% Polyline +n 4140 2520 m 4410 2520 l 4410 2790 l 4140 2790 l + cp gs col0 s gr +% Polyline +n 4410 2520 m 4680 2520 l 4680 2790 l 4410 2790 l + cp gs col0 s gr +% Polyline +n 4680 2520 m 4950 2520 l 4950 2790 l 4680 2790 l + cp gs col0 s gr +% Polyline +n 4950 2520 m 5220 2520 l 5220 2790 l 4950 2790 l + cp gs col0 s gr +% Polyline +n 5220 2520 m 5490 2520 l 5490 2790 l 5220 2790 l + cp gs col0 s gr +% Polyline +n 6975 2520 m 7245 2520 l 7245 2790 l 6975 2790 l + cp gs col0 s gr +% Polyline +n 7245 2520 m 7515 2520 l 7515 2790 l 7245 2790 l + cp gs col0 s gr +% Polyline +n 7560 2520 m 7830 2520 l 7830 2790 l 7560 2790 l + cp gs col0 s gr +% Polyline +n 7830 2520 m 8100 2520 l 8100 2790 l 7830 2790 l + cp gs col0 s gr +% Polyline +n 8145 2520 m 8415 2520 l 8415 2790 l 8145 2790 l + cp gs col0 s gr +% Polyline +n 8415 2520 m 8685 2520 l 8685 2790 l 8415 2790 l + cp gs col0 s gr +% Polyline +n 8685 2520 m 8955 2520 l 8955 2790 l 8685 2790 l + cp gs col0 s gr +% Polyline +n 8955 2520 m 9225 2520 l 9225 2790 l 8955 2790 l + cp gs col0 s gr +% Polyline +n 9270 2520 m 9540 2520 l 9540 2790 l 9270 2790 l + cp gs col0 s gr +% Polyline +n 9540 2520 m 9810 2520 l 9810 2790 l 9540 2790 l + cp gs col0 s gr +% Polyline +n 9810 2520 m 10080 2520 l 10080 2790 l 9810 2790 l + cp gs col0 s gr +% Polyline +n 10080 2520 m 10350 2520 l 10350 2790 l 10080 2790 l + cp gs col0 s gr +% Polyline +n 10350 2520 m 10620 2520 l 10620 2790 l 10350 2790 l + cp gs col0 s gr +% Polyline +n 10620 2520 m 10890 2520 l 10890 2790 l 10620 2790 l + cp gs col0 s gr +% Polyline +n 10890 2520 m 11160 2520 l 11160 2790 l 10890 2790 l + cp gs col0 s gr +% Polyline +n 11160 2520 m 11430 2520 l 11430 2790 l 11160 2790 l + cp gs col0 s gr +% Polyline +n 1620 2205 m 1890 2205 l 1890 2475 l 1620 2475 l + cp gs col0 s gr +% Polyline +n 1620 1935 m 1890 1935 l 1890 2205 l 1620 2205 l + cp gs col0 s gr +% Polyline +n 2205 2205 m 2475 2205 l 2475 2475 l 2205 2475 l + cp gs col0 s gr +% Polyline +n 2205 1935 m 2475 1935 l 2475 2205 l 2205 2205 l + cp gs col0 s gr +% Polyline +n 2205 1665 m 2475 1665 l 2475 1935 l 2205 1935 l + cp gs col0 s gr +% Polyline +n 2205 1395 m 2475 1395 l 2475 1665 l 2205 1665 l + cp gs col0 s gr +% Polyline +n 3330 2205 m 3600 2205 l 3600 2475 l 3330 2475 l + cp gs col0 s gr +% Polyline +n 3330 1935 m 3600 1935 l 3600 2205 l 3330 2205 l + cp gs col0 s gr +% Polyline +n 3330 1665 m 3600 1665 l 3600 1935 l 3330 1935 l + cp gs col0 s gr +% Polyline +n 3330 1395 m 3600 1395 l 3600 1665 l 3330 1665 l + cp gs col0 s gr +% Polyline +n 3330 1125 m 3600 1125 l 3600 1395 l 3330 1395 l + cp gs col0 s gr +% Polyline +n 3330 855 m 3600 855 l 3600 1125 l 3330 1125 l + cp gs col0 s gr +% Polyline +n 3330 585 m 3600 585 l 3600 855 l 3330 855 l + cp gs col0 s gr +% Polyline +n 3330 315 m 3600 315 l 3600 585 l 3330 585 l + cp gs col0 s gr +% Polyline +n 9540 2205 m 9540 2475 l 9270 2475 l 9270 2205 l + cp gs col0 s gr +% Polyline +n 9810 2205 m 9810 2475 l 9540 2475 l 9540 2205 l + cp gs col0 s gr +% Polyline +n 10080 2205 m 10080 2475 l 9810 2475 l 9810 2205 l + cp gs col0 s gr +% Polyline +n 10350 2205 m 10350 2475 l 10080 2475 l 10080 2205 l + cp gs col0 s gr +% Polyline +n 10620 2205 m 10620 2475 l 10350 2475 l 10350 2205 l + cp gs col0 s gr +% Polyline +n 10890 2205 m 10890 2475 l 10620 2475 l 10620 2205 l + cp gs col0 s gr +% Polyline +n 11160 2205 m 11160 2475 l 10890 2475 l 10890 2205 l + cp gs col0 s gr +% Polyline +n 11430 2205 m 11430 2475 l 11160 2475 l 11160 2205 l + cp gs col0 s gr +% Polyline +n 8415 2205 m 8415 2475 l 8145 2475 l 8145 2205 l + cp gs col0 s gr +% Polyline +n 8685 2205 m 8685 2475 l 8415 2475 l 8415 2205 l + cp gs col0 s gr +% Polyline +n 8955 2205 m 8955 2475 l 8685 2475 l 8685 2205 l + cp gs col0 s gr +% Polyline +n 9225 2205 m 9225 2475 l 8955 2475 l 8955 2205 l + cp gs col0 s gr +% Polyline +n 7830 2205 m 7830 2475 l 7560 2475 l 7560 2205 l + cp gs col0 s gr +% Polyline +n 8100 2205 m 8100 2475 l 7830 2475 l 7830 2205 l + cp gs col0 s gr +% Polyline +gs clippath +1933 2100 m 2085 2100 l 2085 2040 l 1933 2040 l 1933 2040 l 2053 2070 l 1933 2100 l cp +eoclip +n 1800 2070 m + 2070 2070 l gs col0 s gr gr + +% arrowhead +n 1933 2100 m 2053 2070 l 1933 2040 l col0 s +% Polyline +gs clippath +3643 480 m 3795 480 l 3795 420 l 3643 420 l 3643 420 l 3763 450 l 3643 480 l cp +eoclip +n 3510 450 m + 3780 450 l gs col0 s gr gr + +% arrowhead +n 3643 480 m 3763 450 l 3643 420 l col0 s +% Polyline +gs clippath +2518 1560 m 2670 1560 l 2670 1500 l 2518 1500 l 2518 1500 l 2638 1530 l 2518 1560 l cp +eoclip +n 2385 1530 m + 2655 1530 l gs col0 s gr gr + +% arrowhead +n 2518 1560 m 2638 1530 l 2518 1500 l col0 s +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff --git a/book_kr/figs/towers.fig b/book_kr/figs/towers.fig new file mode 100644 index 0000000..8760390 --- /dev/null +++ b/book_kr/figs/towers.fig @@ -0,0 +1,178 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 1035 2520 5490 2790 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1035 2520 1305 2520 1305 2790 1035 2790 1035 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1305 2520 1575 2520 1575 2790 1305 2790 1305 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 2520 1890 2520 1890 2790 1620 2790 1620 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1890 2520 2160 2520 2160 2790 1890 2790 1890 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 2520 2475 2520 2475 2790 2205 2790 2205 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2475 2520 2745 2520 2745 2790 2475 2790 2475 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2745 2520 3015 2520 3015 2790 2745 2790 2745 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3015 2520 3285 2520 3285 2790 3015 2790 3015 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 2520 3600 2520 3600 2790 3330 2790 3330 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 2520 3870 2520 3870 2790 3600 2790 3600 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3870 2520 4140 2520 4140 2790 3870 2790 3870 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4140 2520 4410 2520 4410 2790 4140 2790 4140 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4410 2520 4680 2520 4680 2790 4410 2790 4410 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4680 2520 4950 2520 4950 2790 4680 2790 4680 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4950 2520 5220 2520 5220 2790 4950 2790 4950 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5220 2520 5490 2520 5490 2790 5220 2790 5220 2520 +-6 +6 6975 2520 11430 2790 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6975 2520 7245 2520 7245 2790 6975 2790 6975 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 2520 7515 2520 7515 2790 7245 2790 7245 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7560 2520 7830 2520 7830 2790 7560 2790 7560 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7830 2520 8100 2520 8100 2790 7830 2790 7830 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8145 2520 8415 2520 8415 2790 8145 2790 8145 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8415 2520 8685 2520 8685 2790 8415 2790 8415 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8685 2520 8955 2520 8955 2790 8685 2790 8685 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8955 2520 9225 2520 9225 2790 8955 2790 8955 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9270 2520 9540 2520 9540 2790 9270 2790 9270 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9540 2520 9810 2520 9810 2790 9540 2790 9540 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9810 2520 10080 2520 10080 2790 9810 2790 9810 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10080 2520 10350 2520 10350 2790 10080 2790 10080 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10350 2520 10620 2520 10620 2790 10350 2790 10350 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10620 2520 10890 2520 10890 2790 10620 2790 10620 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10890 2520 11160 2520 11160 2790 10890 2790 10890 2520 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11160 2520 11430 2520 11430 2790 11160 2790 11160 2520 +-6 +6 1620 1935 1890 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 2205 1890 2205 1890 2475 1620 2475 1620 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 1935 1890 1935 1890 2205 1620 2205 1620 1935 +-6 +6 2205 1395 2475 2475 +6 2205 1935 2475 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 2205 2475 2205 2475 2475 2205 2475 2205 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1935 2475 1935 2475 2205 2205 2205 2205 1935 +-6 +6 2205 1395 2475 1935 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1665 2475 1665 2475 1935 2205 1935 2205 1665 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2205 1395 2475 1395 2475 1665 2205 1665 2205 1395 +-6 +-6 +6 3330 315 3600 2475 +6 3330 1935 3600 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 2205 3600 2205 3600 2475 3330 2475 3330 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1935 3600 1935 3600 2205 3330 2205 3330 1935 +-6 +6 3330 1395 3600 1935 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1665 3600 1665 3600 1935 3330 1935 3330 1665 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1395 3600 1395 3600 1665 3330 1665 3330 1395 +-6 +6 3330 855 3600 1395 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 1125 3600 1125 3600 1395 3330 1395 3330 1125 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 855 3600 855 3600 1125 3330 1125 3330 855 +-6 +6 3330 315 3600 855 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 585 3600 585 3600 855 3330 855 3330 585 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3330 315 3600 315 3600 585 3330 585 3330 315 +-6 +-6 +6 9270 2205 11430 2475 +6 9270 2205 9810 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9540 2205 9540 2475 9270 2475 9270 2205 9540 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9810 2205 9810 2475 9540 2475 9540 2205 9810 2205 +-6 +6 9810 2205 10350 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10080 2205 10080 2475 9810 2475 9810 2205 10080 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10350 2205 10350 2475 10080 2475 10080 2205 10350 2205 +-6 +6 10350 2205 10890 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10620 2205 10620 2475 10350 2475 10350 2205 10620 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10890 2205 10890 2475 10620 2475 10620 2205 10890 2205 +-6 +6 10890 2205 11430 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11160 2205 11160 2475 10890 2475 10890 2205 11160 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11430 2205 11430 2475 11160 2475 11160 2205 11430 2205 +-6 +-6 +6 8145 2205 9225 2475 +6 8145 2205 8685 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8415 2205 8415 2475 8145 2475 8145 2205 8415 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8685 2205 8685 2475 8415 2475 8415 2205 8685 2205 +-6 +6 8685 2205 9225 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8955 2205 8955 2475 8685 2475 8685 2205 8955 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9225 2205 9225 2475 8955 2475 8955 2205 9225 2205 +-6 +-6 +6 7560 2205 8100 2475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7830 2205 7830 2475 7560 2475 7560 2205 7830 2205 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8100 2205 8100 2475 7830 2475 7830 2205 8100 2205 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1800 2070 2070 2070 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3510 450 3780 450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2385 1530 2655 1530 diff --git a/book_kr/figs/towers.pdf b/book_kr/figs/towers.pdf new file mode 100644 index 0000000..8e49809 Binary files /dev/null and b/book_kr/figs/towers.pdf differ diff --git a/book_kr/figs/tuple1.eps b/book_kr/figs/tuple1.eps new file mode 100644 index 0000000..7949bda --- /dev/null +++ b/book_kr/figs/tuple1.eps @@ -0,0 +1,135 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: tuple1.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Tue Jul 31 12:27:49 2007 +%%For: downey@rocky.olin.edu (Allen Downey) +%%BoundingBox: 0 0 123 53 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 53 moveto 0 0 lineto 123 0 lineto 123 53 lineto closepath clip newpath +-98.3 99.7 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 51 +% Polyline +7.500 slw +n 1650 975 m 3675 975 l 3675 1650 l 1650 1650 l + cp gs col7 0.90 shd ef gr gs col0 s gr +% Polyline +gs clippath +2490 1477 m 2490 1417 l 2338 1417 l 2458 1447 l 2338 1477 l cp +eoclip +n 2100 1447 m + 2475 1447 l gs col0 s gr gr + +% arrowhead +n 2338 1477 m 2458 1447 l 2338 1417 l col0 s +% Polyline +gs clippath +2490 1177 m 2490 1117 l 2338 1117 l 2458 1147 l 2338 1177 l cp +eoclip +n 2100 1147 m + 2475 1147 l gs col0 s gr gr + +% arrowhead +n 2338 1177 m 2458 1147 l 2338 1117 l col0 s +/Helvetica ff 165.00 scf sf +2025 1200 m +gs 1 -1 sc (0) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2025 1500 m +gs 1 -1 sc (1) dup sw pop neg 0 rm col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1200 m +gs 1 -1 sc ('Cleese') col0 sh gr +/Helvetica ff 165.00 scf sf +2550 1500 m +gs 1 -1 sc ('John') col0 sh gr +/Helvetica ff 165.00 scf sf +1650 900 m +gs 1 -1 sc (tuple) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/book_kr/figs/tuple1.fig b/book_kr/figs/tuple1.fig new file mode 100644 index 0000000..fad2c3d --- /dev/null +++ b/book_kr/figs/tuple1.fig @@ -0,0 +1,22 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1447 2475 1447 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2100 1147 2475 1147 +2 2 0 1 0 7 51 0 18 0.000 0 0 -1 0 0 5 + 1650 975 3675 975 3675 1650 1650 1650 1650 975 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1200 0\001 +4 2 0 50 0 16 11 0.0000 4 120 90 2025 1500 1\001 +4 0 0 50 0 16 11 0.0000 4 120 510 2550 1200 'Cleese'\001 +4 0 0 50 0 16 11 0.0000 4 120 405 2550 1500 'John'\001 +4 0 0 50 0 16 11 0.0000 4 150 330 1650 900 tuple\001 diff --git a/book_kr/figs/tuple1.pdf b/book_kr/figs/tuple1.pdf new file mode 100644 index 0000000..df15839 Binary files /dev/null and b/book_kr/figs/tuple1.pdf differ diff --git a/book_kr/footer.html b/book_kr/footer.html new file mode 100644 index 0000000..82ed0cb --- /dev/null +++ b/book_kr/footer.html @@ -0,0 +1,55 @@ +

+Buy this book at Amazon.com + + + + + +

+

Are you using one of our books in a class?

We'd like to know +about it. Please consider filling out this short survey. + +

+
+ +

+Think DSP + +

+ + +

+Think Java + +

+ + +

+Think Bayes + +

+ + +

+Think Python 2e + + +

+ + +

+Think Stats 2e + +

+ + +

+Think Complexity + +

+ + + + + + diff --git a/book_kr/header.html b/book_kr/header.html new file mode 100644 index 0000000..85e9e99 --- /dev/null +++ b/book_kr/header.html @@ -0,0 +1,12 @@ + + + + + + +
+ + +

+Buy this book at Amazon.com + diff --git a/book_kr/hevea.sty b/book_kr/hevea.sty new file mode 100644 index 0000000..17b4e54 --- /dev/null +++ b/book_kr/hevea.sty @@ -0,0 +1,90 @@ +% hevea : hevea.sty +% This is a very basic style file for latex document to be processed +% with hevea. It contains definitions of LaTeX environment which are +% processed in a special way by the translator. +% Mostly : +% - latexonly, not processed by hevea, processed by latex. +% - htmlonly , the reverse. +% - rawhtml, to include raw HTML in hevea output. +% - toimage, to send text to the image file. +% The package also provides hevea logos, html related commands (ahref +% etc.), void cutting and image commands. +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hevea}[2002/01/11] +\RequirePackage{comment} +\newif\ifhevea\heveafalse +\@ifundefined{ifimagen}{\newif\ifimagen\imagenfalse} +\makeatletter% +\newcommand{\heveasmup}[2]{% +\raise #1\hbox{$\m@th$% + \csname S@\f@size\endcsname + \fontsize\sf@size 0% + \math@fontsfalse\selectfont +#2% +}}% +\DeclareRobustCommand{\hevea}{H\kern-.15em\heveasmup{.2ex}{E}\kern-.15emV\kern-.15em\heveasmup{.2ex}{E}\kern-.15emA}% +\DeclareRobustCommand{\hacha}{H\kern-.15em\heveasmup{.2ex}{A}\kern-.15emC\kern-.1em\heveasmup{.2ex}{H}\kern-.15emA}% +\DeclareRobustCommand{\html}{\protect\heveasmup{0.ex}{HTML}} +%%%%%%%%% Hyperlinks hevea style +\newcommand{\ahref}[2]{{#2}} +\newcommand{\ahrefloc}[2]{{#2}} +\newcommand{\aname}[2]{{#2}} +\newcommand{\ahrefurl}[1]{\texttt{#1}} +\newcommand{\footahref}[2]{#2\footnote{\texttt{#1}}} +\newcommand{\mailto}[1]{\texttt{#1}} +\newcommand{\imgsrc}[2][]{} +\newcommand{\home}[1]{\protect\raisebox{-.75ex}{\char126}#1} +\AtBeginDocument +{\@ifundefined{url} +{%url package is not loaded +\let\url\ahref\let\oneurl\ahrefurl\let\footurl\footahref} +{}} +%% Void cutting instructions +\newcounter{cuttingdepth} +\newcommand{\tocnumber}{} +\newcommand{\notocnumber}{} +\newcommand{\cuttingunit}{} +\newcommand{\cutdef}[2][]{} +\newcommand{\cuthere}[2]{} +\newcommand{\cutend}{} +\newcommand{\htmlhead}[1]{} +\newcommand{\htmlfoot}[1]{} +\newcommand{\htmlprefix}[1]{} +\newenvironment{cutflow}[1]{}{} +\newcommand{\cutname}[1]{} +\newcommand{\toplinks}[3]{} +\newcommand{\setlinkstext}[3]{} +\newcommand{\flushdef}[1]{} +\newcommand{\footnoteflush}[1]{} +%%%% Html only +\excludecomment{rawhtml} +\newcommand{\rawhtmlinput}[1]{} +\excludecomment{htmlonly} +%%%% Latex only +\newenvironment{latexonly}{}{} +\newenvironment{verblatex}{}{} +%%%% Image file stuff +\def\toimage{\endgroup} +\def\endtoimage{\begingroup\def\@currenvir{toimage}} +\def\verbimage{\endgroup} +\def\endverbimage{\begingroup\def\@currenvir{verbimage}} +\newcommand{\imageflush}[1][]{} +%%% Bgcolor definition +\newsavebox{\@bgcolorbin} +\newenvironment{bgcolor}[2][] + {\newcommand{\@mycolor}{#2}\begin{lrbox}{\@bgcolorbin}\vbox\bgroup} + {\egroup\end{lrbox}% + \begin{flushleft}% + \colorbox{\@mycolor}{\usebox{\@bgcolorbin}}% + \end{flushleft}} +%%% Style sheets macros, defined as no-ops +\newcommand{\newstyle}[2]{} +\newcommand{\addstyle}[1]{} +\newcommand{\setenvclass}[2]{} +\newcommand{\getenvclass}[1]{} +\newcommand{\loadcssfile}[1]{} +\newenvironment{divstyle}[1]{}{} +\newenvironment{cellstyle}[2]{}{} +\newif\ifexternalcss +%%% Postlude +\makeatother diff --git a/book_kr/htmlonly b/book_kr/htmlonly new file mode 100644 index 0000000..1731866 --- /dev/null +++ b/book_kr/htmlonly @@ -0,0 +1,28 @@ +% put commands here that should be used for the HTML +% version of the book but not Postscript or PDF + +\newcommand{\beforefig}{} +\newcommand{\afterfig}{} + +\newcommand{\beforeverb}{\blue \large} +\newcommand{\afterverb}{\black \normalsize} + +\newcommand{\adjustpage}[1]{} + +\newcommand{\clearemptydoublepage}{} +\newcommand{\blankpage}{} + +\newcommand{\spacing}{} +\newcommand{\endspacing}{} + +\newcommand{\frontmatter}{} +\newcommand{\mainmatter}{} + +\newcommand{\theoremstyle}[1]{} +\newcommand{\newtheoremstyle}[1]{} + +\newcommand{\vfill}{} + +\htmlhead{\rawhtmlinput{header.html}} + +\htmlfoot{\rawhtmlinput{footer.html}} \ No newline at end of file diff --git a/book_kr/latexonly b/book_kr/latexonly new file mode 100644 index 0000000..9f6786f --- /dev/null +++ b/book_kr/latexonly @@ -0,0 +1,102 @@ +\sloppy +%\setlength{\topmargin}{-0.375in} +%\setlength{\oddsidemargin}{0.0in} +%\setlength{\evensidemargin}{0.0in} + +% Uncomment these to center on 8.5 x 11 +%\setlength{\topmargin}{0.625in} +%\setlength{\oddsidemargin}{0.875in} +%\setlength{\evensidemargin}{0.875in} + +%\setlength{\textheight}{7.2in} + +\setlength{\headsep}{3ex} +\setlength{\parindent}{0.0in} +\setlength{\parskip}{1.7ex plus 0.5ex minus 0.5ex} +\renewcommand{\baselinestretch}{1.02} + +% see LaTeX Companion page 62 +\setlength{\topsep}{-0.0\parskip} +\setlength{\partopsep}{-0.5\parskip} +\setlength{\itemindent}{0.0in} +\setlength{\listparindent}{0.0in} + +% see LaTeX Companion page 26 +% these are copied from /usr/local/teTeX/share/texmf/tex/latex/base/book.cls +% all I changed is afterskip + +\makeatletter + +\renewcommand{\section}{\@startsection + {section} {1} {0mm}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {0.7ex \@plus.2ex}% + {\normalfont\Large\bfseries}} +\renewcommand\subsection{\@startsection {subsection}{2}{0mm}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {0.3ex \@plus .2ex}% + {\normalfont\large\bfseries}} +\renewcommand\subsubsection{\@startsection {subsubsection}{3}{0mm}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {0.3ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}} + +% The following line adds a little extra space to the column +% in which the Section numbers appear in the table of contents +\renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{3.0em}} +\setcounter{tocdepth}{1} + +\makeatother + +\newcommand{\beforefig}{\vspace{1.3\parskip}} +\newcommand{\afterfig}{\vspace{-0.2\parskip}} + +\newcommand{\beforeverb}{\vspace{0.6\parskip}} +\newcommand{\afterverb}{\vspace{0.6\parskip}} + +\newcommand{\adjustpage}[1]{\enlargethispage{#1\baselineskip}} + + +% Note: the following command seems to cause problems for Acroreader +% on Windows, so for now I am overriding it. +%\newcommand{\clearemptydoublepage}{ +% \newpage{\pagestyle{empty}\cleardoublepage}} +\newcommand{\clearemptydoublepage}{\cleardoublepage} + +%\newcommand{\blankpage}{\pagestyle{empty}\vspace*{1in}\newpage} +\newcommand{\blankpage}{\vspace*{1in}\newpage} + +% HEADERS + +\renewcommand{\chaptermark}[1]{\markboth{#1}{}} +\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}} + +\lhead[\fancyplain{}{\bfseries\thepage}]% + {\fancyplain{}{\bfseries\rightmark}} +\rhead[\fancyplain{}{\bfseries\leftmark}]% + {\fancyplain{}{\bfseries\thepage}} +\cfoot{} + +\pagestyle{fancyplain} + + +% turn off the rule under the header +%\setlength{\headrulewidth}{0pt} + +% the following is a brute-force way to prevent the headers +% from getting transformed into all-caps +\renewcommand\MakeUppercase{} + +% Exercise environment +\newtheoremstyle{myex}% name + {9pt}% Space above + {9pt}% Space below + {}% Body font + {}% Indent amount (empty = no indent, \parindent = para indent) + {\bfseries}% Thm head font + {}% Punctuation after thm head + {0.5em}% Space after thm head: " " = normal interword space; + % \newline = linebreak + {}% Thm head spec (can be left empty, meaning `normal') + +\theoremstyle{myex} diff --git a/book_kr/localdef.py b/book_kr/localdef.py new file mode 100644 index 0000000..14f7a5b --- /dev/null +++ b/book_kr/localdef.py @@ -0,0 +1,81 @@ +import plasTeX.Base as Base + +def idgen(): + """ Generate a unique ID """ + i = 1 + while 1: + yield 'a%.10d' % i + i += 1 + +idgen = idgen() + +class Eqn(Base.Command): + args = 'self' + +class Anchor(Base.Command): + args = 'label:str' + def invoke(self, tex): + Base.Command.invoke(self, tex) + self.ownerDocument.context.label(self.attributes['label'], self) + +class exercise(Base.Environment): + counter = 'exercise' + +class index(Base.Command): + args = 'termstring' + + def setEntry(self, s, seetype=0): + # TYPE_NORMAL = 0 + # TYPE_SEE = 1 + # TYPE_SEEALSO = 2 + if type(s) != type(''): + s = s.textContent + if s.count('!'): + priterm, secterm = s.split('!') + if priterm.count('@'): + prisort, primary = priterm.split('@') + else: + prisort, primary = None, priterm + if secterm.count('@'): + secsort, secondary = secterm.split('@') + else: + secsort, secondary = None, secterm + elif s.count('@'): + prisort, primary = s.split('@') + secsort, secondary = None, None + else: + prisort, primary = None, s + secsort, secondary = None, None + +# if secondary: +# self.ownerDocument.userdata.setdefault('index', []).append(\ +# Base.IndexEntry([primary, secondary], self, [prisort, secsort], None, type=seetype)) +# else: +# self.ownerDocument.userdata.setdefault('index', []).append(\ +# Base.IndexEntry([primary], self, [prisort], None, type=seetype)) + return prisort, primary, secsort, secondary + + def invoke(self, tex): + Base.Command.invoke(self, tex) + self.ownerDocument.context.label(idgen.next(), self) + p0,p1,s0,s1 = self.setEntry(self.attributes['termstring']) + if p0: + self.prisort = '%s' % p0 + if p1: + self.primary = '%s' % p1 + if s0: + self.secsort = '%s' % s0 + if s1: + self.secondary = '%s' % s1 + +class scriptN(Base.Command): + unicode = u'\U0001D4A9' + +class uxbar(Base.Command): pass +class uybar(Base.Command): pass +class unhat(Base.Command): pass +class ule(Base.Command): pass +class minus(Base.Command): pass +class lowast(Base.Command): pass +class Erdos(Base.Command): pass + diff --git a/book_kr/next.png b/book_kr/next.png new file mode 100644 index 0000000..e89db27 Binary files /dev/null and b/book_kr/next.png differ diff --git a/book_kr/up.png b/book_kr/up.png new file mode 100644 index 0000000..4e86da1 Binary files /dev/null and b/book_kr/up.png differ