Sha256: f7b2745e553ceae2dff0f5251c44e94d70820669cd5ae1696a7b58c813218a69
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>siblings (BayesNet)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/bn4r/bn.rb, line 95</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">siblings</span>(<span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">roots</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">root?</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">childs</span>(<span class="ruby-identifier">p</span>) <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bn4r-0.9.0 | doc/classes/BayesNet.src/M000014.html |