Compare commits
54 Commits
0-set-up-r
...
janitaws/f
| Author | SHA1 | Date | |
|---|---|---|---|
| 0085ffc437 | |||
| 8d7c20f919 | |||
|
|
d6e0090fb8 | ||
|
|
11cd6aa27e | ||
|
|
16bcbc3ecc | ||
|
|
6f5b947239 | ||
|
|
7a6f93f9ba | ||
|
|
b4ab7e9f53 | ||
|
|
4c87a53780 | ||
|
|
6fcb081016 | ||
|
|
2fde592256 | ||
|
|
4f2a49a0ff | ||
| 3b1c42cf2d | |||
| 58c58a97af | |||
| f186b52548 | |||
| ea38b19fc9 | |||
| bd1b1195b2 | |||
| 139cd1961e | |||
| 81f1b9b567 | |||
| 37b8aa5709 | |||
| dfb14b5c4a | |||
| 87474d6e6d | |||
|
|
97997b9f1d | ||
|
|
3c9a84598d | ||
|
|
97e6b35112 | ||
|
|
0a2ca3c0cf | ||
|
|
4db545527a | ||
|
|
e979c3955e | ||
|
|
2b103b9e3a | ||
|
|
24f9f88af5 | ||
| ccb4bcbce3 | |||
|
|
a9d2c9dfb7 | ||
|
|
f85e41460b | ||
| 47f332a66c | |||
| 5eb23c1985 | |||
| 162e884d47 | |||
| 725cf5b33a | |||
| 57c66655a5 | |||
| 735d8bf6d8 | |||
| acdf269db8 | |||
| f6d11c615f | |||
| 3a09e7eadf | |||
| f05060524f | |||
|
|
281261a798 | ||
|
|
79904b5645 | ||
|
|
1b805c245f | ||
|
|
27703bd404 | ||
| 7e78f68630 | |||
| 942a58b1dc | |||
| 514cb20064 | |||
| c2c4804a89 | |||
| 68e665748a | |||
| 97d13c6d2d | |||
| cca14b55df |
1
.gitignore
vendored
@@ -45,3 +45,4 @@ src/*
|
||||
!src/*.cpp
|
||||
!src/*.hpp
|
||||
!src/*.py
|
||||
!src/Doxyfile
|
||||
|
||||
12
Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
MAKE=make
|
||||
|
||||
.PHONY: code latex docs
|
||||
|
||||
code:
|
||||
$(MAKE) -C src
|
||||
|
||||
latex:
|
||||
$(MAKE) -C latex
|
||||
|
||||
docs:
|
||||
$(MAKE) -C src doxygen
|
||||
59
README.md
@@ -4,27 +4,68 @@
|
||||
|
||||
- [Project](https://anderkve.github.io/FYS3150/book/projects/project2.html)
|
||||
|
||||
## Compile and run
|
||||
## Compile and run C++ programs
|
||||
|
||||
Compiling and linking is done using Make, make sure you are in the root folder. To create executable files, run shell commands
|
||||
Compiling and linking is done using Make, make sure you are in the root directory.
|
||||
|
||||
There are two alternative ways to compile the code. The first alternative is to change
|
||||
directory to `src/` and compile
|
||||
|
||||
```shell
|
||||
cd src/
|
||||
make
|
||||
cd src && make
|
||||
```
|
||||
To run `script-name`
|
||||
|
||||
The second alternative does not involve changing directory to `src/`, use
|
||||
make in the projects root directory
|
||||
|
||||
```shell
|
||||
./main
|
||||
make code
|
||||
```
|
||||
|
||||
You can run any of the compiled programs by changing directory to `src/`, then
|
||||
|
||||
```shell
|
||||
./test_suite
|
||||
./main
|
||||
```
|
||||
|
||||
Remove object files and executables from `src/`
|
||||
```shell
|
||||
make clean
|
||||
```
|
||||
|
||||
|
||||
## Generate plots
|
||||
|
||||
To generate plots, the Python scripts is run using
|
||||
To generate plots, you can do
|
||||
|
||||
```shell
|
||||
python3 <script-name>
|
||||
python3 plot.py
|
||||
```
|
||||
|
||||
The plots will be saved inside [latex/images](../blob/main/latex/images).
|
||||
and the plots will be saved inside [latex/images](latex/images).
|
||||
|
||||
|
||||
## Generate documentation
|
||||
|
||||
For this project, we have used Doxygen to generate some nice and readable
|
||||
documentation for the C++ code.
|
||||
|
||||
If you want to generate the documentation you can do
|
||||
|
||||
```shell
|
||||
make docs
|
||||
```
|
||||
|
||||
in the project root, and the documentation will be made into the `docs/`
|
||||
directory.
|
||||
|
||||
## Generate project document
|
||||
|
||||
If you want to recompile the Pdf file, you can do
|
||||
|
||||
```shell
|
||||
make latex
|
||||
```
|
||||
|
||||
and a Pdf file will be produced inside the `latex/` directory.
|
||||
|
||||
BIN
doc/html/bc_s.png
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
doc/html/bc_sd.png
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
doc/html/bdwn.png
Normal file
|
After Width: | Height: | Size: 147 B |
100
doc/html/bug.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: Bug List</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Bug List </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><dl class="reflist">
|
||||
<dt>File <a class="el" href="jacobi_8cpp.html">jacobi.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000001"></a>The eigenvalues fail the test. When comparing them to arma::eigsym there is one value that is way off when testing with a 6x6 matrix. </dd>
|
||||
<dt>File <a class="el" href="jacobi_8hpp.html">jacobi.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000006"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="main_8cpp.html">main.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000002"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="matrix_8cpp.html">matrix.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000003"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="matrix_8hpp.html">matrix.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000007"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000004"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="utils_8cpp.html">utils.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000005"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="utils_8hpp.html">utils.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000008"></a>No known bugs </dd>
|
||||
</dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
doc/html/closed.png
Normal file
|
After Width: | Height: | Size: 132 B |
98
doc/html/dir_d44c64559bbebec7f509842c48db8b23.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include Directory 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">include Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="jacobi_8hpp.html">jacobi.hpp</a> <a href="jacobi_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:jacobi_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Function prototypes for the jacobi rotation algorithm. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8hpp.html">matrix.hpp</a> <a href="matrix_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:matrix_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Function prototypes for creating tridiagonal matrices. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html">utils.hpp</a> <a href="utils_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:utils_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Function prototypes and macros that are useful. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
doc/html/doc.png
Normal file
|
After Width: | Height: | Size: 746 B |
BIN
doc/html/docd.png
Normal file
|
After Width: | Height: | Size: 756 B |
2007
doc/html/doxygen.css
Normal file
26
doc/html/doxygen.svg
Normal file
|
After Width: | Height: | Size: 15 KiB |
123
doc/html/dynsections.js
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
$('table.directory tr').
|
||||
removeClass('odd').filter(':visible:odd').addClass('odd');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
/* @license-end */
|
||||
94
doc/html/files.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: File List</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">File List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="jacobi_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="jacobi_8hpp.html" target="_self">jacobi.hpp</a></td><td class="desc">Function prototypes for the jacobi rotation algorithm </td></tr>
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="matrix_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="matrix_8hpp.html" target="_self">matrix.hpp</a></td><td class="desc">Function prototypes for creating tridiagonal matrices </td></tr>
|
||||
<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr>
|
||||
<tr id="row_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="jacobi_8cpp.html" target="_self">jacobi.cpp</a></td><td class="desc">Implementation of the jacobi rotation method </td></tr>
|
||||
<tr id="row_2_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">Main program for Project 2 </td></tr>
|
||||
<tr id="row_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="matrix_8cpp.html" target="_self">matrix.cpp</a></td><td class="desc">Function prototypes for creating tridiagonal matrices </td></tr>
|
||||
<tr id="row_4_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">Test suite for project 2 </td></tr>
|
||||
<tr id="row_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
doc/html/folderclosed.png
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
doc/html/folderopen.png
Normal file
|
After Width: | Height: | Size: 597 B |
87
doc/html/globals.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: File Members</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div><ul>
|
||||
<li>create_symmetric_tridiagonal() : <a class="el" href="matrix_8cpp.html#a564688c96a8e4282e995a0663545d627">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">matrix.hpp</a></li>
|
||||
<li>create_tridiagonal() : <a class="el" href="matrix_8cpp.html#aa524feaf9f44790470df4cb99bb714af">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">matrix.hpp</a></li>
|
||||
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
||||
<li>jacobi_eigensolver() : <a class="el" href="jacobi_8cpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi.cpp</a>, <a class="el" href="jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi.hpp</a></li>
|
||||
<li>jacobi_rotate() : <a class="el" href="jacobi_8cpp.html#a49809414937a1491ff04ec3dc780982a">jacobi.cpp</a>, <a class="el" href="jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a">jacobi.hpp</a></li>
|
||||
<li>max_offdiag_symmetric() : <a class="el" href="matrix_8cpp.html#af42e501cbf71bec9c77ececc22723df9">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">matrix.hpp</a></li>
|
||||
<li>scientific_format() : <a class="el" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">utils.cpp</a>, <a class="el" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">utils.hpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
81
doc/html/globals_defs.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: File Members</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
86
doc/html/globals_func.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: File Members</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>create_symmetric_tridiagonal() : <a class="el" href="matrix_8cpp.html#a564688c96a8e4282e995a0663545d627">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">matrix.hpp</a></li>
|
||||
<li>create_tridiagonal() : <a class="el" href="matrix_8cpp.html#aa524feaf9f44790470df4cb99bb714af">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">matrix.hpp</a></li>
|
||||
<li>jacobi_eigensolver() : <a class="el" href="jacobi_8cpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi.cpp</a>, <a class="el" href="jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi.hpp</a></li>
|
||||
<li>jacobi_rotate() : <a class="el" href="jacobi_8cpp.html#a49809414937a1491ff04ec3dc780982a">jacobi.cpp</a>, <a class="el" href="jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a">jacobi.hpp</a></li>
|
||||
<li>max_offdiag_symmetric() : <a class="el" href="matrix_8cpp.html#af42e501cbf71bec9c77ececc22723df9">matrix.cpp</a>, <a class="el" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">matrix.hpp</a></li>
|
||||
<li>scientific_format() : <a class="el" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">utils.cpp</a>, <a class="el" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">utils.hpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
81
doc/html/index.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: Main Page</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">FYS3150: Project 2 Documentation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
238
doc/html/jacobi_8cpp.html
Normal file
@@ -0,0 +1,238 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: jacobi.cpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">jacobi.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implementation of the jacobi rotation method.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <algorithm></code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <utility></code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="jacobi_8hpp_source.html">jacobi.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>"</code><br />
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a49809414937a1491ff04ec3dc780982a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="jacobi_8cpp.html#a49809414937a1491ff04ec3dc780982a">jacobi_rotate</a> (arma::mat &A, arma::mat &R, int k, int l)</td></tr>
|
||||
<tr class="memdesc:a49809414937a1491ff04ec3dc780982a"><td class="mdescLeft"> </td><td class="mdescRight">Computes a single rotation. <br /></td></tr>
|
||||
<tr class="separator:a49809414937a1491ff04ec3dc780982a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5a8da00df38bec1046249e8589a8aad0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="jacobi_8cpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi_eigensolver</a> (const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged)</td></tr>
|
||||
<tr class="memdesc:a5a8da00df38bec1046249e8589a8aad0"><td class="mdescLeft"> </td><td class="mdescRight">Solves the eigenvalue problem using the jacobi rotation method. <br /></td></tr>
|
||||
<tr class="separator:a5a8da00df38bec1046249e8589a8aad0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of the jacobi rotation method. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>The eigenvalues fail the test. When comparing them to arma::eigsym there is one value that is way off when testing with a 6x6 matrix. </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a5a8da00df38bec1046249e8589a8aad0" name="a5a8da00df38bec1046249e8589a8aad0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5a8da00df38bec1046249e8589a8aad0">◆ </a></span>jacobi_eigensolver()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void jacobi_eigensolver </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>eps</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::vec & </td>
|
||||
<td class="paramname"><em>eigenvalues</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>eigenvectors</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const int </td>
|
||||
<td class="paramname"><em>maxiter</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>iterations</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">bool & </td>
|
||||
<td class="paramname"><em>converged</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Solves the eigenvalue problem using the jacobi rotation method. </p>
|
||||
<p>jacobi_eigensolver Initializes matrices A_m and R before going into the main loop.</p>
|
||||
<p>For each iteration of the loop, it finds the largest absolute off-diagonal value of A_m, and then calls jacobi_rotate. The loop stops when the largest off-diagonal is less than the tolerance (eps) or if the maximum number of iterations has been reached.</p>
|
||||
<p>The last thing this function does is to sort the eigenvalues and the corresponding eigenvectors in ascending order.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>The initial matrix to be solved </td></tr>
|
||||
<tr><td class="paramname">eps</td><td>Tolerance </td></tr>
|
||||
<tr><td class="paramname">eigenvalues</td><td>A vector that will contain the computed eigenvalues </td></tr>
|
||||
<tr><td class="paramname">eigenvectors</td><td>A Matrix that will contain the computed eigenvectors </td></tr>
|
||||
<tr><td class="paramname">maxiter</td><td>The max number of iterations allowed </td></tr>
|
||||
<tr><td class="paramname">iterations</td><td>To keep track of how many iterations the algorithm used </td></tr>
|
||||
<tr><td class="paramname">converged</td><td>Tells the user if the algorithm has converged</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Void </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a49809414937a1491ff04ec3dc780982a" name="a49809414937a1491ff04ec3dc780982a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a49809414937a1491ff04ec3dc780982a">◆ </a></span>jacobi_rotate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void jacobi_rotate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>R</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>k</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>l</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Computes a single rotation. </p>
|
||||
<p>jacobi_rotate computes a single rotation for Jacobi's rotation algorithm. It starts by calculating tau, t (tan), c (cos), s (sin) and then updates A and R at rows/columsn k and l.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>Matrix A<sup> (m) </sup> </td></tr>
|
||||
<tr><td class="paramname">R</td><td>The rotation matrix R<sup> (m) </sup> </td></tr>
|
||||
<tr><td class="paramname">k</td><td>Index of the row with the element of largest absolute value </td></tr>
|
||||
<tr><td class="paramname">l</td><td>Index of the column with the element of largest absolute value</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Void </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
239
doc/html/jacobi_8hpp.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/jacobi.hpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">jacobi.hpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Function prototypes for the jacobi rotation algorithm.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <armadillo></code><br />
|
||||
</div>
|
||||
<p><a href="jacobi_8hpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a49809414937a1491ff04ec3dc780982a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a">jacobi_rotate</a> (arma::mat &A, arma::mat &R, int k, int l)</td></tr>
|
||||
<tr class="memdesc:a49809414937a1491ff04ec3dc780982a"><td class="mdescLeft"> </td><td class="mdescRight">Computes a single rotation. <br /></td></tr>
|
||||
<tr class="separator:a49809414937a1491ff04ec3dc780982a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5a8da00df38bec1046249e8589a8aad0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi_eigensolver</a> (const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged)</td></tr>
|
||||
<tr class="memdesc:a5a8da00df38bec1046249e8589a8aad0"><td class="mdescLeft"> </td><td class="mdescRight">Solves the eigenvalue problem using the jacobi rotation method. <br /></td></tr>
|
||||
<tr class="separator:a5a8da00df38bec1046249e8589a8aad0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Function prototypes for the jacobi rotation algorithm. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000006">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a5a8da00df38bec1046249e8589a8aad0" name="a5a8da00df38bec1046249e8589a8aad0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5a8da00df38bec1046249e8589a8aad0">◆ </a></span>jacobi_eigensolver()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void jacobi_eigensolver </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>eps</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::vec & </td>
|
||||
<td class="paramname"><em>eigenvalues</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>eigenvectors</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const int </td>
|
||||
<td class="paramname"><em>maxiter</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>iterations</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">bool & </td>
|
||||
<td class="paramname"><em>converged</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Solves the eigenvalue problem using the jacobi rotation method. </p>
|
||||
<p>jacobi_eigensolver Initializes matrices A_m and R before going into the main loop.</p>
|
||||
<p>For each iteration of the loop, it finds the largest absolute off-diagonal value of A_m, and then calls jacobi_rotate. The loop stops when the largest off-diagonal is less than the tolerance (eps) or if the maximum number of iterations has been reached.</p>
|
||||
<p>The last thing this function does is to sort the eigenvalues and the corresponding eigenvectors in ascending order.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>The initial matrix to be solved </td></tr>
|
||||
<tr><td class="paramname">eps</td><td>Tolerance </td></tr>
|
||||
<tr><td class="paramname">eigenvalues</td><td>A vector that will contain the computed eigenvalues </td></tr>
|
||||
<tr><td class="paramname">eigenvectors</td><td>A Matrix that will contain the computed eigenvectors </td></tr>
|
||||
<tr><td class="paramname">maxiter</td><td>The max number of iterations allowed </td></tr>
|
||||
<tr><td class="paramname">iterations</td><td>To keep track of how many iterations the algorithm used </td></tr>
|
||||
<tr><td class="paramname">converged</td><td>Tells the user if the algorithm has converged</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Void </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a49809414937a1491ff04ec3dc780982a" name="a49809414937a1491ff04ec3dc780982a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a49809414937a1491ff04ec3dc780982a">◆ </a></span>jacobi_rotate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void jacobi_rotate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>R</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>k</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>l</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Computes a single rotation. </p>
|
||||
<p>jacobi_rotate computes a single rotation for Jacobi's rotation algorithm. It starts by calculating tau, t (tan), c (cos), s (sin) and then updates A and R at rows/columsn k and l.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>Matrix A<sup> (m) </sup> </td></tr>
|
||||
<tr><td class="paramname">R</td><td>The rotation matrix R<sup> (m) </sup> </td></tr>
|
||||
<tr><td class="paramname">k</td><td>Index of the row with the element of largest absolute value </td></tr>
|
||||
<tr><td class="paramname">l</td><td>Index of the column with the element of largest absolute value</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Void </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
104
doc/html/jacobi_8hpp_source.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/jacobi.hpp Source File</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">jacobi.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="jacobi_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#ifndef __JACOBI__</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#define __JACOBI__</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include <armadillo></span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keywordtype">void</span> <a class="code hl_function" href="jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a">jacobi_rotate</a>(arma::mat& A, arma::mat& R, <span class="keywordtype">int</span> k, <span class="keywordtype">int</span> l);</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keywordtype">void</span> <a class="code hl_function" href="jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi_eigensolver</a>(<span class="keyword">const</span> arma::mat& A, </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">double</span> eps, </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> arma::vec& eigenvalues, </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> arma::mat& eigenvectors, </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">const</span> <span class="keywordtype">int</span> maxiter, </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">int</span>& iterations, </div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">bool</span>& converged);</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="ajacobi_8hpp_html_a49809414937a1491ff04ec3dc780982a"><div class="ttname"><a href="jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a">jacobi_rotate</a></div><div class="ttdeci">void jacobi_rotate(arma::mat &A, arma::mat &R, int k, int l)</div><div class="ttdoc">Computes a single rotation.</div><div class="ttdef"><b>Definition:</b> jacobi.cpp:17</div></div>
|
||||
<div class="ttc" id="ajacobi_8hpp_html_a5a8da00df38bec1046249e8589a8aad0"><div class="ttname"><a href="jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0">jacobi_eigensolver</a></div><div class="ttdeci">void jacobi_eigensolver(const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged)</div><div class="ttdoc">Solves the eigenvalue problem using the jacobi rotation method.</div><div class="ttdef"><b>Definition:</b> jacobi.cpp:56</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
34
doc/html/jquery.js
vendored
Normal file
115
doc/html/main_8cpp.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: main.cpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">main.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Main program for Project 2.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="jacobi_8hpp_source.html">jacobi.hpp</a>"</code><br />
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a53cac9c8c53af2f5786024fc55ca3864"><td class="memItemLeft" align="right" valign="top"><a id="a53cac9c8c53af2f5786024fc55ca3864" name="a53cac9c8c53af2f5786024fc55ca3864"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>write_transformation_dense</b> (int N)</td></tr>
|
||||
<tr class="separator:a53cac9c8c53af2f5786024fc55ca3864"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acbb39b9c7880e8c390ff599f30a44388"><td class="memItemLeft" align="right" valign="top"><a id="acbb39b9c7880e8c390ff599f30a44388" name="acbb39b9c7880e8c390ff599f30a44388"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>write_transformation_tridiag</b> (int N)</td></tr>
|
||||
<tr class="separator:acbb39b9c7880e8c390ff599f30a44388"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a60bac2011e71020815da55a734cb3e89"><td class="memItemLeft" align="right" valign="top"><a id="a60bac2011e71020815da55a734cb3e89" name="a60bac2011e71020815da55a734cb3e89"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>write_eigenvec</b> (int N)</td></tr>
|
||||
<tr class="separator:a60bac2011e71020815da55a734cb3e89"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top"><a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>main</b> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Main program for Project 2. </p>
|
||||
<p>The program performs the Jacobi rotation method. The size of the matrix, and number of transformations performed are written to file. Eigenvector correstonding to the 3 smallest eigenvalues for matrices of size 6x6 and 100x100 are written to file.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000002">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
301
doc/html/matrix_8cpp.html
Normal file
@@ -0,0 +1,301 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: matrix.cpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">matrix.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Function prototypes for creating tridiagonal matrices.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>"</code><br />
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aa524feaf9f44790470df4cb99bb714af"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8cpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a> (const arma::vec &a, const arma::vec &d, const arma::vec &e)</td></tr>
|
||||
<tr class="memdesc:aa524feaf9f44790470df4cb99bb714af"><td class="mdescLeft"> </td><td class="mdescRight">Create a tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:aa524feaf9f44790470df4cb99bb714af"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a65fae0d4bec72cf4f66764ed100f20ca"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8cpp.html#a65fae0d4bec72cf4f66764ed100f20ca">create_tridiagonal</a> (int n, double a, double d, double e)</td></tr>
|
||||
<tr class="memdesc:a65fae0d4bec72cf4f66764ed100f20ca"><td class="mdescLeft"> </td><td class="mdescRight">Create a tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:a65fae0d4bec72cf4f66764ed100f20ca"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a564688c96a8e4282e995a0663545d627"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8cpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a> (int n, double a, double d)</td></tr>
|
||||
<tr class="memdesc:a564688c96a8e4282e995a0663545d627"><td class="mdescLeft"> </td><td class="mdescRight">Create a symmetric tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:a564688c96a8e4282e995a0663545d627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af42e501cbf71bec9c77ececc22723df9"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8cpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a> (arma::mat &A, int &k, int &l)</td></tr>
|
||||
<tr class="memdesc:af42e501cbf71bec9c77ececc22723df9"><td class="mdescLeft"> </td><td class="mdescRight">Find the off-diagonal element with the largest absolute value. <br /></td></tr>
|
||||
<tr class="separator:af42e501cbf71bec9c77ececc22723df9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Function prototypes for creating tridiagonal matrices. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a564688c96a8e4282e995a0663545d627" name="a564688c96a8e4282e995a0663545d627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a564688c96a8e4282e995a0663545d627">◆ </a></span>create_symmetric_tridiagonal()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_symmetric_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>n</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a symmetric tridiagonal matrix. </p>
|
||||
<p>create_symmetric_tridiagonal creates a symmetric tridiagonal matrix by calling create_tridiagonal with the same signature for the off-diagonals.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>The dimensions of the tridiagonal matrix </td></tr>
|
||||
<tr><td class="paramname">a</td><td>The signature for the off diagonals </td></tr>
|
||||
<tr><td class="paramname">d</td><td>The signature for the main diagonal</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa524feaf9f44790470df4cb99bb714af" name="aa524feaf9f44790470df4cb99bb714af"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa524feaf9f44790470df4cb99bb714af">◆ </a></span>create_tridiagonal() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>e</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a tridiagonal matrix. </p>
|
||||
<p>create_tridiagonal creates a tridiagonal matrix by first creating a matrix, filled with zeros, of size NxN where N is the size of the main diagonal matrix. Then it will fill all the values from the vector parameters into the matrix and return it.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>Vector for the lower diagonal of size N-1 </td></tr>
|
||||
<tr><td class="paramname">d</td><td>Vector for the main diagonal of size N </td></tr>
|
||||
<tr><td class="paramname">e</td><td>Vector for the upper diagonal of size N-1</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a65fae0d4bec72cf4f66764ed100f20ca" name="a65fae0d4bec72cf4f66764ed100f20ca"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a65fae0d4bec72cf4f66764ed100f20ca">◆ </a></span>create_tridiagonal() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>n</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>e</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a tridiagonal matrix. </p>
|
||||
<p>This is an overload that takes doubles for the diagonals instead of vectors. It will create 3 vectors that are filled with the signature provided in the arguments, and then call create_tridiagonal with the vectors as the arguments.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>The dimensions of the tridiagonal matrix </td></tr>
|
||||
<tr><td class="paramname">a</td><td>The signature for the lower diagonal </td></tr>
|
||||
<tr><td class="paramname">d</td><td>The signature for the main diagonal </td></tr>
|
||||
<tr><td class="paramname">e</td><td>The signature for the upper diagonal</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="af42e501cbf71bec9c77ececc22723df9" name="af42e501cbf71bec9c77ececc22723df9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af42e501cbf71bec9c77ececc22723df9">◆ </a></span>max_offdiag_symmetric()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">double max_offdiag_symmetric </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>k</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>l</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Find the off-diagonal element with the largest absolute value. </p>
|
||||
<p>max_offdiag_symmetric find the element with the largest absolute value that isn't in the diagonal. Since this function assumes that the matrix that is given is symmetrical, we only need to loop through the upper diagonals of the matrix.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>Symmetric matrix </td></tr>
|
||||
<tr><td class="paramname">k</td><td>Variable to store the row of the return value </td></tr>
|
||||
<tr><td class="paramname">l</td><td>Variable to store the column of the return value</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Double </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
307
doc/html/matrix_8hpp.html
Normal file
@@ -0,0 +1,307 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/matrix.hpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">matrix.hpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Function prototypes for creating tridiagonal matrices.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <armadillo></code><br />
|
||||
</div>
|
||||
<p><a href="matrix_8hpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aa524feaf9f44790470df4cb99bb714af"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a> (const arma::vec &a, const arma::vec &d, const arma::vec &e)</td></tr>
|
||||
<tr class="memdesc:aa524feaf9f44790470df4cb99bb714af"><td class="mdescLeft"> </td><td class="mdescRight">Create a tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:aa524feaf9f44790470df4cb99bb714af"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a65fae0d4bec72cf4f66764ed100f20ca"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8hpp.html#a65fae0d4bec72cf4f66764ed100f20ca">create_tridiagonal</a> (int n, double a, double d, double e)</td></tr>
|
||||
<tr class="memdesc:a65fae0d4bec72cf4f66764ed100f20ca"><td class="mdescLeft"> </td><td class="mdescRight">Create a tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:a65fae0d4bec72cf4f66764ed100f20ca"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a564688c96a8e4282e995a0663545d627"><td class="memItemLeft" align="right" valign="top">arma::mat </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a> (int n, double a, double d)</td></tr>
|
||||
<tr class="memdesc:a564688c96a8e4282e995a0663545d627"><td class="mdescLeft"> </td><td class="mdescRight">Create a symmetric tridiagonal matrix. <br /></td></tr>
|
||||
<tr class="separator:a564688c96a8e4282e995a0663545d627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af42e501cbf71bec9c77ececc22723df9"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a> (arma::mat &A, int &k, int &l)</td></tr>
|
||||
<tr class="memdesc:af42e501cbf71bec9c77ececc22723df9"><td class="mdescLeft"> </td><td class="mdescRight">Find the off-diagonal element with the largest absolute value. <br /></td></tr>
|
||||
<tr class="separator:af42e501cbf71bec9c77ececc22723df9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Function prototypes for creating tridiagonal matrices. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000007">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a564688c96a8e4282e995a0663545d627" name="a564688c96a8e4282e995a0663545d627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a564688c96a8e4282e995a0663545d627">◆ </a></span>create_symmetric_tridiagonal()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_symmetric_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>n</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a symmetric tridiagonal matrix. </p>
|
||||
<p>create_symmetric_tridiagonal creates a symmetric tridiagonal matrix by calling create_tridiagonal with the same signature for the off-diagonals.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>The dimensions of the tridiagonal matrix </td></tr>
|
||||
<tr><td class="paramname">a</td><td>The signature for the off diagonals </td></tr>
|
||||
<tr><td class="paramname">d</td><td>The signature for the main diagonal</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa524feaf9f44790470df4cb99bb714af" name="aa524feaf9f44790470df4cb99bb714af"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa524feaf9f44790470df4cb99bb714af">◆ </a></span>create_tridiagonal() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const arma::vec & </td>
|
||||
<td class="paramname"><em>e</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a tridiagonal matrix. </p>
|
||||
<p>create_tridiagonal creates a tridiagonal matrix by first creating a matrix, filled with zeros, of size NxN where N is the size of the main diagonal matrix. Then it will fill all the values from the vector parameters into the matrix and return it.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>Vector for the lower diagonal of size N-1 </td></tr>
|
||||
<tr><td class="paramname">d</td><td>Vector for the main diagonal of size N </td></tr>
|
||||
<tr><td class="paramname">e</td><td>Vector for the upper diagonal of size N-1</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a65fae0d4bec72cf4f66764ed100f20ca" name="a65fae0d4bec72cf4f66764ed100f20ca"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a65fae0d4bec72cf4f66764ed100f20ca">◆ </a></span>create_tridiagonal() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">arma::mat create_tridiagonal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>n</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>e</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create a tridiagonal matrix. </p>
|
||||
<p>This is an overload that takes doubles for the diagonals instead of vectors. It will create 3 vectors that are filled with the signature provided in the arguments, and then call create_tridiagonal with the vectors as the arguments.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>The dimensions of the tridiagonal matrix </td></tr>
|
||||
<tr><td class="paramname">a</td><td>The signature for the lower diagonal </td></tr>
|
||||
<tr><td class="paramname">d</td><td>The signature for the main diagonal </td></tr>
|
||||
<tr><td class="paramname">e</td><td>The signature for the upper diagonal</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>arma::matrix </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="af42e501cbf71bec9c77ececc22723df9" name="af42e501cbf71bec9c77ececc22723df9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af42e501cbf71bec9c77ececc22723df9">◆ </a></span>max_offdiag_symmetric()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">double max_offdiag_symmetric </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::mat & </td>
|
||||
<td class="paramname"><em>A</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>k</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int & </td>
|
||||
<td class="paramname"><em>l</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Find the off-diagonal element with the largest absolute value. </p>
|
||||
<p>max_offdiag_symmetric find the element with the largest absolute value that isn't in the diagonal. Since this function assumes that the matrix that is given is symmetrical, we only need to loop through the upper diagonals of the matrix.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">A</td><td>Symmetric matrix </td></tr>
|
||||
<tr><td class="paramname">k</td><td>Variable to store the row of the return value </td></tr>
|
||||
<tr><td class="paramname">l</td><td>Variable to store the column of the return value</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Double </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
106
doc/html/matrix_8hpp_source.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/matrix.hpp Source File</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">matrix.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="matrix_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#ifndef __MATRIX__</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#define __MATRIX__</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <armadillo></span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">const</span> arma::vec& a, </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">const</span> arma::vec& d, </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">const</span> arma::vec& e);</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> e);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d);</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="keywordtype">double</span> <a class="code hl_function" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a>(arma::mat& A, <span class="keywordtype">int</span>& k, <span class="keywordtype">int</span>& l);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="amatrix_8hpp_html_a564688c96a8e4282e995a0663545d627"><div class="ttname"><a href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a></div><div class="ttdeci">arma::mat create_symmetric_tridiagonal(int n, double a, double d)</div><div class="ttdoc">Create a symmetric tridiagonal matrix.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:44</div></div>
|
||||
<div class="ttc" id="amatrix_8hpp_html_aa524feaf9f44790470df4cb99bb714af"><div class="ttname"><a href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a></div><div class="ttdeci">arma::mat create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e)</div><div class="ttdoc">Create a tridiagonal matrix.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:12</div></div>
|
||||
<div class="ttc" id="amatrix_8hpp_html_af42e501cbf71bec9c77ececc22723df9"><div class="ttname"><a href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a></div><div class="ttdeci">double max_offdiag_symmetric(arma::mat &A, int &k, int &l)</div><div class="ttdoc">Find the off-diagonal element with the largest absolute value.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:49</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
136
doc/html/menu.js
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
var url;
|
||||
var link;
|
||||
link = data.children[i].url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
} else {
|
||||
url = relPath+link;
|
||||
}
|
||||
result+='<li><a href="'+url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var searchBoxHtml;
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<div class="left">'+
|
||||
'<form id="FSearchBox" action="'+relPath+searchPage+
|
||||
'" method="get"><span id="MSearchSelectExt"> </span>'+
|
||||
'<input type="text" id="MSearchField" name="query" value="" placeholder="'+search+
|
||||
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
|
||||
' onblur="searchBox.OnSearchFieldFocus(false)"/>'+
|
||||
'</form>'+
|
||||
'</div>'+
|
||||
'<div class="right"></div>'+
|
||||
'</div>';
|
||||
} else {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<span class="left">'+
|
||||
'<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()"'+
|
||||
' onmouseout="return searchBox.OnSearchSelectHide()"> </span>'+
|
||||
'<input type="text" id="MSearchField" value="" placeholder="'+search+
|
||||
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
|
||||
'onblur="searchBox.OnSearchFieldFocus(false)" '+
|
||||
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
|
||||
'</span>'+
|
||||
'<span class="right"><a id="MSearchClose" '+
|
||||
'href="javascript:searchBox.CloseResultsWindow()">'+
|
||||
'<img id="MSearchCloseImg" border="0" src="'+relPath+
|
||||
'search/close.svg" alt=""/></a>'+
|
||||
'</span>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
|
||||
'<label class="main-menu-btn" for="main-menu-state">'+
|
||||
'<span class="main-menu-btn-icon"></span> '+
|
||||
'Toggle main menu visibility</label>'+
|
||||
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
|
||||
'</div>');
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchBoxHtml) {
|
||||
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
|
||||
}
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var prevWidth = 0;
|
||||
if ($mainMenuState.length) {
|
||||
function initResizableIfExists() {
|
||||
if (typeof initResizable==='function') initResizable();
|
||||
}
|
||||
// animate mobile menu
|
||||
$mainMenuState.change(function(e) {
|
||||
var $menu = $('#main-menu');
|
||||
var options = { duration: 250, step: initResizableIfExists };
|
||||
if (this.checked) {
|
||||
options['complete'] = function() { $menu.css('display', 'block') };
|
||||
$menu.hide().slideDown(options);
|
||||
} else {
|
||||
options['complete'] = function() { $menu.css('display', 'none') };
|
||||
$menu.show().slideUp(options);
|
||||
}
|
||||
});
|
||||
// set default menu visibility
|
||||
function resetState() {
|
||||
var $menu = $('#main-menu');
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var newWidth = $(window).outerWidth();
|
||||
if (newWidth!=prevWidth) {
|
||||
if ($(window).outerWidth()<768) {
|
||||
$mainMenuState.prop('checked',false); $menu.hide();
|
||||
$('#searchBoxPos1').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').hide();
|
||||
} else {
|
||||
$menu.show();
|
||||
$('#searchBoxPos1').empty();
|
||||
$('#searchBoxPos2').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').show();
|
||||
}
|
||||
if (typeof searchBox!=='undefined') {
|
||||
searchBox.CloseResultsWindow();
|
||||
}
|
||||
prevWidth = newWidth;
|
||||
}
|
||||
}
|
||||
$(window).ready(function() { resetState(); initResizableIfExists(); });
|
||||
$(window).resize(resetState);
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
||||
33
doc/html/menudata.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Main Page",url:"index.html"},
|
||||
{text:"Related Pages",url:"pages.html"},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"},
|
||||
{text:"File Members",url:"globals.html",children:[
|
||||
{text:"All",url:"globals.html"},
|
||||
{text:"Functions",url:"globals_func.html"},
|
||||
{text:"Macros",url:"globals_defs.html"}]}]}]}
|
||||
BIN
doc/html/nav_f.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
doc/html/nav_fd.png
Normal file
|
After Width: | Height: | Size: 169 B |
BIN
doc/html/nav_g.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
doc/html/nav_h.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
doc/html/nav_hd.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
doc/html/open.png
Normal file
|
After Width: | Height: | Size: 123 B |
86
doc/html/pages.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: Related Pages</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Related Pages</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all related documentation pages:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="bug.html" target="_self">Bug List</a></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
4
doc/html/search/all_0.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['bug_20list_0',['Bug List',['../bug.html',1,'']]]
|
||||
];
|
||||
5
doc/html/search/all_1.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['create_5fsymmetric_5ftridiagonal_0',['create_symmetric_tridiagonal',['../matrix_8cpp.html#a564688c96a8e4282e995a0663545d627',1,'create_symmetric_tridiagonal(int n, double a, double d): matrix.cpp'],['../matrix_8hpp.html#a564688c96a8e4282e995a0663545d627',1,'create_symmetric_tridiagonal(int n, double a, double d): matrix.cpp']]],
|
||||
['create_5ftridiagonal_1',['create_tridiagonal',['../matrix_8cpp.html#aa524feaf9f44790470df4cb99bb714af',1,'create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e): matrix.cpp'],['../matrix_8cpp.html#a65fae0d4bec72cf4f66764ed100f20ca',1,'create_tridiagonal(int n, double a, double d, double e): matrix.cpp'],['../matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af',1,'create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e): matrix.cpp'],['../matrix_8hpp.html#a65fae0d4bec72cf4f66764ed100f20ca',1,'create_tridiagonal(int n, double a, double d, double e): matrix.cpp']]]
|
||||
];
|
||||
4
doc/html/search/all_2.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]]
|
||||
];
|
||||
7
doc/html/search/all_3.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['jacobi_2ecpp_0',['jacobi.cpp',['../jacobi_8cpp.html',1,'']]],
|
||||
['jacobi_2ehpp_1',['jacobi.hpp',['../jacobi_8hpp.html',1,'']]],
|
||||
['jacobi_5feigensolver_2',['jacobi_eigensolver',['../jacobi_8cpp.html#a5a8da00df38bec1046249e8589a8aad0',1,'jacobi_eigensolver(const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged): jacobi.cpp'],['../jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0',1,'jacobi_eigensolver(const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged): jacobi.cpp']]],
|
||||
['jacobi_5frotate_3',['jacobi_rotate',['../jacobi_8cpp.html#a49809414937a1491ff04ec3dc780982a',1,'jacobi_rotate(arma::mat &A, arma::mat &R, int k, int l): jacobi.cpp'],['../jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a',1,'jacobi_rotate(arma::mat &A, arma::mat &R, int k, int l): jacobi.cpp']]]
|
||||
];
|
||||
7
doc/html/search/all_4.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['matrix_2ecpp_1',['matrix.cpp',['../matrix_8cpp.html',1,'']]],
|
||||
['matrix_2ehpp_2',['matrix.hpp',['../matrix_8hpp.html',1,'']]],
|
||||
['max_5foffdiag_5fsymmetric_3',['max_offdiag_symmetric',['../matrix_8cpp.html#af42e501cbf71bec9c77ececc22723df9',1,'max_offdiag_symmetric(arma::mat &A, int &k, int &l): matrix.cpp'],['../matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9',1,'max_offdiag_symmetric(arma::mat &A, int &k, int &l): matrix.cpp']]]
|
||||
];
|
||||
4
doc/html/search/all_5.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['scientific_5fformat_0',['scientific_format',['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec): utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector< double > &v, int width, int prec): utils.cpp'],['../utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384',1,'scientific_format(double d, int width=20, int prec=10): utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector< double > &v, int width=20, int prec=10): utils.cpp']]]
|
||||
];
|
||||
4
doc/html/search/all_6.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]]
|
||||
];
|
||||
5
doc/html/search/all_7.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
];
|
||||
31
doc/html/search/close.svg
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 11 11"
|
||||
height="11"
|
||||
width="11"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<path
|
||||
id="path12"
|
||||
d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
|
||||
style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
4
doc/html/search/defines_0.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]]
|
||||
];
|
||||
5
doc/html/search/files_0.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['jacobi_2ecpp_0',['jacobi.cpp',['../jacobi_8cpp.html',1,'']]],
|
||||
['jacobi_2ehpp_1',['jacobi.hpp',['../jacobi_8hpp.html',1,'']]]
|
||||
];
|
||||
6
doc/html/search/files_1.js
Normal file
@@ -0,0 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['matrix_2ecpp_1',['matrix.cpp',['../matrix_8cpp.html',1,'']]],
|
||||
['matrix_2ehpp_2',['matrix.hpp',['../matrix_8hpp.html',1,'']]]
|
||||
];
|
||||
4
doc/html/search/files_2.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]]
|
||||
];
|
||||
5
doc/html/search/files_3.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
];
|
||||
5
doc/html/search/functions_0.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['create_5fsymmetric_5ftridiagonal_0',['create_symmetric_tridiagonal',['../matrix_8cpp.html#a564688c96a8e4282e995a0663545d627',1,'create_symmetric_tridiagonal(int n, double a, double d): matrix.cpp'],['../matrix_8hpp.html#a564688c96a8e4282e995a0663545d627',1,'create_symmetric_tridiagonal(int n, double a, double d): matrix.cpp']]],
|
||||
['create_5ftridiagonal_1',['create_tridiagonal',['../matrix_8cpp.html#aa524feaf9f44790470df4cb99bb714af',1,'create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e): matrix.cpp'],['../matrix_8cpp.html#a65fae0d4bec72cf4f66764ed100f20ca',1,'create_tridiagonal(int n, double a, double d, double e): matrix.cpp'],['../matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af',1,'create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e): matrix.cpp'],['../matrix_8hpp.html#a65fae0d4bec72cf4f66764ed100f20ca',1,'create_tridiagonal(int n, double a, double d, double e): matrix.cpp']]]
|
||||
];
|
||||
5
doc/html/search/functions_1.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['jacobi_5feigensolver_0',['jacobi_eigensolver',['../jacobi_8cpp.html#a5a8da00df38bec1046249e8589a8aad0',1,'jacobi_eigensolver(const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged): jacobi.cpp'],['../jacobi_8hpp.html#a5a8da00df38bec1046249e8589a8aad0',1,'jacobi_eigensolver(const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged): jacobi.cpp']]],
|
||||
['jacobi_5frotate_1',['jacobi_rotate',['../jacobi_8cpp.html#a49809414937a1491ff04ec3dc780982a',1,'jacobi_rotate(arma::mat &A, arma::mat &R, int k, int l): jacobi.cpp'],['../jacobi_8hpp.html#a49809414937a1491ff04ec3dc780982a',1,'jacobi_rotate(arma::mat &A, arma::mat &R, int k, int l): jacobi.cpp']]]
|
||||
];
|
||||
4
doc/html/search/functions_2.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['max_5foffdiag_5fsymmetric_0',['max_offdiag_symmetric',['../matrix_8cpp.html#af42e501cbf71bec9c77ececc22723df9',1,'max_offdiag_symmetric(arma::mat &A, int &k, int &l): matrix.cpp'],['../matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9',1,'max_offdiag_symmetric(arma::mat &A, int &k, int &l): matrix.cpp']]]
|
||||
];
|
||||
4
doc/html/search/functions_3.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['scientific_5fformat_0',['scientific_format',['../utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746',1,'scientific_format(double d, int width, int prec): utils.cpp'],['../utils_8cpp.html#a58565270b643b24e3132f38c653e0199',1,'scientific_format(const std::vector< double > &v, int width, int prec): utils.cpp'],['../utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384',1,'scientific_format(double d, int width=20, int prec=10): utils.cpp'],['../utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d',1,'scientific_format(const std::vector< double > &v, int width=20, int prec=10): utils.cpp']]]
|
||||
];
|
||||
37
doc/html/search/mag.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
37
doc/html/search/mag_d.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
74
doc/html/search/mag_sel.svg
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
sodipodi:docname="mag_sel.svg"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="2096"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="32"
|
||||
inkscape:cx="5.9792688"
|
||||
inkscape:cy="1.1436277"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
74
doc/html/search/mag_seld.svg
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
sodipodi:docname="mag_sel.svg"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="2096"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="32"
|
||||
inkscape:cx="5.9792688"
|
||||
inkscape:cy="1.1436277"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#C5C5C5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
4
doc/html/search/pages_0.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['bug_20list_0',['Bug List',['../bug.html',1,'']]]
|
||||
];
|
||||
291
doc/html/search/search.css
Normal file
@@ -0,0 +1,291 @@
|
||||
/*---------------- Search Box positioning */
|
||||
|
||||
#main-menu > li:last-child {
|
||||
/* This <li> object is the parent of the search bar */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/*---------------- Search box styling */
|
||||
|
||||
.SRPage * {
|
||||
font-weight: normal;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
dark-mode-toggle {
|
||||
margin-left: 5px;
|
||||
display: flex;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#MSearchBox {
|
||||
display: inline-block;
|
||||
white-space : nowrap;
|
||||
background: var(--search-background-color);
|
||||
border-radius: 0.65em;
|
||||
box-shadow: var(--search-box-shadow);
|
||||
z-index: 102;
|
||||
}
|
||||
|
||||
#MSearchBox .left {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchSelect {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
background-image: var(--search-magnification-select-image);
|
||||
margin: 0 0 0 0.3em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#MSearchSelectExt {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 10px;
|
||||
height: 19px;
|
||||
background-image: var(--search-magnification-image);
|
||||
margin: 0 0 0 0.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#MSearchField {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 7.5em;
|
||||
height: 19px;
|
||||
margin: 0 0.15em;
|
||||
padding: 0;
|
||||
line-height: 1em;
|
||||
border:none;
|
||||
color: var(--search-foreground-color);
|
||||
outline: none;
|
||||
font-family: var(--font-family-search);
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
@media(hover: none) {
|
||||
/* to avoid zooming on iOS */
|
||||
#MSearchField {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#MSearchBox .right {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchClose {
|
||||
display: none;
|
||||
font-size: inherit;
|
||||
background : none;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
|
||||
#MSearchCloseImg {
|
||||
padding: 0.3em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.MSearchBoxActive #MSearchField {
|
||||
color: var(--search-active-color);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*---------------- Search filter selection */
|
||||
|
||||
#MSearchSelectWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid var(--search-filter-border-color);
|
||||
background-color: var(--search-filter-background-color);
|
||||
z-index: 10001;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.SelectItem {
|
||||
font: 8pt var(--font-family-search);
|
||||
padding-left: 2px;
|
||||
padding-right: 12px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
span.SelectionMark {
|
||||
margin-right: 4px;
|
||||
font-family: var(--font-family-monospace);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem {
|
||||
display: block;
|
||||
outline-style: none;
|
||||
color: var(--search-filter-foreground-color);
|
||||
text-decoration: none;
|
||||
padding-left: 6px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
a.SelectItem:focus,
|
||||
a.SelectItem:active {
|
||||
color: var(--search-filter-foreground-color);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem:hover {
|
||||
color: var(--search-filter-highlight-text-color);
|
||||
background-color: var(--search-filter-highlight-bg-color);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*---------------- Search results window */
|
||||
|
||||
iframe#MSearchResults {
|
||||
/*width: 60ex;*/
|
||||
height: 15em;
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid var(--search-results-border-color);
|
||||
background-color: var(--search-results-background-color);
|
||||
z-index:10000;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
|
||||
#SRIndex {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.SREntry {
|
||||
font-size: 10pt;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
|
||||
.SRPage .SREntry {
|
||||
font-size: 8pt;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
div.SRPage {
|
||||
margin: 5px 2px;
|
||||
background-color: var(--search-results-background-color);
|
||||
}
|
||||
|
||||
.SRChildren {
|
||||
padding-left: 3ex; padding-bottom: .5em
|
||||
}
|
||||
|
||||
.SRPage .SRChildren {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.SRSymbol {
|
||||
font-weight: bold;
|
||||
color: var(--search-results-foreground-color);
|
||||
font-family: var(--font-family-search);
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRScope {
|
||||
display: block;
|
||||
color: var(--search-results-foreground-color);
|
||||
font-family: var(--font-family-search);
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRSymbol:focus, a.SRSymbol:active,
|
||||
a.SRScope:focus, a.SRScope:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.SRScope {
|
||||
padding-left: 4px;
|
||||
font-family: var(--font-family-search);
|
||||
}
|
||||
|
||||
.SRPage .SRStatus {
|
||||
padding: 2px 5px;
|
||||
font-size: 8pt;
|
||||
font-style: italic;
|
||||
font-family: var(--font-family-search);
|
||||
}
|
||||
|
||||
.SRResult {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.searchresults {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/*---------------- External search page results */
|
||||
|
||||
.pages b {
|
||||
color: white;
|
||||
padding: 5px 5px 3px 5px;
|
||||
background-image: var(--nav-gradient-active-image-parent);
|
||||
background-repeat: repeat-x;
|
||||
text-shadow: 0 1px 1px #000000;
|
||||
}
|
||||
|
||||
.pages {
|
||||
line-height: 17px;
|
||||
margin-left: 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hl {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.searchpages {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
816
doc/html/search/search.js
Normal file
@@ -0,0 +1,816 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function convertToId(search)
|
||||
{
|
||||
var result = '';
|
||||
for (i=0;i<search.length;i++)
|
||||
{
|
||||
var c = search.charAt(i);
|
||||
var cn = c.charCodeAt(0);
|
||||
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
|
||||
{
|
||||
result+=c;
|
||||
}
|
||||
else if (cn<16)
|
||||
{
|
||||
result+="_0"+cn.toString(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
result+="_"+cn.toString(16);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getXPos(item)
|
||||
{
|
||||
var x = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
x += item.offsetLeft;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
function getYPos(item)
|
||||
{
|
||||
var y = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
y += item.offsetTop;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
|
||||
/* A class handling everything associated with the search panel.
|
||||
|
||||
Parameters:
|
||||
name - The name of the global variable that will be
|
||||
storing this instance. Is needed to be able to set timeouts.
|
||||
resultPath - path to use for external files
|
||||
*/
|
||||
function SearchBox(name, resultsPath, extension)
|
||||
{
|
||||
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||
if (!extension || extension == "") { extension = ".html"; }
|
||||
|
||||
// ---------- Instance variables
|
||||
this.name = name;
|
||||
this.resultsPath = resultsPath;
|
||||
this.keyTimeout = 0;
|
||||
this.keyTimeoutLength = 500;
|
||||
this.closeSelectionTimeout = 300;
|
||||
this.lastSearchValue = "";
|
||||
this.lastResultsPage = "";
|
||||
this.hideTimeout = 0;
|
||||
this.searchIndex = 0;
|
||||
this.searchActive = false;
|
||||
this.extension = extension;
|
||||
|
||||
// ----------- DOM Elements
|
||||
|
||||
this.DOMSearchField = function()
|
||||
{ return document.getElementById("MSearchField"); }
|
||||
|
||||
this.DOMSearchSelect = function()
|
||||
{ return document.getElementById("MSearchSelect"); }
|
||||
|
||||
this.DOMSearchSelectWindow = function()
|
||||
{ return document.getElementById("MSearchSelectWindow"); }
|
||||
|
||||
this.DOMPopupSearchResults = function()
|
||||
{ return document.getElementById("MSearchResults"); }
|
||||
|
||||
this.DOMPopupSearchResultsWindow = function()
|
||||
{ return document.getElementById("MSearchResultsWindow"); }
|
||||
|
||||
this.DOMSearchClose = function()
|
||||
{ return document.getElementById("MSearchClose"); }
|
||||
|
||||
this.DOMSearchBox = function()
|
||||
{ return document.getElementById("MSearchBox"); }
|
||||
|
||||
// ------------ Event Handlers
|
||||
|
||||
// Called when focus is added or removed from the search field.
|
||||
this.OnSearchFieldFocus = function(isActive)
|
||||
{
|
||||
this.Activate(isActive);
|
||||
}
|
||||
|
||||
this.OnSearchSelectShow = function()
|
||||
{
|
||||
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||
var searchField = this.DOMSearchSelect();
|
||||
|
||||
var left = getXPos(searchField);
|
||||
var top = getYPos(searchField);
|
||||
top += searchField.offsetHeight;
|
||||
|
||||
// show search selection popup
|
||||
searchSelectWindow.style.display='block';
|
||||
searchSelectWindow.style.left = left + 'px';
|
||||
searchSelectWindow.style.top = top + 'px';
|
||||
|
||||
// stop selection hide timer
|
||||
if (this.hideTimeout)
|
||||
{
|
||||
clearTimeout(this.hideTimeout);
|
||||
this.hideTimeout=0;
|
||||
}
|
||||
return false; // to avoid "image drag" default event
|
||||
}
|
||||
|
||||
this.OnSearchSelectHide = function()
|
||||
{
|
||||
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
|
||||
this.closeSelectionTimeout);
|
||||
}
|
||||
|
||||
// Called when the content of the search field is changed.
|
||||
this.OnSearchFieldChange = function(evt)
|
||||
{
|
||||
if (this.keyTimeout) // kill running timer
|
||||
{
|
||||
clearTimeout(this.keyTimeout);
|
||||
this.keyTimeout = 0;
|
||||
}
|
||||
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 || e.keyCode==13)
|
||||
{
|
||||
if (e.shiftKey==1)
|
||||
{
|
||||
this.OnSearchSelectShow();
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
child.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
}
|
||||
else if (e.keyCode==27) // Escape out of the search field
|
||||
{
|
||||
this.DOMSearchField().blur();
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
this.Activate(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// strip whitespaces
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
|
||||
if (searchValue != this.lastSearchValue) // search value has changed
|
||||
{
|
||||
if (searchValue != "") // non-empty search
|
||||
{
|
||||
// set timer for search update
|
||||
this.keyTimeout = setTimeout(this.name + '.Search()',
|
||||
this.keyTimeoutLength);
|
||||
}
|
||||
else // empty search field
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.SelectItemCount = function(id)
|
||||
{
|
||||
var count=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
this.SelectItemSet = function(id)
|
||||
{
|
||||
var i,j=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
var node = child.firstChild;
|
||||
if (j==id)
|
||||
{
|
||||
node.innerHTML='•';
|
||||
}
|
||||
else
|
||||
{
|
||||
node.innerHTML=' ';
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when an search filter selection is made.
|
||||
// set item with index id as the active item
|
||||
this.OnSelectItem = function(id)
|
||||
{
|
||||
this.searchIndex = id;
|
||||
this.SelectItemSet(id);
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||
{
|
||||
this.Search();
|
||||
}
|
||||
}
|
||||
|
||||
this.OnSearchSelectKey = function(evt)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||
{
|
||||
this.searchIndex++;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||
{
|
||||
this.searchIndex--;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==13 || e.keyCode==27)
|
||||
{
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
this.CloseSelectionWindow();
|
||||
this.DOMSearchField().focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------- Actions
|
||||
|
||||
// Closes the results window.
|
||||
this.CloseResultsWindow = function()
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.Activate(false);
|
||||
}
|
||||
|
||||
this.CloseSelectionWindow = function()
|
||||
{
|
||||
this.DOMSearchSelectWindow().style.display = 'none';
|
||||
}
|
||||
|
||||
// Performs a search.
|
||||
this.Search = function()
|
||||
{
|
||||
this.keyTimeout = 0;
|
||||
|
||||
// strip leading whitespace
|
||||
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||
|
||||
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||
var idxChar = searchValue.substr(0, 1).toLowerCase();
|
||||
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
|
||||
{
|
||||
idxChar = searchValue.substr(0, 2);
|
||||
}
|
||||
|
||||
var jsFile;
|
||||
|
||||
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
|
||||
if (idx!=-1)
|
||||
{
|
||||
var hexCode=idx.toString(16);
|
||||
jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js';
|
||||
}
|
||||
|
||||
var loadJS = function(url, impl, loc){
|
||||
var scriptTag = document.createElement('script');
|
||||
scriptTag.src = url;
|
||||
scriptTag.onload = impl;
|
||||
scriptTag.onreadystatechange = impl;
|
||||
loc.appendChild(scriptTag);
|
||||
}
|
||||
|
||||
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||
var domSearchBox = this.DOMSearchBox();
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
var domSearchClose = this.DOMSearchClose();
|
||||
var resultsPath = this.resultsPath;
|
||||
|
||||
var handleResults = function() {
|
||||
document.getElementById("Loading").style.display="none";
|
||||
if (typeof searchData !== 'undefined') {
|
||||
createResults(resultsPath);
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
}
|
||||
|
||||
searchResults.Search(searchValue);
|
||||
|
||||
if (domPopupSearchResultsWindow.style.display!='block')
|
||||
{
|
||||
domSearchClose.style.display = 'inline-block';
|
||||
var left = getXPos(domSearchBox) + 150;
|
||||
var top = getYPos(domSearchBox) + 20;
|
||||
domPopupSearchResultsWindow.style.display = 'block';
|
||||
left -= domPopupSearchResults.offsetWidth;
|
||||
var maxWidth = document.body.clientWidth;
|
||||
var maxHeight = document.body.clientHeight;
|
||||
var width = 300;
|
||||
if (left<10) left=10;
|
||||
if (width+left+8>maxWidth) width=maxWidth-left-8;
|
||||
var height = 400;
|
||||
if (height+top+8>maxHeight) height=maxHeight-top-8;
|
||||
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||
domPopupSearchResultsWindow.style.height = height + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
if (jsFile) {
|
||||
loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow());
|
||||
} else {
|
||||
handleResults();
|
||||
}
|
||||
|
||||
this.lastSearchValue = searchValue;
|
||||
}
|
||||
|
||||
// -------- Activation Functions
|
||||
|
||||
// Activates or deactivates the search panel, resetting things to
|
||||
// their default values if necessary.
|
||||
this.Activate = function(isActive)
|
||||
{
|
||||
if (isActive || // open it
|
||||
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||
)
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||
this.searchActive = true;
|
||||
}
|
||||
else if (!isActive) // directly remove the panel
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||
this.searchActive = false;
|
||||
this.lastSearchValue = ''
|
||||
this.lastResultsPage = '';
|
||||
this.DOMSearchField().value = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// The class that handles everything on the search results page.
|
||||
function SearchResults(name)
|
||||
{
|
||||
// The number of matches from the last run of <Search()>.
|
||||
this.lastMatchCount = 0;
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
|
||||
// Toggles the visibility of the passed element ID.
|
||||
this.FindChildElement = function(id)
|
||||
{
|
||||
var parentElement = document.getElementById(id);
|
||||
var element = parentElement.firstChild;
|
||||
|
||||
while (element && element!=parentElement)
|
||||
{
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
|
||||
{
|
||||
element = element.firstChild;
|
||||
}
|
||||
else if (element.nextSibling)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
element = element.parentNode;
|
||||
}
|
||||
while (element && element!=parentElement && !element.nextSibling);
|
||||
|
||||
if (element && element!=parentElement)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.Toggle = function(id)
|
||||
{
|
||||
var element = this.FindChildElement(id);
|
||||
if (element)
|
||||
{
|
||||
if (element.style.display == 'block')
|
||||
{
|
||||
element.style.display = 'none';
|
||||
}
|
||||
else
|
||||
{
|
||||
element.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Searches for the passed string. If there is no parameter,
|
||||
// it takes it from the URL query.
|
||||
//
|
||||
// Always returns true, since other documents may try to call it
|
||||
// and that may or may not be possible.
|
||||
this.Search = function(search)
|
||||
{
|
||||
if (!search) // get search word from URL
|
||||
{
|
||||
search = window.location.search;
|
||||
search = search.substring(1); // Remove the leading '?'
|
||||
search = unescape(search);
|
||||
}
|
||||
|
||||
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||
search = search.toLowerCase();
|
||||
search = convertToId(search);
|
||||
|
||||
var resultRows = document.getElementsByTagName("div");
|
||||
var matches = 0;
|
||||
|
||||
var i = 0;
|
||||
while (i < resultRows.length)
|
||||
{
|
||||
var row = resultRows.item(i);
|
||||
if (row.className == "SRResult")
|
||||
{
|
||||
var rowMatchName = row.id.toLowerCase();
|
||||
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||
|
||||
if (search.length<=rowMatchName.length &&
|
||||
rowMatchName.substr(0, search.length)==search)
|
||||
{
|
||||
row.style.display = 'block';
|
||||
matches++;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.style.display = 'none';
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
document.getElementById("Searching").style.display='none';
|
||||
if (matches == 0) // no results
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='block';
|
||||
}
|
||||
else // at least one result
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='none';
|
||||
}
|
||||
this.lastMatchCount = matches;
|
||||
return true;
|
||||
}
|
||||
|
||||
// return the first item with index index or higher that is visible
|
||||
this.NavNext = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index++;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.NavPrev = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index--;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.ProcessKeys = function(e)
|
||||
{
|
||||
if (e.type == "keydown")
|
||||
{
|
||||
this.repeatOn = false;
|
||||
this.lastKey = e.keyCode;
|
||||
}
|
||||
else if (e.type == "keypress")
|
||||
{
|
||||
if (!this.repeatOn)
|
||||
{
|
||||
if (this.lastKey) this.repeatOn = true;
|
||||
return false; // ignore first keypress after keydown
|
||||
}
|
||||
}
|
||||
else if (e.type == "keyup")
|
||||
{
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
}
|
||||
return this.lastKey!=0;
|
||||
}
|
||||
|
||||
this.Nav = function(evt,itemIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
var newIndex = itemIndex-1;
|
||||
var focusItem = this.NavPrev(newIndex);
|
||||
if (focusItem)
|
||||
{
|
||||
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||
if (child && child.style.display == 'block') // children visible
|
||||
{
|
||||
var n=0;
|
||||
var tmpElem;
|
||||
while (1) // search for last child
|
||||
{
|
||||
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||
if (tmpElem)
|
||||
{
|
||||
focusItem = tmpElem;
|
||||
}
|
||||
else // found it!
|
||||
{
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (focusItem)
|
||||
{
|
||||
focusItem.focus();
|
||||
}
|
||||
else // return focus to search field
|
||||
{
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = itemIndex+1;
|
||||
var focusItem;
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem && elem.style.display == 'block') // children visible
|
||||
{
|
||||
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||
}
|
||||
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||
if (focusItem) focusItem.focus();
|
||||
}
|
||||
else if (this.lastKey==39) // Right
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'block';
|
||||
}
|
||||
else if (this.lastKey==37) // Left
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'none';
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.NavChild = function(evt,itemIndex,childIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
if (childIndex>0)
|
||||
{
|
||||
var newIndex = childIndex-1;
|
||||
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||
}
|
||||
else // already at first child, jump to parent
|
||||
{
|
||||
document.getElementById('Item'+itemIndex).focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = childIndex+1;
|
||||
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||
if (!elem) // last child, jump to parent next parent
|
||||
{
|
||||
elem = this.NavNext(itemIndex+1);
|
||||
}
|
||||
if (elem)
|
||||
{
|
||||
elem.focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setKeyActions(elem,action)
|
||||
{
|
||||
elem.setAttribute('onkeydown',action);
|
||||
elem.setAttribute('onkeypress',action);
|
||||
elem.setAttribute('onkeyup',action);
|
||||
}
|
||||
|
||||
function setClassAttr(elem,attr)
|
||||
{
|
||||
elem.setAttribute('class',attr);
|
||||
elem.setAttribute('className',attr);
|
||||
}
|
||||
|
||||
function createResults(resultsPath)
|
||||
{
|
||||
var results = document.getElementById("SRResults");
|
||||
results.innerHTML = '';
|
||||
for (var e=0; e<searchData.length; e++)
|
||||
{
|
||||
var id = searchData[e][0];
|
||||
var srResult = document.createElement('div');
|
||||
srResult.setAttribute('id','SR_'+id);
|
||||
setClassAttr(srResult,'SRResult');
|
||||
var srEntry = document.createElement('div');
|
||||
setClassAttr(srEntry,'SREntry');
|
||||
var srLink = document.createElement('a');
|
||||
srLink.setAttribute('id','Item'+e);
|
||||
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||
setClassAttr(srLink,'SRSymbol');
|
||||
srLink.innerHTML = searchData[e][1][0];
|
||||
srEntry.appendChild(srLink);
|
||||
if (searchData[e][1].length==2) // single result
|
||||
{
|
||||
srLink.setAttribute('href',resultsPath+searchData[e][1][1][0]);
|
||||
srLink.setAttribute('onclick','searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][1][1])
|
||||
{
|
||||
srLink.setAttribute('target','_parent');
|
||||
}
|
||||
else
|
||||
{
|
||||
srLink.setAttribute('target','_blank');
|
||||
}
|
||||
var srScope = document.createElement('span');
|
||||
setClassAttr(srScope,'SRScope');
|
||||
srScope.innerHTML = searchData[e][1][1][2];
|
||||
srEntry.appendChild(srScope);
|
||||
}
|
||||
else // multiple results
|
||||
{
|
||||
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||
var srChildren = document.createElement('div');
|
||||
setClassAttr(srChildren,'SRChildren');
|
||||
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||
{
|
||||
var srChild = document.createElement('a');
|
||||
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||
setClassAttr(srChild,'SRScope');
|
||||
srChild.setAttribute('href',resultsPath+searchData[e][1][c+1][0]);
|
||||
srChild.setAttribute('onclick','searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][c+1][1])
|
||||
{
|
||||
srChild.setAttribute('target','_parent');
|
||||
}
|
||||
else
|
||||
{
|
||||
srChild.setAttribute('target','_blank');
|
||||
}
|
||||
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||
srChildren.appendChild(srChild);
|
||||
}
|
||||
srEntry.appendChild(srChildren);
|
||||
}
|
||||
srResult.appendChild(srEntry);
|
||||
results.appendChild(srResult);
|
||||
}
|
||||
}
|
||||
|
||||
function init_search()
|
||||
{
|
||||
var results = document.getElementById("MSearchSelectWindow");
|
||||
for (var key in indexSectionLabels)
|
||||
{
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('class','SelectItem');
|
||||
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
|
||||
link.href='javascript:void(0)';
|
||||
link.innerHTML='<span class="SelectionMark"> </span>'+indexSectionLabels[key];
|
||||
results.appendChild(link);
|
||||
}
|
||||
searchBox.OnSelectItem(0);
|
||||
}
|
||||
/* @license-end */
|
||||
27
doc/html/search/searchdata.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "bcdjmstu",
|
||||
1: "jmtu",
|
||||
2: "cjms",
|
||||
3: "d",
|
||||
4: "b"
|
||||
};
|
||||
|
||||
var indexSectionNames =
|
||||
{
|
||||
0: "all",
|
||||
1: "files",
|
||||
2: "functions",
|
||||
3: "defines",
|
||||
4: "pages"
|
||||
};
|
||||
|
||||
var indexSectionLabels =
|
||||
{
|
||||
0: "All",
|
||||
1: "Files",
|
||||
2: "Functions",
|
||||
3: "Macros",
|
||||
4: "Pages"
|
||||
};
|
||||
|
||||
BIN
doc/html/splitbar.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
doc/html/splitbard.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
doc/html/sync_off.png
Normal file
|
After Width: | Height: | Size: 853 B |
BIN
doc/html/sync_on.png
Normal file
|
After Width: | Height: | Size: 845 B |
BIN
doc/html/tab_a.png
Normal file
|
After Width: | Height: | Size: 142 B |
BIN
doc/html/tab_ad.png
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
doc/html/tab_b.png
Normal file
|
After Width: | Height: | Size: 169 B |
BIN
doc/html/tab_bd.png
Normal file
|
After Width: | Height: | Size: 173 B |
BIN
doc/html/tab_h.png
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
doc/html/tab_hd.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
doc/html/tab_s.png
Normal file
|
After Width: | Height: | Size: 184 B |
BIN
doc/html/tab_sd.png
Normal file
|
After Width: | Height: | Size: 188 B |
1
doc/html/tabs.css
Normal file
115
doc/html/test__suite_8cpp.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: test_suite.cpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">test_suite.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Test suite for project 2.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="jacobi_8hpp_source.html">jacobi.hpp</a>"</code><br />
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a794d4e8b08c11fc56de56d283699a802"><td class="memItemLeft" align="right" valign="top"><a id="a794d4e8b08c11fc56de56d283699a802" name="a794d4e8b08c11fc56de56d283699a802"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>test_create_symmetric_tridiagonal</b> ()</td></tr>
|
||||
<tr class="separator:a794d4e8b08c11fc56de56d283699a802"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a82cff863233ef84fe0c15742fc86d97f"><td class="memItemLeft" align="right" valign="top"><a id="a82cff863233ef84fe0c15742fc86d97f" name="a82cff863233ef84fe0c15742fc86d97f"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>test_max_off_diag_symmetric</b> ()</td></tr>
|
||||
<tr class="separator:a82cff863233ef84fe0c15742fc86d97f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0c084c75b3641507b4fa0ff0fd570dea"><td class="memItemLeft" align="right" valign="top"><a id="a0c084c75b3641507b4fa0ff0fd570dea" name="a0c084c75b3641507b4fa0ff0fd570dea"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>test_jacobi_eigensolver</b> ()</td></tr>
|
||||
<tr class="separator:a0c084c75b3641507b4fa0ff0fd570dea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top"><a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>main</b> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Test suite for project 2. </p>
|
||||
<p>This is where all the tests for the project are implemented. The tests test the creation of symmetrical tridiagonals, finding the largest off-diagonal absolute value of a symmetric matrix, and the Jacobi rotation method.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
195
doc/html/utils_8cpp.html
Normal file
@@ -0,0 +1,195 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: utils.cpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">utils.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implementation of the utils.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:acd2a9c7a7d5a7fe9163be8c4cc110746"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#acd2a9c7a7d5a7fe9163be8c4cc110746">scientific_format</a> (double d, int width, int prec)</td></tr>
|
||||
<tr class="memdesc:acd2a9c7a7d5a7fe9163be8c4cc110746"><td class="mdescLeft"> </td><td class="mdescRight">Turns a double into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:acd2a9c7a7d5a7fe9163be8c4cc110746"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a58565270b643b24e3132f38c653e0199"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a58565270b643b24e3132f38c653e0199">scientific_format</a> (const std::vector< double > &v, int width, int prec)</td></tr>
|
||||
<tr class="memdesc:a58565270b643b24e3132f38c653e0199"><td class="mdescLeft"> </td><td class="mdescRight">Turns a vector of doubles into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:a58565270b643b24e3132f38c653e0199"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of the utils. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000005">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a58565270b643b24e3132f38c653e0199" name="a58565270b643b24e3132f38c653e0199"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a58565270b643b24e3132f38c653e0199">◆ </a></span>scientific_format() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::vector< double > & </td>
|
||||
<td class="paramname"><em>v</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a vector of doubles into a string written in scientific format. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">v</td><td>The vector to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="acd2a9c7a7d5a7fe9163be8c4cc110746" name="acd2a9c7a7d5a7fe9163be8c4cc110746"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acd2a9c7a7d5a7fe9163be8c4cc110746">◆ </a></span>scientific_format() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a double into a string written in scientific format. </p>
|
||||
<p>Code stolen from <a href="https://github.com/anderkve/FYS3150">https://github.com/anderkve/FYS3150</a> Header: <a href="https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp">https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp</a> Source: <a href="https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp">https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp</a> </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">d</td><td>The number to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
234
doc/html/utils_8hpp.html
Normal file
@@ -0,0 +1,234 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/utils.hpp File 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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">utils.hpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Function prototypes and macros that are useful.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <string></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
<code>#include <iomanip></code><br />
|
||||
<code>#include <sstream></code><br />
|
||||
</div>
|
||||
<p><a href="utils_8hpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:aecc1f7a8a2493b9e021e5bff76a00a5b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">DEBUG</a>(msg)</td></tr>
|
||||
<tr class="memdesc:aecc1f7a8a2493b9e021e5bff76a00a5b"><td class="mdescLeft"> </td><td class="mdescRight">Writes a debug message. <br /></td></tr>
|
||||
<tr class="separator:aecc1f7a8a2493b9e021e5bff76a00a5b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:adfb618b2fdff47ef30a4a2b62c04f384"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a> (double d, int width=20, int prec=10)</td></tr>
|
||||
<tr class="memdesc:adfb618b2fdff47ef30a4a2b62c04f384"><td class="mdescLeft"> </td><td class="mdescRight">Turns a double into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:adfb618b2fdff47ef30a4a2b62c04f384"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad54b96a1074f9df4dc892a41d115b72d"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html#ad54b96a1074f9df4dc892a41d115b72d">scientific_format</a> (const std::vector< double > &v, int width=20, int prec=10)</td></tr>
|
||||
<tr class="memdesc:ad54b96a1074f9df4dc892a41d115b72d"><td class="mdescLeft"> </td><td class="mdescRight">Turns a vector of doubles into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:ad54b96a1074f9df4dc892a41d115b72d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Function prototypes and macros that are useful. </p>
|
||||
<p>These utility function are mainly for convenience and aren't directly related to the project.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="aecc1f7a8a2493b9e021e5bff76a00a5b" name="aecc1f7a8a2493b9e021e5bff76a00a5b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aecc1f7a8a2493b9e021e5bff76a00a5b">◆ </a></span>DEBUG</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define DEBUG</td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">msg</td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Writes a debug message. </p>
|
||||
<p>This function writes a debug message that includes the filename, line number, and a custom message. The function is wrapped in an ifdef that checks if DBG is defined, so one can choose to display the debug messages by adding the -DDBG flag when compiling. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ad54b96a1074f9df4dc892a41d115b72d" name="ad54b96a1074f9df4dc892a41d115b72d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad54b96a1074f9df4dc892a41d115b72d">◆ </a></span>scientific_format() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::vector< double > & </td>
|
||||
<td class="paramname"><em>v</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a vector of doubles into a string written in scientific format. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">v</td><td>The vector to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="adfb618b2fdff47ef30a4a2b62c04f384" name="adfb618b2fdff47ef30a4a2b62c04f384"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#adfb618b2fdff47ef30a4a2b62c04f384">◆ </a></span>scientific_format() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a double into a string written in scientific format. </p>
|
||||
<p>Code stolen from <a href="https://github.com/anderkve/FYS3150">https://github.com/anderkve/FYS3150</a> Header: <a href="https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp">https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp</a> Source: <a href="https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp">https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp</a> </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">d</td><td>The number to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
109
doc/html/utils_8hpp_source.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>FYS3150: Project 2: /home/coryab/uio/FYS3150/projects/Project-2/include/utils.hpp Source File</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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">FYS3150: Project 2
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">utils.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="utils_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#ifndef __UTILS__</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#define __UTILS__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <string></span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <vector></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <iomanip></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <sstream></span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#ifdef DBG</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor"> #define DEBUG(msg) std::cout << __FILE__ << " "</span> << __LINE__ << ": " \</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> << msg << std::endl</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b"> 31</a></span><span class="preprocessor"> #define DEBUG(msg)</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keywordtype">double</span> d, <span class="keywordtype">int</span> width=20, <span class="keywordtype">int</span> prec=10);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>std::string <a class="code hl_function" href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a>(<span class="keyword">const</span> std::vector<double>& v, </div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">int</span> width=20, </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">int</span> prec=10);</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="autils_8hpp_html_adfb618b2fdff47ef30a4a2b62c04f384"><div class="ttname"><a href="utils_8hpp.html#adfb618b2fdff47ef30a4a2b62c04f384">scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width=20, int prec=10)</div><div class="ttdoc">Turns a double into a string written in scientific format.</div><div class="ttdef"><b>Definition:</b> utils.cpp:10</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
59
include/jacobi.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/** @file jacobi.hpp
|
||||
* @brief Function prototypes for the jacobi rotation algorithm.
|
||||
*
|
||||
* @author Cory Alexander Balaton (coryab)
|
||||
* @author Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
* @bug No known bugs
|
||||
*/
|
||||
#ifndef __JACOBI__
|
||||
#define __JACOBI__
|
||||
|
||||
#include <armadillo>
|
||||
|
||||
/** @brief Computes a single rotation.
|
||||
*
|
||||
* jacobi_rotate computes a single rotation for Jacobi's rotation algorithm.
|
||||
* It starts by calculating tau, t (tan), c (cos), s (sin) and then
|
||||
* updates A and R at rows/columsn k and l.
|
||||
*
|
||||
* @param A Matrix A<sup> (m) </sup>
|
||||
* @param R The rotation matrix R<sup> (m) </sup>
|
||||
* @param k Index of the row with the element of largest absolute value
|
||||
* @param l Index of the column with the element of largest absolute value
|
||||
*
|
||||
* @return Void
|
||||
*/
|
||||
void jacobi_rotate(arma::mat& A, arma::mat& R, int k, int l);
|
||||
|
||||
/** @brief Solves the eigenvalue problem using the jacobi rotation method.
|
||||
*
|
||||
* jacobi_eigensolver Initializes matrices A_m and R before going into the
|
||||
* main loop.
|
||||
*
|
||||
* For each iteration of the loop, it finds the largest absolute off-diagonal
|
||||
* value of A_m, and then calls jacobi_rotate. The loop stops when the largest
|
||||
* off-diagonal is less than the tolerance (eps) or if the maximum number of
|
||||
* iterations has been reached.
|
||||
*
|
||||
* The last thing this function does is to sort the eigenvalues and the
|
||||
* corresponding eigenvectors in ascending order.
|
||||
*
|
||||
* @param A The initial matrix to be solved
|
||||
* @param eps Tolerance
|
||||
* @param eigenvalues A vector that will contain the computed eigenvalues
|
||||
* @param eigenvectors A Matrix that will contain the computed eigenvectors
|
||||
* @param maxiter The max number of iterations allowed
|
||||
* @param iterations To keep track of how many iterations the algorithm used
|
||||
* @param converged Tells the user if the algorithm has converged
|
||||
*
|
||||
* @return Void
|
||||
* */
|
||||
void jacobi_eigensolver(const arma::mat& A,
|
||||
double eps,
|
||||
arma::vec& eigenvalues,
|
||||
arma::mat& eigenvectors,
|
||||
const int maxiter,
|
||||
int& iterations,
|
||||
bool& converged);
|
||||
|
||||
#endif
|
||||
77
include/matrix.hpp
Normal file
@@ -0,0 +1,77 @@
|
||||
/** @file matrix.hpp
|
||||
* @brief Function prototypes for creating tridiagonal matrices.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author Cory Alexander Balaton (coryab)
|
||||
* @author Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
* @bug No known bugs
|
||||
*/
|
||||
#ifndef __MATRIX__
|
||||
#define __MATRIX__
|
||||
|
||||
#include <armadillo>
|
||||
|
||||
/** @brief Create a tridiagonal matrix.
|
||||
*
|
||||
* create_tridiagonal creates a tridiagonal matrix by first creating a matrix,
|
||||
* filled with zeros, of size NxN where N is the size of the main diagonal
|
||||
* matrix. Then it will fill all the values from the vector parameters into
|
||||
* the matrix and return it.
|
||||
*
|
||||
* @param a Vector for the lower diagonal of size N-1
|
||||
* @param d Vector for the main diagonal of size N
|
||||
* @param e Vector for the upper diagonal of size N-1
|
||||
*
|
||||
* @return arma::matrix
|
||||
* */
|
||||
arma::mat create_tridiagonal(
|
||||
const arma::vec& a,
|
||||
const arma::vec& d,
|
||||
const arma::vec& e);
|
||||
|
||||
/** @brief Create a tridiagonal matrix.
|
||||
*
|
||||
* This is an overload that takes doubles for the diagonals instead of
|
||||
* vectors. It will create 3 vectors that are filled with the signature
|
||||
* provided in the arguments, and then call create_tridiagonal with the
|
||||
* vectors as the arguments.
|
||||
*
|
||||
* @param n The dimensions of the tridiagonal matrix
|
||||
* @param a The signature for the lower diagonal
|
||||
* @param d The signature for the main diagonal
|
||||
* @param e The signature for the upper diagonal
|
||||
*
|
||||
* @return arma::matrix
|
||||
* */
|
||||
arma::mat create_tridiagonal(int n, double a, double d, double e);
|
||||
|
||||
/** @brief Create a symmetric tridiagonal matrix.
|
||||
*
|
||||
* create_symmetric_tridiagonal creates a symmetric tridiagonal matrix by
|
||||
* calling create_tridiagonal with the same signature for the off-diagonals.
|
||||
*
|
||||
* @param n The dimensions of the tridiagonal matrix
|
||||
* @param a The signature for the off diagonals
|
||||
* @param d The signature for the main diagonal
|
||||
*
|
||||
* @return arma::matrix
|
||||
* */
|
||||
arma::mat create_symmetric_tridiagonal(int n, double a, double d);
|
||||
|
||||
/** @brief Find the off-diagonal element with the largest absolute value.
|
||||
*
|
||||
* max_offdiag_symmetric find the element with the largest absolute value
|
||||
* that isn't in the diagonal. Since this function assumes that the matrix
|
||||
* that is given is symmetrical, we only need to loop through the upper
|
||||
* diagonals of the matrix.
|
||||
*
|
||||
* @param A Symmetric matrix
|
||||
* @param k Variable to store the row of the return value
|
||||
* @param l Variable to store the column of the return value
|
||||
*
|
||||
* @return Double
|
||||
* */
|
||||
double max_offdiag_symmetric(arma::mat& A, int& k, int& l);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
/** @file utils.hpp
|
||||
* @brief Function prototypes and macros that are useful.
|
||||
*
|
||||
* These utility function are mainly for convenience and aren't directly
|
||||
* related to the project.
|
||||
*
|
||||
* @author Cory Alexander Balaton (coryab)
|
||||
* @author Janita Ovidie Sandtrøen Willumsen (janitaws)
|
||||
* @bug No known bugs
|
||||
*/
|
||||
#ifndef __UTILS__
|
||||
#define __UTILS__
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
/** @def DEBUG(msg)
|
||||
* @brief Writes a debug message
|
||||
*
|
||||
* This function writes a debug message that includes the filename,
|
||||
* line number, and a custom message. The function is wrapped in an ifdef
|
||||
* that checks if DBG is defined, so one can choose to display the debug
|
||||
* messages by adding the -DDBG flag when compiling.
|
||||
* */
|
||||
#ifdef DBG
|
||||
#define DEBUG(msg) std::cout << __FILE__ << " " << __LINE__ << ": " \
|
||||
<< msg << std::endl
|
||||
#else
|
||||
#define DEBUG(msg)
|
||||
#endif
|
||||
|
||||
/** Code stolen from https://github.com/anderkve/FYS3150
|
||||
* Header: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp
|
||||
* Source: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp
|
||||
* */
|
||||
|
||||
/** @brief Turns a double into a string written in scientific format.
|
||||
*
|
||||
* @param d The number to stringify
|
||||
* @param width The reserved width of the string
|
||||
* @param prec The precision of the stringified number
|
||||
*
|
||||
* @return String
|
||||
* */
|
||||
std::string scientific_format(double d, int width=20, int prec=10);
|
||||
|
||||
/** @brief Turns a vector of doubles into a string written in scientific format.
|
||||
*
|
||||
* @param v The vector to stringify
|
||||
* @param width The reserved width of the string
|
||||
* @param prec The precision of the stringified number
|
||||
*
|
||||
* @return String
|
||||
* */
|
||||
std::string scientific_format(const std::vector<double>& v,
|
||||
int width=20,
|
||||
int prec=10);
|
||||
|
||||
#endif
|
||||
|
||||
5
latex/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
.PHONY: latex
|
||||
|
||||
latex:
|
||||
pdflatex assignment-2.tex
|
||||
@@ -89,17 +89,17 @@
|
||||
|
||||
\textit{https://github.uio.no/FYS3150-G2-2023/Project-2}
|
||||
|
||||
% \input{problems/problem-1}
|
||||
\input{problems/problem-1}
|
||||
|
||||
% \input{problems/problem-2}
|
||||
\input{problems/problem-2}
|
||||
|
||||
% \input{problems/problem-3}
|
||||
\input{problems/problem-3}
|
||||
|
||||
% \input{problems/problem-4}
|
||||
\input{problems/problem-4}
|
||||
|
||||
% \input{problems/problem-5}
|
||||
\input{problems/problem-5}
|
||||
|
||||
% \input{problems/problem-6}
|
||||
\input{problems/problem-6}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
BIN
latex/images/eigenvector_10.pdf
Normal file
BIN
latex/images/eigenvector_100.pdf
Normal file
BIN
latex/images/eigenvector_6.pdf
Normal file
BIN
latex/images/transform.pdf
Normal file
13
latex/output/eigenvector_10.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
x,Vector 1,Vector 2,Vector 3,Analytic 1,Analytic 2,Analytic 3
|
||||
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
9.0909090909e-02,1.2013116562e-01,2.3053001908e-01,3.2225269916e-01,1.2013116588e-01,2.3053001915e-01,3.2225270128e-01
|
||||
1.8181818182e-01,2.3053002022e-01,3.8786838557e-01,4.2206128116e-01,2.3053001915e-01,3.8786838606e-01,4.2206128095e-01
|
||||
2.7272727273e-01,3.2225270064e-01,4.2206128186e-01,2.3053002150e-01,3.2225270128e-01,4.2206128095e-01,2.3053001915e-01
|
||||
3.6363636364e-01,3.8786838571e-01,3.2225270018e-01,-1.2013116730e-01,3.8786838606e-01,3.2225270128e-01,-1.2013116588e-01
|
||||
4.5454545455e-01,4.2206128199e-01,1.2013116659e-01,-3.8786838753e-01,4.2206128095e-01,1.2013116588e-01,-3.8786838606e-01
|
||||
5.4545454545e-01,4.2206128029e-01,-1.2013116676e-01,-3.8786838497e-01,4.2206128095e-01,-1.2013116588e-01,-3.8786838606e-01
|
||||
6.3636363636e-01,3.8786838601e-01,-3.2225270035e-01,-1.2013116452e-01,3.8786838606e-01,-3.2225270128e-01,-1.2013116588e-01
|
||||
7.2727272727e-01,3.2225270138e-01,-4.2206128196e-01,2.3053001725e-01,3.2225270128e-01,-4.2206128095e-01,2.3053001915e-01
|
||||
8.1818181818e-01,2.3053001839e-01,-3.8786838569e-01,4.2206128036e-01,2.3053001915e-01,-3.8786838606e-01,4.2206128095e-01
|
||||
9.0909090909e-01,1.2013116693e-01,-2.3053001912e-01,3.2225270306e-01,1.2013116588e-01,-2.3053001915e-01,3.2225270128e-01
|
||||
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
|
103
latex/output/eigenvector_100.csv
Normal file
@@ -0,0 +1,103 @@
|
||||
x,Vector 1,Vector 2,Vector 3,Analytic 1,Analytic 2,Analytic 3
|
||||
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
9.9009900990e-03,4.3763580486e-03,-8.7484808732e-03,-1.3112140868e-02,4.3763573469e-03,-8.7484808507e-03,-1.3112140764e-02
|
||||
1.9801980198e-02,8.7484805374e-03,-1.7463118426e-02,-2.6110190173e-02,8.7484808507e-03,-1.7463115529e-02,-2.6110188805e-02
|
||||
2.9702970297e-02,1.3112137258e-02,-2.6110188342e-02,-3.8881042300e-02,1.3112140764e-02,-2.6110188805e-02,-3.8881044154e-02
|
||||
3.9603960396e-02,1.7463113948e-02,-3.4656251014e-02,-5.1313582739e-02,1.7463115529e-02,-3.4656246833e-02,-5.1313583715e-02
|
||||
4.9504950495e-02,2.1797194330e-02,-4.3068225457e-02,-6.3299631766e-02,2.1797195856e-02,-4.3068226575e-02,-6.3299628182e-02
|
||||
5.9405940594e-02,2.6110192331e-02,-5.1313581763e-02,-7.4734880361e-02,2.6110188805e-02,-5.1313583715e-02,-7.4734883337e-02
|
||||
6.9306930693e-02,3.0397918929e-02,-5.9360418816e-02,-8.5519850123e-02,3.0397921832e-02,-5.9360418568e-02,-8.5519847548e-02
|
||||
7.9207920792e-02,3.4656246898e-02,-6.7177598362e-02,-9.5560679417e-02,3.4656246833e-02,-6.7177599493e-02,-9.5560677562e-02
|
||||
8.9108910891e-02,3.8881042315e-02,-7.4734886241e-02,-1.0477000717e-01,3.8881044154e-02,-7.4734883337e-02,-1.0477000506e-01
|
||||
9.9009900990e-02,4.3068230096e-02,-8.2003031501e-02,-1.1306769719e-01,4.3068226575e-02,-8.2003032435e-02,-1.1306769690e-01
|
||||
1.0891089109e-01,4.7213744503e-02,-8.8953927224e-02,-1.2038155127e-01,4.7213743269e-02,-8.8953927731e-02,-1.2038155232e-01
|
||||
1.1881188119e-01,5.1313588425e-02,-9.5560676214e-02,-1.2664793098e-01,5.1313583715e-02,-9.5560677562e-02,-1.2664793125e-01
|
||||
1.2871287129e-01,5.5363780001e-02,-1.0179771917e-01,-1.3181231002e-01,5.5363781583e-02,-1.0179772170e-01,-1.3181230802e-01
|
||||
1.3861386139e-01,5.9360419789e-02,-1.0764092918e-01,-1.3582974462e-01,5.9360418568e-02,-1.0764093022e-01,-1.3582974582e-01
|
||||
1.4851485149e-01,6.3299627984e-02,-1.1306769819e-01,-1.3866528556e-01,6.3299628182e-02,-1.1306769690e-01,-1.3866528771e-01
|
||||
1.5841584158e-01,6.7177601217e-02,-1.1805702763e-01,-1.4029426114e-01,6.7177599493e-02,-1.1805702662e-01,-1.4029426076e-01
|
||||
1.6831683168e-01,7.0990579025e-02,-1.2258961789e-01,-1.4070249027e-01,7.0990580816e-02,-1.2258961664e-01,-1.4070249079e-01
|
||||
1.7821782178e-01,7.4734880844e-02,-1.2664793546e-01,-1.3988642874e-01,7.4734883337e-02,-1.2664793125e-01,-1.3988642566e-01
|
||||
1.8811881188e-01,7.8406882603e-02,-1.3021626991e-01,-1.3785316434e-01,7.8406884685e-02,-1.3021626962e-01,-1.3785316621e-01
|
||||
1.9801980198e-01,8.2003032834e-02,-1.3328082864e-01,-1.3462040439e-01,8.2003032435e-02,-1.3328082653e-01,-1.3462040445e-01
|
||||
2.0792079208e-01,8.5519846919e-02,-1.3582974378e-01,-1.3021627110e-01,8.5519847548e-02,-1.3582974582e-01,-1.3021626962e-01
|
||||
2.1782178218e-01,8.8953926852e-02,-1.3785316224e-01,-1.2467908375e-01,8.8953927731e-02,-1.3785316621e-01,-1.2467908343e-01
|
||||
2.2772277228e-01,9.2301946409e-02,-1.3934326062e-01,-1.1805702523e-01,9.2301950735e-02,-1.3934325949e-01,-1.1805702662e-01
|
||||
2.3762376238e-01,9.5560676953e-02,-1.4029425672e-01,-1.1040771966e-01,9.5560677562e-02,-1.4029426076e-01,-1.1040771973e-01
|
||||
2.4752475248e-01,9.8726957572e-02,-1.4070249295e-01,-1.0179772068e-01,9.8726955606e-02,-1.4070249079e-01,-1.0179772170e-01
|
||||
2.5742574257e-01,1.0179772036e-01,-1.4056637044e-01,-9.2301949636e-02,1.0179772170e-01,-1.4056637021e-01,-9.2301950735e-02
|
||||
2.6732673267e-01,1.0477000527e-01,-1.3988642578e-01,-8.2003032107e-02,1.0477000506e-01,-1.3988642566e-01,-8.2003032435e-02
|
||||
2.7722772277e-01,1.0764093290e-01,-1.3866528965e-01,-7.0990578930e-02,1.0764093022e-01,-1.3866528771e-01,-7.0990580816e-02
|
||||
2.8712871287e-01,1.1040771987e-01,-1.3690767831e-01,-5.9360423847e-02,1.1040771973e-01,-1.3690768069e-01,-5.9360418568e-02
|
||||
2.9702970297e-01,1.1306770152e-01,-1.3462040609e-01,-4.7213742425e-02,1.1306769690e-01,-1.3462040445e-01,-4.7213743269e-02
|
||||
3.0693069307e-01,1.1561828862e-01,-1.3181230529e-01,-3.4656247048e-02,1.1561828837e-01,-1.3181230802e-01,-3.4656246833e-02
|
||||
3.1683168317e-01,1.1805702504e-01,-1.2849425366e-01,-2.1797195258e-02,1.1805702662e-01,-1.2849425538e-01,-2.1797195856e-02
|
||||
3.2673267327e-01,1.2038155014e-01,-1.2467908448e-01,-8.7484830929e-03,1.2038155232e-01,-1.2467908343e-01,-8.7484808507e-03
|
||||
3.3663366337e-01,1.2258961573e-01,-1.2038155323e-01,4.3763575797e-03,1.2258961664e-01,-1.2038155232e-01,4.3763573469e-03
|
||||
3.4653465347e-01,1.2467908410e-01,-1.1561829169e-01,1.7463115474e-02,1.2467908343e-01,-1.1561828837e-01,1.7463115529e-02
|
||||
3.5643564356e-01,1.2664793338e-01,-1.1040771926e-01,3.0397924158e-02,1.2664793125e-01,-1.1040771973e-01,3.0397921832e-02
|
||||
3.6633663366e-01,1.2849425248e-01,-1.0477000407e-01,4.3068226361e-02,1.2849425538e-01,-1.0477000506e-01,4.3068226575e-02
|
||||
3.7623762376e-01,1.3021626897e-01,-9.8726953501e-02,5.5363781149e-02,1.3021626962e-01,-9.8726955606e-02,5.5363781583e-02
|
||||
3.8613861386e-01,1.3181230641e-01,-9.2301949069e-02,6.7177599971e-02,1.3181230802e-01,-9.2301950735e-02,6.7177599493e-02
|
||||
3.9603960396e-01,1.3328082420e-01,-8.5519846476e-02,7.8406881225e-02,1.3328082653e-01,-8.5519847548e-02,7.8406884685e-02
|
||||
4.0594059406e-01,1.3462040441e-01,-7.8406886916e-02,8.8953928507e-02,1.3462040445e-01,-7.8406884685e-02,8.8953927731e-02
|
||||
4.1584158416e-01,1.3582974237e-01,-7.0990582377e-02,9.8726952665e-02,1.3582974582e-01,-7.0990580816e-02,9.8726955606e-02
|
||||
4.2574257426e-01,1.3690768207e-01,-6.3299628825e-02,1.0764092847e-01,1.3690768069e-01,-6.3299628182e-02,1.0764093022e-01
|
||||
4.3564356436e-01,1.3785316922e-01,-5.5363784270e-02,1.1561828790e-01,1.3785316621e-01,-5.5363781583e-02,1.1561828837e-01
|
||||
4.4554455446e-01,1.3866529183e-01,-4.7213741970e-02,1.2258961490e-01,1.3866528771e-01,-4.7213743269e-02,1.2258961664e-01
|
||||
4.5544554455e-01,1.3934325896e-01,-3.8881046285e-02,1.2849425510e-01,1.3934325949e-01,-3.8881044154e-02,1.2849425538e-01
|
||||
4.6534653465e-01,1.3988642934e-01,-3.0397919107e-02,1.3328083063e-01,1.3988642566e-01,-3.0397921832e-02,1.3328082653e-01
|
||||
4.7524752475e-01,1.4029425867e-01,-2.1797194223e-02,1.3690767978e-01,1.4029426076e-01,-2.1797195856e-02,1.3690768069e-01
|
||||
4.8514851485e-01,1.4056637371e-01,-1.3112142627e-02,1.3934326030e-01,1.4056637021e-01,-1.3112140764e-02,1.3934325949e-01
|
||||
4.9504950495e-01,1.4070249059e-01,-4.3763545931e-03,1.4056637087e-01,1.4070249079e-01,-4.3763573469e-03,1.4056637021e-01
|
||||
5.0495049505e-01,1.4070249237e-01,4.3763553240e-03,1.4056636855e-01,1.4070249079e-01,4.3763573469e-03,1.4056637021e-01
|
||||
5.1485148515e-01,1.4056636701e-01,1.3112141424e-02,1.3934326274e-01,1.4056637021e-01,1.3112140764e-02,1.3934325949e-01
|
||||
5.2475247525e-01,1.4029426479e-01,2.1797196040e-02,1.3690767734e-01,1.4029426076e-01,2.1797195856e-02,1.3690768069e-01
|
||||
5.3465346535e-01,1.3988642418e-01,3.0397922181e-02,1.3328082645e-01,1.3988642566e-01,3.0397921832e-02,1.3328082653e-01
|
||||
5.4455445545e-01,1.3934325818e-01,3.8881045170e-02,1.2849425588e-01,1.3934325949e-01,3.8881044154e-02,1.2849425538e-01
|
||||
5.5445544554e-01,1.3866528548e-01,4.7213739894e-02,1.2258961529e-01,1.3866528771e-01,4.7213743269e-02,1.2258961664e-01
|
||||
5.6435643564e-01,1.3785316347e-01,5.5363782200e-02,1.1561828838e-01,1.3785316621e-01,5.5363781583e-02,1.1561828837e-01
|
||||
5.7425742574e-01,1.3690767808e-01,6.3299625555e-02,1.0764093012e-01,1.3690768069e-01,6.3299628182e-02,1.0764093022e-01
|
||||
5.8415841584e-01,1.3582975080e-01,7.0990579118e-02,9.8726956974e-02,1.3582974582e-01,7.0990580816e-02,9.8726955606e-02
|
||||
5.9405940594e-01,1.3462040473e-01,7.8406883764e-02,8.8953931156e-02,1.3462040445e-01,7.8406884685e-02,8.8953927731e-02
|
||||
6.0396039604e-01,1.3328082628e-01,8.5519847508e-02,7.8406882521e-02,1.3328082653e-01,8.5519847548e-02,7.8406884685e-02
|
||||
6.1386138614e-01,1.3181231043e-01,9.2301955750e-02,6.7177597738e-02,1.3181230802e-01,9.2301950735e-02,6.7177599493e-02
|
||||
6.2376237624e-01,1.3021627254e-01,9.8726959125e-02,5.5363781584e-02,1.3021626962e-01,9.8726955606e-02,5.5363781583e-02
|
||||
6.3366336634e-01,1.2849425843e-01,1.0477000685e-01,4.3068225262e-02,1.2849425538e-01,1.0477000506e-01,4.3068226575e-02
|
||||
6.4356435644e-01,1.2664792968e-01,1.1040772008e-01,3.0397923775e-02,1.2664793125e-01,1.1040771973e-01,3.0397921832e-02
|
||||
6.5346534653e-01,1.2467908233e-01,1.1561828667e-01,1.7463112100e-02,1.2467908343e-01,1.1561828837e-01,1.7463115529e-02
|
||||
6.6336633663e-01,1.2258961618e-01,1.2038154892e-01,4.3763558959e-03,1.2258961664e-01,1.2038155232e-01,4.3763573469e-03
|
||||
6.7326732673e-01,1.2038155509e-01,1.2467908434e-01,-8.7484791158e-03,1.2038155232e-01,1.2467908343e-01,-8.7484808507e-03
|
||||
6.8316831683e-01,1.1805702847e-01,1.2849425619e-01,-2.1797195967e-02,1.1805702662e-01,1.2849425538e-01,-2.1797195856e-02
|
||||
6.9306930693e-01,1.1561828622e-01,1.3181230822e-01,-3.4656246425e-02,1.1561828837e-01,1.3181230802e-01,-3.4656246833e-02
|
||||
7.0297029703e-01,1.1306768997e-01,1.3462040633e-01,-4.7213742058e-02,1.1306769690e-01,1.3462040445e-01,-4.7213743269e-02
|
||||
7.1287128713e-01,1.1040771799e-01,1.3690767691e-01,-5.9360418526e-02,1.1040771973e-01,1.3690768069e-01,-5.9360418568e-02
|
||||
7.2277227723e-01,1.0764092776e-01,1.3866528979e-01,-7.0990581227e-02,1.0764093022e-01,1.3866528771e-01,-7.0990580816e-02
|
||||
7.3267326733e-01,1.0477000620e-01,1.3988642119e-01,-8.2003033815e-02,1.0477000506e-01,1.3988642566e-01,-8.2003032435e-02
|
||||
7.4257425743e-01,1.0179772152e-01,1.4056636623e-01,-9.2301952893e-02,1.0179772170e-01,1.4056637021e-01,-9.2301950735e-02
|
||||
7.5247524752e-01,9.8726952848e-02,1.4070249392e-01,-1.0179771955e-01,9.8726955606e-02,1.4070249079e-01,-1.0179772170e-01
|
||||
7.6237623762e-01,9.5560678408e-02,1.4029425948e-01,-1.1040772236e-01,9.5560677562e-02,1.4029426076e-01,-1.1040771973e-01
|
||||
7.7227722772e-01,9.2301954838e-02,1.3934326416e-01,-1.1805702951e-01,9.2301950735e-02,1.3934325949e-01,-1.1805702662e-01
|
||||
7.8217821782e-01,8.8953928903e-02,1.3785316849e-01,-1.2467908256e-01,8.8953927731e-02,1.3785316621e-01,-1.2467908343e-01
|
||||
7.9207920792e-01,8.5519848124e-02,1.3582974727e-01,-1.3021626851e-01,8.5519847548e-02,1.3582974582e-01,-1.3021626962e-01
|
||||
8.0198019802e-01,8.2003030909e-02,1.3328082828e-01,-1.3462040327e-01,8.2003032435e-02,1.3328082653e-01,-1.3462040445e-01
|
||||
8.1188118812e-01,7.8406885186e-02,1.3021626587e-01,-1.3785316474e-01,7.8406884685e-02,1.3021626962e-01,-1.3785316621e-01
|
||||
8.2178217822e-01,7.4734885540e-02,1.2664793089e-01,-1.3988642777e-01,7.4734883337e-02,1.2664793125e-01,-1.3988642566e-01
|
||||
8.3168316832e-01,7.0990582072e-02,1.2258961409e-01,-1.4070248742e-01,7.0990580816e-02,1.2258961664e-01,-1.4070249079e-01
|
||||
8.4158415842e-01,6.7177598843e-02,1.1805702585e-01,-1.4029426160e-01,6.7177599493e-02,1.1805702662e-01,-1.4029426076e-01
|
||||
8.5148514851e-01,6.3299627125e-02,1.1306769708e-01,-1.3866528902e-01,6.3299628182e-02,1.1306769690e-01,-1.3866528771e-01
|
||||
8.6138613861e-01,5.9360415245e-02,1.0764093150e-01,-1.3582974369e-01,5.9360418568e-02,1.0764093022e-01,-1.3582974582e-01
|
||||
8.7128712871e-01,5.5363784218e-02,1.0179772269e-01,-1.3181231038e-01,5.5363781583e-02,1.0179772170e-01,-1.3181230802e-01
|
||||
8.8118811881e-01,5.1313579361e-02,9.5560678437e-02,-1.2664793139e-01,5.1313583715e-02,9.5560677562e-02,-1.2664793125e-01
|
||||
8.9108910891e-01,4.7213741091e-02,8.8953928103e-02,-1.2038155214e-01,4.7213743269e-02,8.8953927731e-02,-1.2038155232e-01
|
||||
9.0099009901e-01,4.3068225595e-02,8.2003031564e-02,-1.1306769867e-01,4.3068226575e-02,8.2003032435e-02,-1.1306769690e-01
|
||||
9.1089108911e-01,3.8881045999e-02,7.4734883659e-02,-1.0477000196e-01,3.8881044154e-02,7.4734883337e-02,-1.0477000506e-01
|
||||
9.2079207921e-01,3.4656245355e-02,6.7177597583e-02,-9.5560676903e-02,3.4656246833e-02,6.7177599493e-02,-9.5560677562e-02
|
||||
9.3069306931e-01,3.0397926577e-02,5.9360420731e-02,-8.5519850964e-02,3.0397921832e-02,5.9360418568e-02,-8.5519847548e-02
|
||||
9.4059405941e-01,2.6110186824e-02,5.1313584318e-02,-7.4734880388e-02,2.6110188805e-02,5.1313583715e-02,-7.4734883337e-02
|
||||
9.5049504950e-01,2.1797196485e-02,4.3068226072e-02,-6.3299628759e-02,2.1797195856e-02,4.3068226575e-02,-6.3299628182e-02
|
||||
9.6039603960e-01,1.7463116664e-02,3.4656247119e-02,-5.1313584252e-02,1.7463115529e-02,3.4656246833e-02,-5.1313583715e-02
|
||||
9.7029702970e-01,1.3112143651e-02,2.6110184365e-02,-3.8881045879e-02,1.3112140764e-02,2.6110188805e-02,-3.8881044154e-02
|
||||
9.8019801980e-01,8.7484791764e-03,1.7463117510e-02,-2.6110190428e-02,8.7484808507e-03,1.7463115529e-02,-2.6110188805e-02
|
||||
9.9009900990e-01,4.3763588619e-03,8.7484790494e-03,-1.3112138188e-02,4.3763573469e-03,8.7484808507e-03,-1.3112140764e-02
|
||||
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
|
9
latex/output/eigenvector_6.csv
Normal file
@@ -0,0 +1,9 @@
|
||||
x,Vector 1,Vector 2,Vector 3,Analytic 1,Analytic 2,Analytic 3
|
||||
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
1.4285714286e-01,2.3192061397e-01,-4.1790650593e-01,-5.2112088916e-01,2.3192061392e-01,-4.1790650594e-01,-5.2112088917e-01
|
||||
2.8571428571e-01,4.1790650598e-01,-5.2112088916e-01,-2.3192061388e-01,4.1790650594e-01,-5.2112088917e-01,-2.3192061392e-01
|
||||
4.2857142857e-01,5.2112088920e-01,-2.3192061385e-01,4.1790650595e-01,5.2112088917e-01,-2.3192061392e-01,4.1790650594e-01
|
||||
5.7142857143e-01,5.2112088915e-01,2.3192061400e-01,4.1790650592e-01,5.2112088917e-01,2.3192061392e-01,4.1790650594e-01
|
||||
7.1428571429e-01,4.1790650588e-01,5.2112088921e-01,-2.3192061394e-01,4.1790650594e-01,5.2112088917e-01,-2.3192061392e-01
|
||||
8.5714285714e-01,2.3192061389e-01,4.1790650591e-01,-5.2112088921e-01,2.3192061392e-01,4.1790650594e-01,-5.2112088917e-01
|
||||
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
|
||||
|
97
latex/output/transform_dense.csv
Normal file
@@ -0,0 +1,97 @@
|
||||
N,T
|
||||
5,32
|
||||
6,53
|
||||
7,73
|
||||
8,98
|
||||
9,130
|
||||
10,157
|
||||
11,201
|
||||
12,254
|
||||
13,293
|
||||
14,349
|
||||
15,394
|
||||
16,458
|
||||
17,518
|
||||
18,587
|
||||
19,649
|
||||
20,740
|
||||
21,827
|
||||
22,911
|
||||
23,999
|
||||
24,1073
|
||||
25,1187
|
||||
26,1299
|
||||
27,1410
|
||||
28,1502
|
||||
29,1604
|
||||
30,1725
|
||||
31,1856
|
||||
32,1979
|
||||
33,2089
|
||||
34,2227
|
||||
35,2383
|
||||
36,2536
|
||||
37,2644
|
||||
38,2810
|
||||
39,3000
|
||||
40,3138
|
||||
41,3299
|
||||
42,3445
|
||||
43,3638
|
||||
44,3828
|
||||
45,4015
|
||||
46,4143
|
||||
47,4348
|
||||
48,4611
|
||||
49,4773
|
||||
50,4994
|
||||
51,5163
|
||||
52,5363
|
||||
53,5586
|
||||
54,5784
|
||||
55,6075
|
||||
56,6275
|
||||
57,6550
|
||||
58,6711
|
||||
59,6957
|
||||
60,7225
|
||||
61,7483
|
||||
62,7782
|
||||
63,7952
|
||||
64,8265
|
||||
65,8531
|
||||
66,8764
|
||||
67,9060
|
||||
68,9331
|
||||
69,9686
|
||||
70,9913
|
||||
71,10098
|
||||
72,10417
|
||||
73,10795
|
||||
74,11108
|
||||
75,11342
|
||||
76,11703
|
||||
77,12104
|
||||
78,12356
|
||||
79,12623
|
||||
80,13066
|
||||
81,13513
|
||||
82,13706
|
||||
83,13998
|
||||
84,14333
|
||||
85,14694
|
||||
86,15160
|
||||
87,15470
|
||||
88,15845
|
||||
89,16211
|
||||
90,16551
|
||||
91,17047
|
||||
92,17237
|
||||
93,17669
|
||||
94,18055
|
||||
95,18614
|
||||
96,18838
|
||||
97,19253
|
||||
98,19868
|
||||
99,20092
|
||||
100,20517
|
||||
|
97
latex/output/transform_tridiag.csv
Normal file
@@ -0,0 +1,97 @@
|
||||
N,T
|
||||
5,35
|
||||
6,41
|
||||
7,78
|
||||
8,104
|
||||
9,135
|
||||
10,177
|
||||
11,222
|
||||
12,238
|
||||
13,305
|
||||
14,335
|
||||
15,417
|
||||
16,460
|
||||
17,537
|
||||
18,606
|
||||
19,688
|
||||
20,756
|
||||
21,840
|
||||
22,917
|
||||
23,1017
|
||||
24,1095
|
||||
25,1207
|
||||
26,1298
|
||||
27,1420
|
||||
28,1492
|
||||
29,1629
|
||||
30,1766
|
||||
31,1869
|
||||
32,1965
|
||||
33,2132
|
||||
34,2275
|
||||
35,2403
|
||||
36,2570
|
||||
37,2670
|
||||
38,2794
|
||||
39,2962
|
||||
40,3169
|
||||
41,3284
|
||||
42,3469
|
||||
43,3619
|
||||
44,3840
|
||||
45,3977
|
||||
46,4161
|
||||
47,4406
|
||||
48,4523
|
||||
49,4710
|
||||
50,4919
|
||||
51,5207
|
||||
52,5336
|
||||
53,5582
|
||||
54,5801
|
||||
55,5997
|
||||
56,6248
|
||||
57,6465
|
||||
58,6694
|
||||
59,6911
|
||||
60,7078
|
||||
61,7355
|
||||
62,7618
|
||||
63,7880
|
||||
64,8170
|
||||
65,8407
|
||||
66,8651
|
||||
67,8899
|
||||
68,9139
|
||||
69,9478
|
||||
70,9786
|
||||
71,10059
|
||||
72,10325
|
||||
73,10608
|
||||
74,10887
|
||||
75,11223
|
||||
76,11514
|
||||
77,11794
|
||||
78,12120
|
||||
79,12420
|
||||
80,12738
|
||||
81,13111
|
||||
82,13402
|
||||
83,13772
|
||||
84,14018
|
||||
85,14393
|
||||
86,14820
|
||||
87,15096
|
||||
88,15451
|
||||
89,15866
|
||||
90,16243
|
||||
91,16688
|
||||
92,16864
|
||||
93,17359
|
||||
94,17701
|
||||
95,18027
|
||||
96,18473
|
||||
97,18810
|
||||
98,19231
|
||||
99,19573
|
||||
100,19992
|
||||
|
@@ -0,0 +1,16 @@
|
||||
\section*{Problem 1}
|
||||
We are studying the one-dimentional buckling beam, which can be described by the equation
|
||||
\begin{align*}
|
||||
\gamma \frac{d^{2} u(x)}{dx^{2}} &= -F u(x) & \rightarrow & & \frac{d^{2} u(x)}{dx^{2}} &= - \frac{F}{\gamma} u(x) \\
|
||||
\end{align*}
|
||||
where $\gamma$ is a constant determined by the material of the beam. We want to scale the equation, that is we want to scale by the x-value of the beams endpoint $x=L$.
|
||||
Scaling will result in a dimensionless variable $\hat{x} = \frac{1}{L}$.
|
||||
%
|
||||
\begin{align*}
|
||||
\frac{d^{2}}{dx^{2}} &= \frac{d}{dx} \frac{d}{dx} = \bigg( \frac{d\hat{x}}{dx} \frac{d}{d\hat{x}} \bigg) \bigg( \frac{d\hat{x}}{dx} \frac{d}{d\hat{x}} \bigg) & \text{where we have used } \frac{d\hat{x}}{dx} \frac{d}{d\hat{x}} = \frac{d}{dx} \frac{d\hat{x}}{d\hat{x}} \\
|
||||
&= \bigg( \frac{1}{L} \frac{d}{d\hat{x}} \bigg) \bigg( \frac{1}{L} \frac{d}{d\hat{x}} \bigg) = \frac{1}{L^{2}} \frac{d}{d\hat{x}^{2}} & \text{where } \hat{x} \equiv \frac{x}{L} \text{ and } \frac{d\hat{x}}{dx} = \frac{1}{L} \\
|
||||
\end{align*}
|
||||
Now we insert the expression into the original equation
|
||||
\begin{align*}
|
||||
\frac{d u(\hat{x})}{d\hat{x}^{2}} &= - \frac{F L^{2}}{\gamma} u(\hat{x}). \\
|
||||
\end{align*}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
\section*{Problem 2}
|
||||
|
||||
The functions that set up the tridiagonal matrices can be found in
|
||||
\textbf{matrix.hpp} and \textbf{matrix.cpp} in the Github repo.
|
||||
|
||||
The test for this can be found in \textbf{test\_suite.cpp}.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
\section*{Problem 3}
|
||||
|
||||
\subsection*{a)}
|
||||
|
||||
The function to find the largest off-diagonal can be found in
|
||||
\textbf{matrix.hpp} and \textbf{matrix.cpp}.
|
||||
|
||||
\subsection*{b)}
|
||||
|
||||
The test for (a) can be found in \textbf{test\_suite.cpp}.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
\section*{Problem 4}
|
||||
|
||||
\subsection*{a)}
|
||||
|
||||
The code for Jacobi's rotation algorithm can be found in \textbf{jacobi.hpp}
|
||||
and \textbf{jacobi.cpp}.
|
||||
|
||||
\subsection*{b)}
|
||||
|
||||
The test for (a) can be found in \textbf{test\_suite.cpp}.
|
||||
|
||||