Introduction
Introduction Statistics Contact Development Disclaimer Help
tmainA.cpp.html - numeric - C++ library with numerical algorithms
git clone git://src.adamsgaard.dk/numeric
Log
Files
Refs
LICENSE
---
tmainA.cpp.html (9258B)
---
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/…
2 <html>
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <title>~/code/numeric/exam/mainA.cpp.html</title>
6 <meta name="Generator" content="Vim/7.4">
7 <meta name="plugin-version" content="vim7.4_v1">
8 <meta name="syntax" content="cpp">
9 <meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolu…
10 <meta name="colorscheme" content="desert">
11 <style type="text/css">
12 <!--
13 pre { white-space: pre-wrap; font-family: monospace; color: #ffffff; bac…
14 body { font-family: monospace; color: #ffffff; background-color: #000000…
15 * { font-size: 1em; }
16 .Type { color: #008000; }
17 .Statement { color: #804000; }
18 .LineNr { color: #804000; }
19 .PreProc { color: #c000c0; }
20 .Constant { color: #af5f00; }
21 .Special { color: #c000c0; }
22 .Comment { color: #008080; }
23 -->
24 </style>
25
26 <script type='text/javascript'>
27 <!--
28
29 /* function to open any folds containing a jumped-to line before jumping…
30 function JumpToLine()
31 {
32 var lineNum;
33 lineNum = window.location.hash;
34 lineNum = lineNum.substr(1); /* strip off '#' */
35
36 if (lineNum.indexOf('L') == -1) {
37 lineNum = 'L'+lineNum;
38 }
39 lineElem = document.getElementById(lineNum);
40 /* Always jump to new location even if the line was hidden inside a fo…
41 * we corrected the raw number to a line ID.
42 */
43 if (lineElem) {
44 lineElem.scrollIntoView(true);
45 }
46 return true;
47 }
48 if ('onhashchange' in window) {
49 window.onhashchange = JumpToLine;
50 }
51
52 -->
53 </script>
54 </head>
55 <body onload='JumpToLine();'>
56 <pre id='vimCodeElement'>
57 <span id="L1" class="LineNr"> 1 </span><span class="PreProc">#include </…
58 <span id="L2" class="LineNr"> 2 </span><span class="PreProc">#include </…
59 <span id="L3" class="LineNr"> 3 </span><span class="PreProc">#include </…
60 <span id="L4" class="LineNr"> 4 </span><span class="PreProc">#include </…
61 <span id="L5" class="LineNr"> 5 </span><span class="PreProc">#include </…
62 <span id="L6" class="LineNr"> 6 </span><span class="PreProc">#include </…
63 <span id="L7" class="LineNr"> 7 </span><span class="PreProc">#include </…
64 <span id="L8" class="LineNr"> 8 </span><span class="PreProc">#include </…
65 <span id="L9" class="LineNr"> 9 </span>
66 <span id="L10" class="LineNr">10 </span>
67 <span id="L11" class="LineNr">11 </span><span class="Type">int</span> ma…
68 <span id="L12" class="LineNr">12 </span>{
69 <span id="L13" class="LineNr">13 </span> <span class="Comment">// Names…
70 <span id="L14" class="LineNr">14 </span> <span class="Statement">using<…
71 <span id="L15" class="LineNr">15 </span> <span class="Statement">using<…
72 <span id="L16" class="LineNr">16 </span> <span class="Statement">using<…
73 <span id="L17" class="LineNr">17 </span>
74 <span id="L18" class="LineNr">18 </span> <span class="Comment">// Calcu…
75 <span id="L19" class="LineNr">19 </span> Floattype eps_machine = <span …
76 <span id="L20" class="LineNr">20 </span> <span class="Statement">while<…
77 <span id="L21" class="LineNr">21 </span> eps_machine /= <span class="…
78 <span id="L22" class="LineNr">22 </span>
79 <span id="L23" class="LineNr">23 </span> <span class="Type">const</span…
80 <span id="L24" class="LineNr">24 </span> <span class="Type">const</span…
81 <span id="L25" class="LineNr">25 </span> cout &lt;&lt; <span class="Con…
82 <span id="L26" class="LineNr">26 </span> &lt;&lt; <span class="Con…
83 <span id="L27" class="LineNr">27 </span> &lt;&lt; id%n &lt;&lt; <s…
84 <span id="L28" class="LineNr">28 </span> cout &lt;&lt; <span class="Con…
85 <span id="L29" class="LineNr">29 </span> &lt;&lt; <span class="Con…
86 <span id="L30" class="LineNr">30 </span>
87 <span id="L31" class="LineNr">31 </span> cout &lt;&lt; <span class="Con…
88 <span id="L32" class="LineNr">32 </span> <span class="Type">complex</sp…
89 <span id="L33" class="LineNr">33 </span> <span class="Type">complex</sp…
90 <span id="L34" class="LineNr">34 </span> cout &lt;&lt; <span class="Con…
91 <span id="L35" class="LineNr">35 </span> Inttype n_eqs = <span class="C…
92 <span id="L36" class="LineNr">36 </span> vector&lt;<span class="Type">c…
93 <span id="L37" class="LineNr">37 </span> <span class="Type">complex</sp…
94 <span id="L38" class="LineNr">38 </span> <span class="Type">complex</sp…
95 <span id="L39" class="LineNr">39 </span> y_start[<span class="Constant"…
96 <span id="L40" class="LineNr">40 </span> y_start[<span class="Constant"…
97 <span id="L41" class="LineNr">41 </span> Floattype h_start = <span clas…
98 <span id="L42" class="LineNr">42 </span> ODE realode(func1, <span cl…
99 <span id="L43" class="LineNr">43 </span> y_start, <span cl…
100 <span id="L44" class="LineNr">44 </span> a, <span cl…
101 <span id="L45" class="LineNr">45 </span> b, <span cl…
102 <span id="L46" class="LineNr">46 </span> h_start, <span cl…
103 <span id="L47" class="LineNr">47 </span> <span class="Const…
104 <span id="L48" class="LineNr">48 </span> eps_machine*<span …
105 <span id="L49" class="LineNr">49 </span> eps_machine*<span …
106 <span id="L50" class="LineNr">50 </span> realode.write(<span class="Con…
107 <span id="L51" class="LineNr">51 </span>
108 <span id="L52" class="LineNr">52 </span> <span class="Comment">// Repor…
109 <span id="L53" class="LineNr">53 </span> cout &lt;&lt; <span class="Con…
110 <span id="L54" class="LineNr">54 </span> &lt;&lt; realode.steps() …
111 <span id="L55" class="LineNr">55 </span>
112 <span id="L56" class="LineNr">56 </span> <span class="Comment">// Retur…
113 <span id="L57" class="LineNr">57 </span> <span class="Statement">return…
114 <span id="L58" class="LineNr">58 </span>}
115 <span id="L59" class="LineNr">59 </span>
116 </pre>
117 </body>
118 </html>
119 <!-- vim: set foldmethod=manual : -->
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.