| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.17"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>mxnet: dmlc::Parser< IndexType, DType > Class Template Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td id="projectalign" style="padding-left: 0.5em;"> |
| <div id="projectname">mxnet |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.17 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</script> |
| <div id="main-nav"></div> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="namespacedmlc.html">dmlc</a></li><li class="navelem"><a class="el" href="classdmlc_1_1Parser.html">Parser</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="summary"> |
| <a href="#pub-types">Public Types</a> | |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="#pub-static-methods">Static Public Member Functions</a> | |
| <a href="classdmlc_1_1Parser-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">dmlc::Parser< IndexType, DType > Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>parser interface that parses input data used to load dmlc data format into your own data format Difference between <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> and <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a>: <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> caches the data internally that can be used to iterate the dataset multiple times, <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a> holds very limited internal state and was usually used to read data only once |
| <a href="classdmlc_1_1Parser.html#details">More...</a></p> |
| |
| <p><code>#include <<a class="el" href="data_8h_source.html">data.h</a>></code></p> |
| <div class="dynheader"> |
| Inheritance diagram for dmlc::Parser< IndexType, DType >:</div> |
| <div class="dyncontent"> |
| <div class="center"><img src="classdmlc_1_1Parser__inherit__graph.png" border="0" usemap="#dmlc_1_1Parser_3_01IndexType_00_01DType_01_4_inherit__map" alt="Inheritance graph"/></div> |
| <!-- MAP 0 --> |
| </div> |
| <div class="dynheader"> |
| Collaboration diagram for dmlc::Parser< IndexType, DType >:</div> |
| <div class="dyncontent"> |
| <div class="center"><img src="classdmlc_1_1Parser__coll__graph.png" border="0" usemap="#dmlc_1_1Parser_3_01IndexType_00_01DType_01_4_coll__map" alt="Collaboration graph"/></div> |
| <!-- MAP 1 --> |
| </div> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> |
| Public Types</h2></td></tr> |
| <tr class="memitem:aacf539079f2aab0d75c6dad286d7653e"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classdmlc_1_1Parser.html">Parser</a>< IndexType, DType > *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#aacf539079f2aab0d75c6dad286d7653e">Factory</a>) (const std::string &path, const std::map< std::string, std::string > &args, unsigned part_index, unsigned num_parts)</td></tr> |
| <tr class="memdesc:aacf539079f2aab0d75c6dad286d7653e"><td class="mdescLeft"> </td><td class="mdescRight">Factory type of the parser. <a href="classdmlc_1_1Parser.html#aacf539079f2aab0d75c6dad286d7653e">More...</a><br /></td></tr> |
| <tr class="separator:aacf539079f2aab0d75c6dad286d7653e"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| Public Member Functions</h2></td></tr> |
| <tr class="memitem:ab1502841c20f75244aa21618c01112ee"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#ab1502841c20f75244aa21618c01112ee">BytesRead</a> (void) const =0</td></tr> |
| <tr class="separator:ab1502841c20f75244aa21618c01112ee"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="inherit_header pub_methods_classdmlc_1_1DataIter"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdmlc_1_1DataIter')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classdmlc_1_1DataIter.html">dmlc::DataIter< RowBlock< IndexType, real_t > ></a></td></tr> |
| <tr class="memitem:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#aef4acbc5a49dd71edb360149a2b19ee2">~DataIter</a> (void) <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a80bde16113dc79e7adb7953e006d6b60">DMLC_THROW_EXCEPTION</a></td></tr> |
| <tr class="memdesc:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft"> </td><td class="mdescRight">destructor <a href="classdmlc_1_1DataIter.html#aef4acbc5a49dd71edb360149a2b19ee2">More...</a><br /></td></tr> |
| <tr class="separator:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a77735f53af4bb7490009315607ab9135">BeforeFirst</a> (void)=0</td></tr> |
| <tr class="memdesc:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft"> </td><td class="mdescRight">set before first of the item <a href="classdmlc_1_1DataIter.html#a77735f53af4bb7490009315607ab9135">More...</a><br /></td></tr> |
| <tr class="separator:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a1f07f4d4f87485d1de4b6ba1af4d7b5b">Next</a> (void)=0</td></tr> |
| <tr class="memdesc:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft"> </td><td class="mdescRight">move to next item <a href="classdmlc_1_1DataIter.html#a1f07f4d4f87485d1de4b6ba1af4d7b5b">More...</a><br /></td></tr> |
| <tr class="separator:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="structdmlc_1_1RowBlock.html">RowBlock</a>< IndexType, <a class="el" href="namespacedmlc.html#ab23d78846b42ebd3a436e3bc295b73f4">real_t</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a2695f02f824a515b60d4fb0af6c4e6d6">Value</a> (void) const=0</td></tr> |
| <tr class="memdesc:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft"> </td><td class="mdescRight">get current data <a href="classdmlc_1_1DataIter.html#a2695f02f824a515b60d4fb0af6c4e6d6">More...</a><br /></td></tr> |
| <tr class="separator:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> |
| Static Public Member Functions</h2></td></tr> |
| <tr class="memitem:a795cd4f65273bd4612a32bd4a2797a34"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classdmlc_1_1Parser.html">Parser</a>< IndexType, DType > * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#a795cd4f65273bd4612a32bd4a2797a34">Create</a> (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)</td></tr> |
| <tr class="memdesc:a795cd4f65273bd4612a32bd4a2797a34"><td class="mdescLeft"> </td><td class="mdescRight">create a new instance of parser based on the "type" <a href="classdmlc_1_1Parser.html#a795cd4f65273bd4612a32bd4a2797a34">More...</a><br /></td></tr> |
| <tr class="separator:a795cd4f65273bd4612a32bd4a2797a34"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><h3>template<typename IndexType, typename DType = real_t><br /> |
| class dmlc::Parser< IndexType, DType ></h3> |
| |
| <p>parser interface that parses input data used to load dmlc data format into your own data format Difference between <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> and <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a>: <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> caches the data internally that can be used to iterate the dataset multiple times, <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a> holds very limited internal state and was usually used to read data only once </p> |
| <dl class="section see"><dt>See also</dt><dd><a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> </dd></dl> |
| <dl class="tparams"><dt>Template Parameters</dt><dd> |
| <table class="tparams"> |
| <tr><td class="paramname">IndexType</td><td>type of index in <a class="el" href="structdmlc_1_1RowBlock.html" title="a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algor...">RowBlock</a> </td></tr> |
| <tr><td class="paramname">DType</td><td>type of label and value in <a class="el" href="structdmlc_1_1RowBlock.html" title="a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algor...">RowBlock</a> Create function was only implemented for IndexType uint64_t and uint32_t and DType real_t and int </td></tr> |
| </table> |
| </dd> |
| </dl> |
| </div><h2 class="groupheader">Member Typedef Documentation</h2> |
| <a id="aacf539079f2aab0d75c6dad286d7653e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#aacf539079f2aab0d75c6dad286d7653e">◆ </a></span>Factory</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename IndexType , typename DType = real_t> </div> |
| <table class="memname"> |
| <tr> |
| <td class="memname">typedef <a class="el" href="classdmlc_1_1Parser.html">Parser</a><IndexType, DType>*(* <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>< IndexType, DType >::Factory) (const std::string &path, const std::map< std::string, std::string > &args, unsigned part_index, unsigned num_parts)</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Factory type of the parser. </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a id="ab1502841c20f75244aa21618c01112ee"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ab1502841c20f75244aa21618c01112ee">◆ </a></span>BytesRead()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename IndexType , typename DType = real_t> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual size_t <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>< IndexType, DType >::BytesRead </td> |
| <td>(</td> |
| <td class="paramtype">void </td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <dl class="section return"><dt>Returns</dt><dd>size of bytes read so far </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a795cd4f65273bd4612a32bd4a2797a34"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a795cd4f65273bd4612a32bd4a2797a34">◆ </a></span>Create()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename IndexType , typename DType = real_t> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="classdmlc_1_1Parser.html">Parser</a><IndexType, DType>* <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>< IndexType, DType >::Create </td> |
| <td>(</td> |
| <td class="paramtype">const char * </td> |
| <td class="paramname"><em>uri_</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned </td> |
| <td class="paramname"><em>part_index</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">unsigned </td> |
| <td class="paramname"><em>num_parts</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const char * </td> |
| <td class="paramname"><em>type</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>create a new instance of parser based on the "type" </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">uri_</td><td>the uri of the input, can contain hdfs prefix </td></tr> |
| <tr><td class="paramname">part_index</td><td>the part id of current input </td></tr> |
| <tr><td class="paramname">num_parts</td><td>total number of splits </td></tr> |
| <tr><td class="paramname">type</td><td>type of dataset can be: "libsvm", "auto", ...</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <p>When "auto" is passed, the type is decided by format argument string in URI.</p> |
| <dl class="section return"><dt>Returns</dt><dd>the created parser </dd></dl> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>/work/mxnet/3rdparty/dmlc-core/include/dmlc/<a class="el" href="data_8h_source.html">data.h</a></li> |
| </ul> |
| </div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Thu Jan 5 2023 03:47:40 for mxnet by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.17 |
| </small></address> |
| </body> |
| </html> |