\hypertarget{shape_8hpp_source}{}\doxysection{shape.\+hpp}
\label{shape_8hpp_source}\index{src/shape.hpp@{src/shape.hpp}}
\mbox{\hyperlink{shape_8hpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef SHAPE\_HPP}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define SHAPE\_HPP}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{debug_8hpp}{debug.hpp}}"{}}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{keyword}{class }\mbox{\hyperlink{class_shape}{Shape}}\{}
\DoxyCodeLine{7 \textcolor{keyword}{private}:}
\DoxyCodeLine{8   \textcolor{keywordtype}{size\_t} dim;}
\DoxyCodeLine{9   \textcolor{keywordtype}{size\_t}* n;}
\DoxyCodeLine{10 \textcolor{keyword}{public}:}
\DoxyCodeLine{11   \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape}}(\textcolor{keywordtype}{size\_t} n);}
\DoxyCodeLine{12   \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape}}(\textcolor{keywordtype}{size\_t} n1,\textcolor{keywordtype}{size\_t} n2);}
\DoxyCodeLine{13   \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape}}(\textcolor{keywordtype}{size\_t} n1,\textcolor{keywordtype}{size\_t} n2,\textcolor{keywordtype}{size\_t} n3);}
\DoxyCodeLine{14   \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_shape_a1c941a2c6dea59debacf882e2c76d54f}{size}}() \textcolor{keyword}{const};}
\DoxyCodeLine{15 \};}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keyword}{inline}}
\DoxyCodeLine{18 \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape::Shape}}(\textcolor{keywordtype}{size\_t} n1)\{}
\DoxyCodeLine{19   dim=1;}
\DoxyCodeLine{20   n=\textcolor{keyword}{new} \textcolor{keywordtype}{size\_t}[1];}
\DoxyCodeLine{21   n[0]=n1;}
\DoxyCodeLine{22 \}}
\DoxyCodeLine{23 }
\DoxyCodeLine{24 \textcolor{keyword}{inline}}
\DoxyCodeLine{25 \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape::Shape}}(\textcolor{keywordtype}{size\_t} n1,\textcolor{keywordtype}{size\_t} n2)\{}
\DoxyCodeLine{26   dim=2;}
\DoxyCodeLine{27   n=\textcolor{keyword}{new} \textcolor{keywordtype}{size\_t}[2];}
\DoxyCodeLine{28   n[0]=n1;n[1]=n2;}
\DoxyCodeLine{29 \}}
\DoxyCodeLine{30 }
\DoxyCodeLine{31 \textcolor{keyword}{inline}}
\DoxyCodeLine{32 \mbox{\hyperlink{class_shape_a3c6cb254fcca8655162a89ee44dffd5b}{Shape::Shape}}(\textcolor{keywordtype}{size\_t} n1,\textcolor{keywordtype}{size\_t} n2,\textcolor{keywordtype}{size\_t} n3)\{}
\DoxyCodeLine{33   dim=3;}
\DoxyCodeLine{34   n=\textcolor{keyword}{new} \textcolor{keywordtype}{size\_t}[3];}
\DoxyCodeLine{35   n[0]=n1;n[1]=n2,n[2]=n3;}
\DoxyCodeLine{36 \}}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}}
\DoxyCodeLine{39 \mbox{\hyperlink{class_shape_a1c941a2c6dea59debacf882e2c76d54f}{Shape::size}}()\textcolor{keyword}{ const}\{}
\DoxyCodeLine{40   \textcolor{keywordtype}{size\_t} s=1;}
\DoxyCodeLine{41   \textcolor{keywordflow}{for}(\textcolor{keywordtype}{size\_t} d=0;d<dim;++d) s*=n[d];}
\DoxyCodeLine{42   \textcolor{keywordflow}{return} s;}
\DoxyCodeLine{43 \}}
\DoxyCodeLine{44 }
\DoxyCodeLine{45 }
\DoxyCodeLine{46 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
