\hypertarget{vector_8hpp_source}{}\doxysection{vector.\+hpp} \label{vector_8hpp_source}\index{src/vector.hpp@{src/vector.hpp}} \mbox{\hyperlink{vector_8hpp}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef VECTOR\_HPP}} \DoxyCodeLine{2 \textcolor{preprocessor}{\#define VECTOR\_HPP}} \DoxyCodeLine{3 } \DoxyCodeLine{4 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{5 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{debug_8hpp}{debug.hpp}}"{}}} \DoxyCodeLine{6 } \DoxyCodeLine{7 \textcolor{keyword}{using namespace }std;} \DoxyCodeLine{8 } \DoxyCodeLine{9 \textcolor{keyword}{using} \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} = double;\textcolor{comment}{//float;}} \DoxyCodeLine{10 } \DoxyCodeLine{11 \textcolor{preprocessor}{\#ifdef DEBUG}} \DoxyCodeLine{12 \textcolor{keyword}{struct }\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}\{} \DoxyCodeLine{13 \textcolor{keywordtype}{size\_t} n;} \DoxyCodeLine{14 \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}* data;} \DoxyCodeLine{15 \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}\& operator[](\textcolor{keywordtype}{size\_t} i);} \DoxyCodeLine{16 \};} \DoxyCodeLine{17 } \DoxyCodeLine{18 \textcolor{keyword}{inline} \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}\&} \DoxyCodeLine{19 Vector::operator[](\textcolor{keywordtype}{size\_t} i)\{} \DoxyCodeLine{20 \mbox{\hyperlink{debug_8hpp_a3153a272f18d0f805028fce7e4337b53}{assert}}(i0);} \DoxyCodeLine{74 \textcolor{keywordtype}{size\_t} imax=0;} \DoxyCodeLine{75 \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} vmax=v[0];} \DoxyCodeLine{76 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{size\_t} i=1;ivmax)\{} \DoxyCodeLine{78 vmax=v[i];} \DoxyCodeLine{79 imax=i;} \DoxyCodeLine{80 \}} \DoxyCodeLine{81 \}} \DoxyCodeLine{82 \textcolor{keywordflow}{return} imax;} \DoxyCodeLine{83 \}} \DoxyCodeLine{84 } \DoxyCodeLine{85 \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}} \DoxyCodeLine{86 \mbox{\hyperlink{vector_8hpp_a8a3da36f32f258d0fcd5c8453fcc9c58}{indice2}}(\textcolor{keywordtype}{size\_t} i,\textcolor{keywordtype}{size\_t} j,\textcolor{keywordtype}{size\_t} nj)\{} \DoxyCodeLine{87 \textcolor{keywordflow}{return} i*nj+j;} \DoxyCodeLine{88 \}} \DoxyCodeLine{89 } \DoxyCodeLine{90 \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}} \DoxyCodeLine{91 \mbox{\hyperlink{vector_8hpp_a6df97fe6a0623e6b4bac1ba311a0a9de}{indice3}}(\textcolor{keywordtype}{size\_t} i,\textcolor{keywordtype}{size\_t} j,\textcolor{keywordtype}{size\_t} k,\textcolor{keywordtype}{size\_t} nj,\textcolor{keywordtype}{size\_t} nk)\{} \DoxyCodeLine{92 \textcolor{keywordflow}{return} (i*nj+j)*nk+k;} \DoxyCodeLine{93 \}} \DoxyCodeLine{94 } \DoxyCodeLine{95 \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}} \DoxyCodeLine{96 \mbox{\hyperlink{vector_8hpp_a04bfed1c3222805726b019f3bbe185bc}{indice4}}(\textcolor{keywordtype}{size\_t} i,\textcolor{keywordtype}{size\_t} j,\textcolor{keywordtype}{size\_t} k,\textcolor{keywordtype}{size\_t} l,\textcolor{keywordtype}{size\_t} nj,\textcolor{keywordtype}{size\_t} nk,\textcolor{keywordtype}{size\_t} nl)\{} \DoxyCodeLine{97 \textcolor{keywordflow}{return} ((i*nj+j)*nk+k)*nl+l;} \DoxyCodeLine{98 \}} \DoxyCodeLine{99 } \DoxyCodeLine{100 \textcolor{preprocessor}{\#endif}} \end{DoxyCode}