提交 6e459909 编写于 作者: L LI Yunxiang 提交者: Bo Zhou

add implemented algorithms in doc (#142)

上级 4c312dab
// modified from
// https://stackoverflow.com/questions/12150491/toc-list-with-all-classes-generated-by-automodule-in-sphinx-docs
$(function (){
var createList = function(selected) {
var obj = {};
var ul = $('<ul>');
selected.each(function(i,e) {
var groupName = $(e).find('a')[0].href;
groupName = groupName.substr(groupName.lastIndexOf('/')+1);
groupName = groupName.substr(0,groupName.lastIndexOf(".html"));
var fullname = e.id;
if (fullname.startsWith('parl.'))
index = fullname.lastIndexOf('.')
fullname = "parl.algorithms.".concat(fullname.substr(index+1))
if (fullname == "dataflow.MultiProcessMapData") {
groupName = "parallel_map";
}
var n = $(e).children('.descname').clone();
n[0].innerText = fullname;
var l = $(e).children('.headerlink');
var a = $('<a>');
a.attr('href', l.attr('href')).attr('title', 'Link to this definition');
a.append(n);
var entry = $('<li>').append(a);
if(groupName in obj) {
obj[groupName].append(entry);
} else {
var ul = $('<ul style="margin-bottom: 12px;">');
ul.append(entry);
obj[groupName] = ul;
}
});
return obj;
}
var customIndex = $('.custom-index');
customIndex.empty();
var selected = $('div.section>dl>dt');
if (selected.length === 0)
return;
var obj = createList(selected);
var block = $('<div style="min-width: 300px; margin-bottom: 2em;">');
for(var key in obj) {
var a = $('<h6 style="margin-bottom: 0;">');
a.html(key + ':');
block.append(a);
block.append(obj[key]);
}
customIndex.append(block);
});
Implemented Algorithms
========================
.. container:: custom-index
.. raw:: html
<script type="text/javascript" src='../_static/build_toc_group.js'></script>
.. automodule:: parl.algorithms.fluid.impala.impala
:members:
:no-undoc-members:
:show-inheritance:
.. automodule:: parl.algorithms.fluid.a3c
:members:
:no-undoc-members:
:show-inheritance:
.. automodule:: parl.algorithms.fluid.ddpg
:members:
:no-undoc-members:
:show-inheritance:
.. automodule:: parl.algorithms.fluid.dqn
:members:
:no-undoc-members:
:show-inheritance:
.. automodule:: parl.algorithms.fluid.policy_gradient
:members:
:no-undoc-members:
:show-inheritance:
.. automodule:: parl.algorithms.fluid.ppo
:members:
:no-undoc-members:
:show-inheritance:
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册