diff --git a/src/architecture/network.js b/src/architecture/network.js index 8188c5040..76b54c7c0 100644 --- a/src/architecture/network.js +++ b/src/architecture/network.js @@ -1166,6 +1166,7 @@ Network.prototype = { * If both `iterations` and `error` options are unset, evolve will default to `iterations` as an end condition. * * @param {Array<{input:number[],output:number[]}>} set A set of input values and ideal output values to train the network with + * @param {object} [options] Configuration options * @param {number} [options.iterations=500] Set the maximum amount of iterations/generations for the algorithm to run. * @param {number} [options.error] Set the target error. The algorithm will stop once this target error has been reached. * @param {number} [options.growth=0.0001] Set the penalty for large networks. Penalty calculation: penalty = (genome.nodes.length + genome.connectoins.length + genome.gates.length) * growth; This penalty will get added on top of the error. Your growth should be a very small number. @@ -1177,7 +1178,6 @@ Network.prototype = { * @param {number} [options.schedule.iterations] You can schedule tasks to happen every n iterations. Paired with `options.schedule.function` * @param {schedule} [options.schedule.function] A function to run every n iterations as set by `options.schedule.iterations`. Passed as an object with a "function" property that contains the function to run. * @param {boolean} [options.clear=false] If set to true, will clear the network after every activation. This is useful for evolving recurrent networks, more importantly for timeseries prediction. - * * @param {boolean} [options.equal=false] * @param {number} [options.popsize=50] Population size of each generation. * @param {number} [options.elitism=0] Elitism of every evolution loop. [Elitism in genetic algorithms.](https://www.researchgate.net/post/What_is_meant_by_the_term_Elitism_in_the_Genetic_Algorithm) @@ -1185,7 +1185,7 @@ Network.prototype = { * @param {number} [options.mutationRate=0] Sets the mutation rate. If set to 0.3, 30% of the new population will be mutated. Default is 0.3. * @param {number} [options.mutationAmount=1] If mutation occurs (randomNumber < mutationRate), sets amount of times a mutation method will be applied to the network. * @param {boolean} [options.fitnessPopulation=false] When true, requires fitness function that takes an array of genomes as input and sets their .score property - * @param {string} [options.selection=Selection.FITNESS_PROPORTIONATE] [Selection method](selection) for evolution (e.g. Selection.FITNESS_PROPORTIONATE). + * @param {string} [options.selection=FITNESS_PROPORTIONATE] [Selection method](selection) for evolution (e.g. methods.Selection.FITNESS_PROPORTIONATE). * @param {Array} [options.crossover] Sets allowed crossover methods for evolution. * @param {Array} [options.mutation] Sets allowed [mutation methods](mutation) for evolution, a random mutation method will be chosen from the array when mutation occurs. Optional, but default methods are non-recurrent. * @param {number} [options.maxNodes=Infinity] Maximum nodes for a potential network diff --git a/src/neat.js b/src/neat.js index bacb27103..dc5b51ced 100644 --- a/src/neat.js +++ b/src/neat.js @@ -23,14 +23,14 @@ var selection = methods.selection; * @param {number} [options.mutationRate=0] Sets the mutation rate. If set to 0.3, 30% of the new population will be mutated. Default is 0.3. * @param {number} [options.mutationAmount=1] If mutation occurs (randomNumber < mutationRate), sets amount of times a mutation method will be applied to the network. * @param {boolean} [options.fitnessPopulation=false] When true, requires fitness function that takes an array of genomes as input and sets their .score property -* @param {string} [options.selection=Selection.FITNESS_PROPORTIONATE] [Selection method](selection) for evolution (e.g. Selection.FITNESS_PROPORTIONATE). +* @param {string} [options.selection=FITNESS_PROPORTIONATE] [Selection method](selection) for evolution (e.g. Selection.FITNESS_PROPORTIONATE). * @param {Array} [options.crossover] Sets allowed crossover methods for evolution. -* @param {Array} [mutation] Sets allowed mutation methods for evolution, a random mutation method will be chosen from the array when mutation occurs. Optional, but default methods are non-recurrent. * @param {Network} [options.network=false] Network to start evolution from * @param {number} [options.maxNodes=Infinity] Maximum nodes for a potential network * @param {number} [options.maxConns=Infinity] Maximum connections for a potential network * @param {number} [options.maxGates=Infinity] Maximum gates for a potential network -* @param {function} [options.mutationSelection=] Custom mutation selection function if given +* @param {function} [options.mutationSelection=ALL] Custom mutation selection function if given +* @param {mutation[]} [options.mutation] Sets allowed [mutation methods](mutation) for evolution, a random mutation method will be chosen from the array when mutation occurs. Optional, but default methods are non-recurrent * * @prop {number} generation A count of the generations */ diff --git a/theme/publish.js b/theme/publish.js index 6c6a43a4d..c73e7493b 100644 --- a/theme/publish.js +++ b/theme/publish.js @@ -83,11 +83,11 @@ function needsSignature(doclet) { } } } - // and namespaces that are functions get a signature (but finding them is a - // bit messy) - else if (doclet.kind === 'namespace' && doclet.meta && doclet.meta.code && - doclet.meta.code.type && doclet.meta.code.type.match(/[Ff]unction/)) { - needsSig = true; + // and namespaces that are functions get a signature (but finding them is a + // bit messy) + else if (doclet.kind === 'namespace' && doclet.meta && doclet.meta.code && + doclet.meta.code.type && doclet.meta.code.type.match(/[Ff]unction/)) { + needsSig = true; } return needsSig; @@ -198,8 +198,8 @@ function addSignatureReturns(f) { returnTypesString = util.format( ' → %s{%s}', attribsString, returnTypes.join('|') ); } - f.signature = '' + (f.signature || '') + '' + - '' + returnTypesString + ''; + f.signature = '' + (f.signature || '') + '' + + '' + returnTypesString + ''; } function addSignatureTypes(f) { diff --git a/theme/static/styles/jsdoc.css b/theme/static/styles/jsdoc.css index 0bda2a199..b8779ac7a 100644 --- a/theme/static/styles/jsdoc.css +++ b/theme/static/styles/jsdoc.css @@ -146,7 +146,6 @@ tt, code, kbd, samp { #main { float: right; - min-width: 360px; width: calc(100% - 240px); } @@ -397,7 +396,6 @@ h4.name a.issue-button:hover { .prettyprint { font-size: 14px; - overflow: auto; } .prettyprint.source { @@ -413,6 +411,7 @@ h4.name a.issue-button:hover { display: block; background-color: #0d152a; color: #4D4E53; + overflow: auto; } .prettyprint > code { @@ -469,6 +468,10 @@ table { margin: 1em 0; } +.table-overflow { + overflow: auto; +} + td, th { margin: 0px; text-align: left; @@ -487,6 +490,11 @@ thead tr, thead tr { white-space: pre; } +.params .attribute { + font-size: 80%; + color: hsl(0, 0%, 56%); +} + .params .name, .props .name, .name code { font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 100%; @@ -523,34 +531,34 @@ span.param-type, .params td .param-type, .param-type dd { } /* navicon button */ -.navicon-button { - display: none; - position: relative; - padding: 2.0625rem 1.5rem; - transition: 0.25s; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - opacity: .8; -} -.navicon-button .navicon:before, .navicon-button .navicon:after { - transition: 0.25s; -} -.navicon-button:hover { - transition: 0.5s; - opacity: 1; -} -.navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after { - transition: 0.25s; -} -.navicon-button:hover .navicon:before { - top: .825rem; -} -.navicon-button:hover .navicon:after { - top: -.825rem; -} +/*.navicon-button {*/ +/* display: none;*/ +/* position: relative;*/ +/* padding: 2.0625rem 1.5rem;*/ +/* transition: 0.25s;*/ +/* cursor: pointer;*/ +/* -webkit-user-select: none;*/ +/* -moz-user-select: none;*/ +/* -ms-user-select: none;*/ +/* user-select: none;*/ +/* opacity: .8;*/ +/*}*/ +/*.navicon-button .navicon:before, .navicon-button .navicon:after {*/ +/* transition: 0.25s;*/ +/*}*/ +/*.navicon-button:hover {*/ +/* transition: 0.5s;*/ +/* opacity: 1;*/ +/*}*/ +/*.navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after {*/ +/* transition: 0.25s;*/ +/*}*/ +/*.navicon-button:hover .navicon:before {*/ +/* top: .825rem;*/ +/*}*/ +/*.navicon-button:hover .navicon:after {*/ +/* top: -.825rem;*/ +/*}*/ /* navicon */ .navicon { @@ -657,10 +665,7 @@ html[data-search-mode] .level-hide { } -@media only screen and (min-width: 320px) and (max-width: 680px) { - body { - overflow-x: hidden; - } +@media (max-width: 1087px) { nav { background: #FFF; @@ -676,17 +681,59 @@ html[data-search-mode] .level-hide { transition: left 0.2s; } - .navicon-button { - display: inline-block; + /*.navicon-button {*/ + /* line-height: 56px;*/ + /* font-size: 1.6rem;*/ + /* width: inherit;*/ + /* display: inline-block;*/ + /* text-align: center;*/ + /*}*/ + + .ion-ios-book { + font-size: 27px; + text-align: center; + color: white; + line-height: 27px; + vertical-align: middle; + } + + .fixed-action-btn { position: fixed; - top: 1.5em; - right: 0; - z-index: 2; + bottom: 45px; + right: 24px; + padding-top: 15px; + margin-bottom: 0; + z-index: 997; + } + + .button-floating { + display: inline-block; + position: relative; + overflow: hidden; + z-index: 1; + width: 56px; + height: 56px; + padding: 0; + line-height: 54px; + font-size: 15px; + background-color: #FF7518; + border-radius: 50%; + -webkit-transition: background-color .3s; + transition: background-color .3s; + cursor: pointer; + vertical-align: middle; + text-decoration: none; + text-align: center; + letter-spacing: .5px; + outline: 0; + -webkit-tap-highlight-color: transparent; + border: none; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2); } #main { width: 100%; - min-width: 360px; + padding: 3.25rem 1.5rem; } #main h1.page-title { @@ -702,6 +749,18 @@ html[data-search-mode] .level-hide { } } +@media (max-width: 330px) { + .mobile-break { + word-break: break-word; + overflow-wrap: break-word; + } + + #main { + width: 100%; + padding: 3.25rem 1vw 0 1vw; + } +} + /** Add a '#' to static members */ [data-type="member"] a::before { content: '#'; diff --git a/theme/tmpl/layout.tmpl b/theme/tmpl/layout.tmpl index 49a1847b8..c965e9679 100644 --- a/theme/tmpl/layout.tmpl +++ b/theme/tmpl/layout.tmpl @@ -34,10 +34,18 @@ -