Skip to content

Commit

Permalink
Merge pull request #1 from crazy-canux/x390
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
crazy-canux committed Jun 14, 2022
2 parents b117229 + 4d71463 commit c0afefe
Show file tree
Hide file tree
Showing 32 changed files with 2,449 additions and 90 deletions.
Binary file added docs/_build/doctrees/algorithm.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/behavioralpatterns.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/creationalpatterns.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/datastructure.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/designprinciple.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/searchalgorithm.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/sortalgorithm.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/structuralpatterns.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 829654fe7a7ca63a73f812f2e1a603f3
config: a212675aeb140e10a4e2b5d53fee85b8
tags: 645f666f9bcd5a90fca523b33c5a78b7
59 changes: 59 additions & 0 deletions docs/_build/html/_sources/algorithm.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. _algorithm:

Algorithm
=========

对数
----

loga^b = x => a^x = b

loga^(mn) = loga^m + loga^n

loga^(m/n) = loga^m - loga^n

loga^(M^n) = nloga^M

loga^b = logc^b / logc^a

ln e为底
lg 10为底
log 任意底

时间复杂度
----------

渐进时间复杂度表示数据规模和运算时间之间的关系

常见时间复杂度从小到大排列:
1. O(1) 常数阶
2. O(logn) 对数阶
3. O(n) 线性阶
4. O(nlogn) 线性对数阶
5. O(n^2) 平方阶
6. O(n^3) 立方阶
7. O(2^n) 指数阶
8. O(n!) 阶乘阶
9. O(n^n) k次方阶

空间复杂度
----------

渐进空间复杂度表示数据规模和算法存储空间之间的关系

常见空间复杂度从小到大排列

1. O(1)
2. O(n)
3. O(n^2)

递归
-----

避免无限递归

递归条件:

* 一个问题可以分解成几个子问题
* 问题分解之后除了数据规模思路是一样的
* 存在基线或终止条件
1 change: 1 addition & 0 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Include 6 principle and 23 design patterns.
:maxdepth: 2

datastructure
algorithm
sortalgorithm
searchalgorithm
designprinciple
Expand Down
111 changes: 80 additions & 31 deletions docs/_build/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold;
}

ul.search li div.context {
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
Expand Down Expand Up @@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}

img.align-left, .figure.align-left, object.align-left {
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}

img.align-right, .figure.align-right, object.align-right {
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}

img.align-center, .figure.align-center, object.align-center {
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}

img.align-default, .figure.align-default {
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
Expand All @@ -319,7 +319,8 @@ img.align-default, .figure.align-default {

/* -- sidebars -------------------------------------------------------------- */

div.sidebar {
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
Expand Down Expand Up @@ -377,12 +378,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */

div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -455,20 +458,22 @@ td > :last-child {

/* -- figures --------------------------------------------------------------- */

div.figure {
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}

div.figure p.caption {
div.figure p.caption, figcaption {
padding: 0.3em;
}

div.figure p.caption span.caption-number {
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}

div.figure p.caption span.caption-text {
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}

/* -- field list styles ----------------------------------------------------- */
Expand Down Expand Up @@ -503,6 +508,63 @@ table.hlist td {
vertical-align: top;
}

/* -- object description styles --------------------------------------------- */

.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}

.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}

.sig-name {
font-size: 1.1em;
}

code.descname {
font-size: 1.2em;
}

.sig-prename, code.descclassname {
background-color: transparent;
}

.optional {
font-size: 1.3em;
}

.sig-paren {
font-size: larger;
}

.sig-param.n {
font-style: italic;
}

/* C++ specific styling */

.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}

.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}

.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}

.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}


/* -- other body styles ----------------------------------------------------- */

Expand Down Expand Up @@ -629,14 +691,6 @@ dl.glossary dt {
font-size: 1.1em;
}

.optional {
font-size: 1.3em;
}

.sig-paren {
font-size: larger;
}

.versionmodified {
font-style: italic;
}
Expand Down Expand Up @@ -677,8 +731,9 @@ dl.glossary dt {

.classifier:before {
font-style: normal;
margin: 0.5em;
margin: 0 0.5em;
content: ":";
display: inline-block;
}

abbr, acronym {
Expand Down Expand Up @@ -765,8 +820,12 @@ div.code-block-caption code {

table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}

div.code-block-caption span.caption-number {
Expand All @@ -781,16 +840,6 @@ div.literal-block-wrapper {
margin: 1em 0;
}

code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}

code.descclassname {
background-color: transparent;
}

code.xref, a code {
background-color: transparent;
font-weight: bold;
Expand Down
2 changes: 2 additions & 0 deletions docs/_build/html/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,14 @@ var Documentation = {
window.location.href = prevHref;
return false;
}
break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
}
}
});
Expand Down
15 changes: 11 additions & 4 deletions docs/_build/html/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ var Search = {
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
if (summary) {
listItem.append(summary);
}
}
Search.output.append(listItem);
setTimeout(function() {
Expand Down Expand Up @@ -325,7 +328,9 @@ var Search = {
var results = [];

for (var prefix in objects) {
for (var name in objects[prefix]) {
for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
var match = objects[prefix][iMatch];
var name = match[4];
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
Expand All @@ -339,7 +344,6 @@ var Search = {
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
Expand Down Expand Up @@ -498,6 +502,9 @@ var Search = {
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
if (text == "") {
return null;
}
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
Expand All @@ -509,7 +516,7 @@ var Search = {
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
var rv = $('<p class="context"></p>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
Expand Down

0 comments on commit c0afefe

Please sign in to comment.