\doxysection{Reward.\+hpp}
\hypertarget{Reward_8hpp_source}{}\label{Reward_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/RL/Reward.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/RL/Reward.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_REWARD\_H}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_REWARD\_H}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}Py.hpp"{}}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ \textcolor{keyword}{using\ }Reward\ =\ float;}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classRewardFunction}{RewardFunction}};}
\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPCBoard}{PCBoard}};}
\DoxyCodeLine{00012\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classConnection}{Connection}};}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structRouterResult}{RouterResult}}}
\DoxyCodeLine{00015\ \{}
\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordtype}{bool}\ isSet()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !std::isnan(TrackLen);\ \}}
\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordtype}{float}\ TrackLen\{std::numeric\_limits<float>::quiet\_NaN()\};}
\DoxyCodeLine{00018\ \ \ \ \ int16\_t\ NumVias\{0\};}
\DoxyCodeLine{00019\ \ \ \ \ int16\_t\ NumDisconnected\{0\};}
\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordtype}{bool}\ operator==(\textcolor{keyword}{const}\ \mbox{\hyperlink{structRouterResult}{RouterResult}}\&)\ \textcolor{keyword}{const}\ =\ \textcolor{keywordflow}{default};}
\DoxyCodeLine{00021\ \ \ \ \ PyObject\ *getPy()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00022\ \};}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classRewardFunction}{RewardFunction}}}
\DoxyCodeLine{00025\ \{}
\DoxyCodeLine{00026\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{classRewardFunction}{RewardFunction}}\ *create(PyObject\ *);}
\DoxyCodeLine{00028\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{virtual}\ \mbox{\hyperlink{classRewardFunction}{\string~RewardFunction}}()\ \{\ \}}
\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ setContext(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPCBoard}{PCBoard}}\&)\ \{\ \}}
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{virtual}\ Reward\ operator()(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&,\ \mbox{\hyperlink{structRouterResult}{RouterResult}}\ *\ =\ 0)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{virtual}\ Reward\ operator()(\textcolor{keyword}{const}\ std::vector<Connection\ *>\&,\ \mbox{\hyperlink{structRouterResult}{RouterResult}}\ *\ =\ 0)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{virtual}\ Reward\ operator()(\textcolor{keywordtype}{int}\ unrouted)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00034\ \};}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \textcolor{keyword}{namespace\ }rewards}
\DoxyCodeLine{00037\ \{}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \textcolor{keyword}{class\ }RouteLength\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classRewardFunction}{RewardFunction}}}
\DoxyCodeLine{00040\ \{}
\DoxyCodeLine{00041\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keyword}{static}\ RouteLength\ *create(PyObject\ *);}
\DoxyCodeLine{00043\ \ \ \ \ RouteLength();}
\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ setContext(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPCBoard}{PCBoard}}\&)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00045\ \ \ \ \ Reward\ operator()(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&,\ \mbox{\hyperlink{structRouterResult}{RouterResult}}\ *\ =\ 0)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00046\ \ \ \ \ Reward\ operator()(\textcolor{keyword}{const}\ std::vector<Connection\ *>\&,\ \mbox{\hyperlink{structRouterResult}{RouterResult}}\ *\ =\ 0)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00047\ \ \ \ \ Reward\ operator()(\textcolor{keywordtype}{int}\ unrouted)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00048\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordtype}{float}\ FPerUnrouted\{0.0f\};}
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{float}\ FAnyUnrouted\{0.0f\};}
\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordtype}{float}\ FPerVia\{0.0f\};}
\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keywordtype}{float}\ FPerRouted\{1.0f\};}
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{float}\ FScale\{0.0f\};}
\DoxyCodeLine{00054\ \ \ \ \ std::string\ ScaleLength;}
\DoxyCodeLine{00055\ \ \ \ \ std::string\ ScaleGlobal;}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{char}\ ScaleLength\_\{0\};}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keywordtype}{bool}\ IgnoreNecessaryVias\{\textcolor{keyword}{true}\};}
\DoxyCodeLine{00058\ \};}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00060\ \}\ \textcolor{comment}{//\ namespace\ rewards}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_REWARD\_H}}

\end{DoxyCode}
