value_8hpp.tex 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. \hypertarget{value_8hpp}{}\section{/home/caleb/\+Sources/\+T\+T\+T\+T/filval/value.hpp File Reference}
  2. \label{value_8hpp}\index{/home/caleb/\+Sources/\+T\+T\+T\+T/filval/value.\+hpp@{/home/caleb/\+Sources/\+T\+T\+T\+T/filval/value.\+hpp}}
  3. {\ttfamily \#include $<$iostream$>$}\newline
  4. {\ttfamily \#include $<$utility$>$}\newline
  5. {\ttfamily \#include $<$algorithm$>$}\newline
  6. {\ttfamily \#include $<$map$>$}\newline
  7. {\ttfamily \#include $<$vector$>$}\newline
  8. {\ttfamily \#include $<$tuple$>$}\newline
  9. {\ttfamily \#include $<$initializer\+\_\+list$>$}\newline
  10. {\ttfamily \#include $<$functional$>$}\newline
  11. Include dependency graph for value.\+hpp\+:
  12. \nopagebreak
  13. \begin{figure}[H]
  14. \begin{center}
  15. \leavevmode
  16. \includegraphics[width=350pt]{value_8hpp__incl}
  17. \end{center}
  18. \end{figure}
  19. This graph shows which files directly or indirectly include this file\+:
  20. \nopagebreak
  21. \begin{figure}[H]
  22. \begin{center}
  23. \leavevmode
  24. \includegraphics[height=550pt]{value_8hpp__dep__incl}
  25. \end{center}
  26. \end{figure}
  27. \subsection*{Classes}
  28. \begin{DoxyCompactItemize}
  29. \item
  30. class \hyperlink{classfilval_1_1GenValue}{filval\+::\+Gen\+Value}
  31. \begin{DoxyCompactList}\small\item\em A type-\/agnostic value. \end{DoxyCompactList}\item
  32. class \hyperlink{classfilval_1_1Value}{filval\+::\+Value$<$ T $>$}
  33. \begin{DoxyCompactList}\small\item\em A generic value. \end{DoxyCompactList}\item
  34. class \hyperlink{classfilval_1_1ObservedValue}{filval\+::\+Observed\+Value$<$ T $>$}
  35. \begin{DoxyCompactList}\small\item\em A generic, observed, value. \end{DoxyCompactList}\item
  36. class \hyperlink{classfilval_1_1DerivedValue}{filval\+::\+Derived\+Value$<$ T $>$}
  37. \begin{DoxyCompactList}\small\item\em A generic, derived, value. \end{DoxyCompactList}\item
  38. class \hyperlink{classfilval_1_1WrapperVector}{filval\+::\+Wrapper\+Vector$<$ T $>$}
  39. \begin{DoxyCompactList}\small\item\em A std\+::vector wrapper around a C-\/style array. \end{DoxyCompactList}\item
  40. class \hyperlink{classfilval_1_1Pair}{filval\+::\+Pair$<$ T1, T2 $>$}
  41. \begin{DoxyCompactList}\small\item\em Creates a std\+::pair type from a two other \hyperlink{classfilval_1_1Value}{Value} objects. \end{DoxyCompactList}\item
  42. class \hyperlink{classfilval_1_1ZipMapFour}{filval\+::\+Zip\+Map\+Four$<$ R, T $>$}
  43. \begin{DoxyCompactList}\small\item\em Takes a set of four \hyperlink{classfilval_1_1Value}{Value}$<$std\+::vector$<$\+T$>$ $>$ objects and a function of four Ts and returns a std\+::vector$<$\+R$>$. \end{DoxyCompactList}\item
  44. class \hyperlink{classfilval_1_1Reduce}{filval\+::\+Reduce$<$ T $>$}
  45. \begin{DoxyCompactList}\small\item\em \hyperlink{classfilval_1_1Reduce}{Reduce} a \hyperlink{classfilval_1_1Value}{Value} of type vector$<$\+T$>$ to just a T. \end{DoxyCompactList}\item
  46. class \hyperlink{classfilval_1_1Max}{filval\+::\+Max$<$ T $>$}
  47. \begin{DoxyCompactList}\small\item\em Find and return the maximum value of a vector. \end{DoxyCompactList}\item
  48. class \hyperlink{classfilval_1_1Min}{filval\+::\+Min$<$ T $>$}
  49. \begin{DoxyCompactList}\small\item\em Find and return the minimum value of a vector. \end{DoxyCompactList}\item
  50. class \hyperlink{classfilval_1_1Mean}{filval\+::\+Mean$<$ T $>$}
  51. \begin{DoxyCompactList}\small\item\em Calculate the mean value of a vector. \end{DoxyCompactList}\item
  52. class \hyperlink{classfilval_1_1ElementOf}{filval\+::\+Element\+Of$<$ T $>$}
  53. \begin{DoxyCompactList}\small\item\em Extract the element at a specific index from a vector. \end{DoxyCompactList}\item
  54. class \hyperlink{classfilval_1_1ReduceIndex}{filval\+::\+Reduce\+Index$<$ T $>$}
  55. \begin{DoxyCompactList}\small\item\em Similar to \hyperlink{classfilval_1_1Reduce}{Reduce}, but returns a pair of a T and an int. \end{DoxyCompactList}\item
  56. class \hyperlink{classfilval_1_1MaxIndex}{filval\+::\+Max\+Index$<$ T $>$}
  57. \begin{DoxyCompactList}\small\item\em Find and return the maximum value of a vector and its index. \end{DoxyCompactList}\item
  58. class \hyperlink{classfilval_1_1MinIndex}{filval\+::\+Min\+Index$<$ T $>$}
  59. \begin{DoxyCompactList}\small\item\em Find and return the minimum value of a vector and its index. \end{DoxyCompactList}\item
  60. class \hyperlink{classfilval_1_1MultiFunc}{filval\+::\+Multi\+Func$<$ R, T $>$}
  61. \begin{DoxyCompactList}\small\item\em A variadic. \end{DoxyCompactList}\item
  62. class \hyperlink{classfilval_1_1BoundValue}{filval\+::\+Bound\+Value$<$ T $>$}
  63. \begin{DoxyCompactList}\small\item\em A generic value owning only a function object. \end{DoxyCompactList}\item
  64. class \hyperlink{classfilval_1_1ConstantValue}{filval\+::\+Constant\+Value$<$ T $>$}
  65. \begin{DoxyCompactList}\small\item\em A \hyperlink{classfilval_1_1Value}{Value} which always returns the same value, supplied in the constructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
  66. \subsection*{Namespaces}
  67. \begin{DoxyCompactItemize}
  68. \item
  69. \hyperlink{namespacefilval}{filval}
  70. \begin{DoxyCompactList}\small\item\em The namespace containing all filval classes and functions. \end{DoxyCompactList}\end{DoxyCompactItemize}
  71. \subsection*{Typedefs}
  72. \begin{DoxyCompactItemize}
  73. \item
  74. \hypertarget{namespacefilval_a070dfc70821cfeab3039b7eace2dc122}{}\label{namespacefilval_a070dfc70821cfeab3039b7eace2dc122}
  75. typedef std\+::map$<$ std\+::string, Gen\+Value $\ast$ $>$ {\bfseries filval\+::\+Value\+Set}
  76. \end{DoxyCompactItemize}
  77. \subsection{Detailed Description}
  78. \begin{DoxyAuthor}{Author}
  79. Caleb Fangmeier \href{mailto:caleb@fangmeier.tech}{\tt caleb@fangmeier.\+tech}
  80. \end{DoxyAuthor}
  81. \begin{DoxyVersion}{Version}
  82. 0.\+1
  83. \end{DoxyVersion}
  84. \hypertarget{value_8hpp_LICENSE}{}\subsection{L\+I\+C\+E\+N\+SE}\label{value_8hpp_LICENSE}
  85. M\+IT License
  86. Copyright (c) 2017 Caleb Fangmeier
  87. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \char`\"{}\+Software\char`\"{}), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions\+:
  88. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  89. T\+HE S\+O\+F\+T\+W\+A\+RE IS P\+R\+O\+V\+I\+D\+ED \char`\"{}\+A\+S I\+S\char`\"{}, W\+I\+T\+H\+O\+UT W\+A\+R\+R\+A\+N\+TY OF A\+NY K\+I\+ND, E\+X\+P\+R\+E\+SS OR I\+M\+P\+L\+I\+ED, I\+N\+C\+L\+U\+D\+I\+NG B\+UT N\+OT L\+I\+M\+I\+T\+ED TO T\+HE W\+A\+R\+R\+A\+N\+T\+I\+ES OF M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY, F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE A\+ND N\+O\+N\+I\+N\+F\+R\+I\+N\+G\+E\+M\+E\+NT. IN NO E\+V\+E\+NT S\+H\+A\+LL T\+HE A\+U\+T\+H\+O\+RS OR C\+O\+P\+Y\+R\+I\+G\+HT H\+O\+L\+D\+E\+RS BE L\+I\+A\+B\+LE F\+OR A\+NY C\+L\+A\+IM, D\+A\+M\+A\+G\+ES OR O\+T\+H\+ER L\+I\+A\+B\+I\+L\+I\+TY, W\+H\+E\+T\+H\+ER IN AN A\+C\+T\+I\+ON OF C\+O\+N\+T\+R\+A\+CT, T\+O\+RT OR O\+T\+H\+E\+R\+W\+I\+SE, A\+R\+I\+S\+I\+NG F\+R\+OM, O\+UT OF OR IN C\+O\+N\+N\+E\+C\+T\+I\+ON W\+I\+TH T\+HE S\+O\+F\+T\+W\+A\+RE OR T\+HE U\+SE OR O\+T\+H\+ER D\+E\+A\+L\+I\+N\+GS IN T\+HE S\+O\+F\+T\+W\+A\+RE.\hypertarget{value_8hpp_DESCRIPTION}{}\subsection{D\+E\+S\+C\+R\+I\+P\+T\+I\+ON}\label{value_8hpp_DESCRIPTION}
  90. This header defines a set of generic classes that wrap up \char`\"{}values\char`\"{}. In essence, a Value$<$\+T$>$ object is just something that contains a value of type T and can provide it when requested. The usefulness stems from composing values together with calculations. This enables very clear dependency mapping and a way to know clearly how every value was arrived at. This could be used to, for example, automatically generate commentary for plots that explain the exect calculation used to create it. Or easily making a series of plots contrasting different values that have been composed slightly differently.