\hypertarget{util__func_8cpp}{}\doxysection{utils/util\+\_\+func.cpp File Reference}
\label{util__func_8cpp}\index{utils/util\_func.cpp@{utils/util\_func.cpp}}


This is collection of math functions.  


{\ttfamily \#include $<$cmath$>$}\newline
{\ttfamily \#include $<$fstream$>$}\newline
{\ttfamily \#include $<$random$>$}\newline
{\ttfamily \#include $<$nntrainer\+\_\+log.\+h$>$}\newline
{\ttfamily \#include $<$util\+\_\+func.\+h$>$}\newline
Include dependency graph for util\+\_\+func.\+cpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{util__func_8cpp__incl}
\end{center}
\end{figure}
\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacenntrainer}{nntrainer}}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacenntrainer_a683929e1f742e4644832c13d0fac120d}\label{namespacenntrainer_a683929e1f742e4644832c13d0fac120d}} 
static std\+::uniform\+\_\+real\+\_\+distribution$<$ float $>$ {\bfseries nntrainer\+::dist} (-\/0.\+5, 0.\+5)
\item 
\mbox{\Hypertarget{namespacenntrainer_ac051a124097960c9aa9a6ea95f15674a}\label{namespacenntrainer_ac051a124097960c9aa9a6ea95f15674a}} 
unsigned int {\bfseries nntrainer\+::get\+Seed} ()
\item 
\mbox{\Hypertarget{namespacenntrainer_a2a1d41db57225079d0a89bb89ab3ac9d}\label{namespacenntrainer_a2a1d41db57225079d0a89bb89ab3ac9d}} 
float {\bfseries nntrainer\+::sqrt\+Float} (float x)
\item 
\mbox{\Hypertarget{namespacenntrainer_a36672f20f31a8fee9cbc28ae36c317c8}\label{namespacenntrainer_a36672f20f31a8fee9cbc28ae36c317c8}} 
double {\bfseries nntrainer\+::sqrt\+Double} (double x)
\item 
\mbox{\Hypertarget{namespacenntrainer_acf40b813d2431adccad166db4384791f}\label{namespacenntrainer_acf40b813d2431adccad166db4384791f}} 
float {\bfseries nntrainer\+::log\+Float} (float x)
\item 
\mbox{\Hypertarget{namespacenntrainer_a565de0af5a6085f1e526714f7725063f}\label{namespacenntrainer_a565de0af5a6085f1e526714f7725063f}} 
float {\bfseries nntrainer\+::exp\+\_\+util} (float x)
\item 
\mbox{\Hypertarget{namespacenntrainer_a39fef6a57f36b772d96f596800d37e45}\label{namespacenntrainer_a39fef6a57f36b772d96f596800d37e45}} 
Tensor {\bfseries nntrainer\+::rotate\+\_\+180} (Tensor in)
\item 
\mbox{\Hypertarget{namespacenntrainer_adcc8bdebe88b73a1962cb8c9c44933d8}\label{namespacenntrainer_adcc8bdebe88b73a1962cb8c9c44933d8}} 
bool {\bfseries nntrainer\+::is\+File\+Exist} (std\+::string file\+\_\+name)
\item 
\mbox{\Hypertarget{namespacenntrainer_a036362ccf65e7d9da365dcc505217367}\label{namespacenntrainer_a036362ccf65e7d9da365dcc505217367}} 
{\footnotesize template$<$typename T $>$ }\\static void {\bfseries nntrainer\+::check\+File} (const T \&file, const char $\ast$error\+\_\+msg)
\item 
\mbox{\Hypertarget{namespacenntrainer_afa818310c351c738d45ed99e6f07387a}\label{namespacenntrainer_afa818310c351c738d45ed99e6f07387a}} 
void {\bfseries nntrainer\+::checked\+Read} (std\+::ifstream \&file, char $\ast$array, std\+::streamsize size, const char $\ast$error\+\_\+msg)
\item 
\mbox{\Hypertarget{namespacenntrainer_ae56c503fe402b87624ff267e302d0677}\label{namespacenntrainer_ae56c503fe402b87624ff267e302d0677}} 
void {\bfseries nntrainer\+::checked\+Write} (std\+::ostream \&file, const char $\ast$array, std\+::streamsize size, const char $\ast$error\+\_\+msg)
\item 
\mbox{\Hypertarget{namespacenntrainer_aff294ca59f3c6f7962bf05e0902ac880}\label{namespacenntrainer_aff294ca59f3c6f7962bf05e0902ac880}} 
std\+::string {\bfseries nntrainer\+::read\+String} (std\+::ifstream \&file, const char $\ast$error\+\_\+msg)
\item 
\mbox{\Hypertarget{namespacenntrainer_ad136f7e0a470bf017a75cfc9de7f91a6}\label{namespacenntrainer_ad136f7e0a470bf017a75cfc9de7f91a6}} 
void {\bfseries nntrainer\+::write\+String} (std\+::ofstream \&file, const std\+::string \&str, const char $\ast$error\+\_\+msg)
\item 
\mbox{\Hypertarget{namespacenntrainer_aba2774cdf75ebf9550998b3fec10839d}\label{namespacenntrainer_aba2774cdf75ebf9550998b3fec10839d}} 
bool {\bfseries nntrainer\+::endswith} (const std\+::string \&target, const std\+::string \&suffix)
\item 
\mbox{\Hypertarget{namespacenntrainer_af53f19e3f947675653d227364990c660}\label{namespacenntrainer_af53f19e3f947675653d227364990c660}} 
int {\bfseries nntrainer\+::get\+Key\+Value} (const std\+::string \&input\+\_\+str, std\+::string \&key, std\+::string \&value)
\item 
\mbox{\Hypertarget{namespacenntrainer_a7f0cd698c9e1c97f423ce0502bbbeb75}\label{namespacenntrainer_a7f0cd698c9e1c97f423ce0502bbbeb75}} 
int {\bfseries nntrainer\+::get\+Values} (int n\+\_\+str, std\+::string str, int $\ast$value)
\item 
\mbox{\Hypertarget{namespacenntrainer_aa1f3d4667dda7cadf6daaff8e31f712e}\label{namespacenntrainer_aa1f3d4667dda7cadf6daaff8e31f712e}} 
std\+::vector$<$ std\+::string $>$ {\bfseries nntrainer\+::split} (const std\+::string \&s, const std\+::regex \&reg)
\item 
\mbox{\Hypertarget{namespacenntrainer_a5ea4a3cf0ce9133d56f8927e4d2d6c32}\label{namespacenntrainer_a5ea4a3cf0ce9133d56f8927e4d2d6c32}} 
bool {\bfseries nntrainer\+::istrequal} (const std\+::string \&a, const std\+::string \&b)
\item 
\mbox{\Hypertarget{namespacenntrainer_a78ca9137bc36e4c6501712f75fc34030}\label{namespacenntrainer_a78ca9137bc36e4c6501712f75fc34030}} 
char $\ast$ {\bfseries nntrainer\+::get\+Realpath} (const char $\ast$name, char $\ast$resolved)
\item 
\mbox{\Hypertarget{namespacenntrainer_afce004e50707e1417865ad660138cbd8}\label{namespacenntrainer_afce004e50707e1417865ad660138cbd8}} 
tm $\ast$ {\bfseries nntrainer\+::get\+Localtime} (tm $\ast$tp)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static auto {\bfseries nntrainer\+::rng}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is collection of math functions. 

Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.

Licensed under the Apache License, Version 2.\+0 (the \char`\"{}\+License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\texttt{ http\+://www.\+apache.\+org/licenses/\+L\+I\+C\+E\+N\+S\+E-\/2.\+0}} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\+A\+S I\+S\char`\"{} B\+A\+S\+IS, W\+I\+T\+H\+O\+UT W\+A\+R\+R\+A\+N\+T\+I\+ES OR C\+O\+N\+D\+I\+T\+I\+O\+NS OF A\+NY K\+I\+ND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

\begin{DoxyDate}{Date}
08 April 2020 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nntrainer}{\texttt{ https\+://github.\+com/nnstreamer/nntrainer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Jijoong Moon \href{mailto:jijoong.moon@samsung.com}{\texttt{ jijoong.\+moon@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000246}{Bug}}]No known bugs except for N\+YI items\end{DoxyRefDesc}
