Skip to content

Commit

Permalink
Merge pull request #40 from pnnl/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
brendapraggastis authored Sep 8, 2020
2 parents 5e60485 + f21b38b commit 8be77dc
Show file tree
Hide file tree
Showing 29 changed files with 846 additions and 438 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,39 @@ Documentation is available at: https://pnnl.github.io/HyperNetX/

Tutorials may be run in your browser using Google Colab
-------------------------------------------------------

<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%201%20-%20HNX%20Basics.ipynb" target="_blank">

<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span style={'margin-left':5px}>Tutorial 1 - HNX Basics</span>
</a>
</br>
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%202%20-%20Visualization%20Methods.ipynb" target="_blank">



<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span style={'margin-left':5px}>Tutorial 2 - Visualization Methods</span>
</a>
</br>
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%203%20-%20LesMis%20Case%20Study.ipynb" target="_blank">



<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span style={'margin-left':5px}>Tutorial 3 - LesMis Case Study</span>
</a>
</br>
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%204%20-%20LesMis%20Visualizations-BookTour.ipynb" target="_blank">



<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span style={'margin-left':5px}>Tutorial 4 - LesMis Visualizations-Book Tour</span>
</a>
</br>
<a href="https://colab.research.google.com/github/pnnl/HyperNetX/blob/master/tutorials/Tutorial%205%20-%20Homology%20mod%202%20for%20TriLoop%20Example.ipynb" target="_blank">

<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
<span style={'margin-left':5px}>Tutorial 5 - Homology mod2 for TriLoop Example</span>
</a>
Expand Down
Binary file modified docs/build/.doctrees/algorithms/algorithms.doctree
Binary file not shown.
Binary file modified docs/build/.doctrees/classes/classes.doctree
Binary file not shown.
Binary file modified docs/build/.doctrees/environment.pickle
Binary file not shown.
14 changes: 8 additions & 6 deletions docs/build/_modules/algorithms/homology_mod2.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ <h1>Source code for algorithms.homology_mod2</h1><div class="highlight"><pre>

<span class="sd">Methods for obtaining SNF for Z/2Z are based on Ferrario&#39;s work:</span>
<span class="sd">http://www.dlfer.xyz/post/2016-10-27-smith-normal-form/</span>

<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
Expand Down Expand Up @@ -516,7 +517,7 @@ <h1>Source code for algorithms.homology_mod2</h1><div class="highlight"><pre>

<div class="viewcode-block" id="logical_matadd"><a class="viewcode-back" href="../../algorithms/algorithms.html#algorithms.homology_mod2.logical_matadd">[docs]</a><span class="k">def</span> <span class="nf">logical_matadd</span><span class="p">(</span><span class="n">mat1</span><span class="p">,</span> <span class="n">mat2</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns the boolean equivalent of matrix additon mod 2 on two</span>
<span class="sd"> Returns the boolean equivalent of matrix addition mod 2 on two</span>
<span class="sd"> binary arrays stored as type boolean</span>

<span class="sd"> Parameters</span>
Expand Down Expand Up @@ -717,10 +718,7 @@ <h1>Source code for algorithms.homology_mod2</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">L</span><span class="p">,</span> <span class="n">S</span><span class="p">,</span> <span class="n">Linv</span></div>


<div class="viewcode-block" id="coset"><a class="viewcode-back" href="../../algorithms/algorithms.html#algorithms.homology_mod2.coset">[docs]</a><span class="k">def</span> <span class="nf">coset</span><span class="p">(</span><span class="n">im2</span><span class="p">,</span> <span class="n">bs</span><span class="o">=</span><span class="p">[],</span> <span class="n">shortest</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span> <span class="c1"># This breaks because line 529 has logical_xor on ndarray.</span>
<span class="c1"># It only works on a simple array. will need to break it up on each dimension.</span>
<span class="c1"># Do it by creating a method logical_matadd(*arr) and doing logical_xor.reduce on each element of the transpose.</span>
<span class="c1"># Then transpose back. Will arkouda do this????</span>
<div class="viewcode-block" id="coset"><a class="viewcode-back" href="../../algorithms/algorithms.html#algorithms.homology_mod2.coset">[docs]</a><span class="k">def</span> <span class="nf">coset</span><span class="p">(</span><span class="n">im2</span><span class="p">,</span> <span class="n">bs</span><span class="o">=</span><span class="p">[],</span> <span class="n">shortest</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the coset represented by bs, if bs=None</span>
<span class="sd"> returns the boundary group</span>
Expand All @@ -731,14 +729,18 @@ <h1>Source code for algorithms.homology_mod2</h1><div class="highlight"><pre>
<span class="sd"> columns form a basis for the boundary group</span>
<span class="sd"> bs : np.array</span>
<span class="sd"> boolean vector from projection of kernel on cokernel</span>
<span class="sd"> shortest : bool</span>
<span class="sd"> if True then only representatives of the coset containing</span>
<span class="sd"> the smallest number of $k$-cells will be returned</span>
<span class="sd"> else all elements of the coset will be returned</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> : list</span>
<span class="sd"> list of elements of the coset of interest</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;&quot;&quot;</span>
<span class="s2"> coset() is an very inefficient method for all but small examples.</span>
<span class="s2"> coset() is a very inefficient method for all but small examples.</span>
<span class="s2"> &quot;&quot;&quot;</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">im2</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
Expand Down
Loading

0 comments on commit 8be77dc

Please sign in to comment.