Ingen beskrivning

class_q_c_p_range.tex 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. \hypertarget{class_q_c_p_range}{}\section{Referencia de la Clase Q\+C\+P\+Range}
  2. \label{class_q_c_p_range}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  3. Represents the range an axis is encompassing.
  4. \subsection*{Métodos públicos}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. \hyperlink{class_q_c_p_range_aca158d7e69702cee5d77d10a269b01e2}{Q\+C\+P\+Range} ()
  8. \item
  9. \hyperlink{class_q_c_p_range_a1d9d84d084c8f368fdedd42e0978d405}{Q\+C\+P\+Range} (double lower, double upper)
  10. \item
  11. double \hyperlink{class_q_c_p_range_afa57c13049b965edb6fd1c00ac56338a}{size} () const
  12. \item
  13. double \hyperlink{class_q_c_p_range_a3825b53cf17da5de0843c1f3baad07db}{center} () const
  14. \item
  15. void \hyperlink{class_q_c_p_range_af914a7740269b0604d0827c634a878a9}{normalize} ()
  16. \item
  17. void \hyperlink{class_q_c_p_range_a0fa1bc8048be50d52bea93a8caf08305}{expand} (const \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \&other\+Range)
  18. \item
  19. \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \hyperlink{class_q_c_p_range_a6437bdf29a7ebc2c88a6045c4e622384}{expanded} (const \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \&other\+Range) const
  20. \item
  21. \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \hyperlink{class_q_c_p_range_aaf6a9046e78d91eeb8e89584fe46b034}{sanitized\+For\+Log\+Scale} () const
  22. \item
  23. \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \hyperlink{class_q_c_p_range_a1ff029704c29a75adbc1dc36cecaf44c}{sanitized\+For\+Lin\+Scale} () const
  24. \item
  25. bool \hyperlink{class_q_c_p_range_a030ce95b527c32e01414d0351347b46d}{contains} (double value) const
  26. \end{DoxyCompactItemize}
  27. \subsection*{Métodos públicos estáticos}
  28. \begin{DoxyCompactItemize}
  29. \item
  30. static bool \hyperlink{class_q_c_p_range_ab38bd4841c77c7bb86c9eea0f142dcc0}{valid\+Range} (double lower, double upper)
  31. \item
  32. static bool \hyperlink{class_q_c_p_range_a801b964752eaad6219be9d8a651ec2b3}{valid\+Range} (const \hyperlink{class_q_c_p_range}{Q\+C\+P\+Range} \&range)
  33. \end{DoxyCompactItemize}
  34. \subsection*{Atributos públicos}
  35. \begin{DoxyCompactItemize}
  36. \item
  37. \hypertarget{class_q_c_p_range_aa3aca3edb14f7ca0c85d912647b91745}{}double {\bfseries lower}\label{class_q_c_p_range_aa3aca3edb14f7ca0c85d912647b91745}
  38. \item
  39. \hypertarget{class_q_c_p_range_ae44eb3aafe1d0e2ed34b499b6d2e074f}{}double {\bfseries upper}\label{class_q_c_p_range_ae44eb3aafe1d0e2ed34b499b6d2e074f}
  40. \end{DoxyCompactItemize}
  41. \subsection*{Atributos públicos estáticos}
  42. \begin{DoxyCompactItemize}
  43. \item
  44. static const double \hyperlink{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}{min\+Range} = 1e-\/280
  45. \item
  46. static const double \hyperlink{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}{max\+Range} = 1e250
  47. \end{DoxyCompactItemize}
  48. \subsection{Descripción detallada}
  49. Represents the range an axis is encompassing.
  50. contains a {\itshape lower} and {\itshape upper} double value and provides convenience input, output and modification functions.
  51. \begin{DoxySeeAlso}{Ver también}
  52. \hyperlink{class_q_c_p_axis_aebdfea5d44c3a0ad2b4700cd4d25b641}{Q\+C\+P\+Axis\+::set\+Range}
  53. \end{DoxySeeAlso}
  54. \subsection{Documentación del constructor y destructor}
  55. \hypertarget{class_q_c_p_range_aca158d7e69702cee5d77d10a269b01e2}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  56. \index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  57. \subsubsection[{Q\+C\+P\+Range}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Range\+::\+Q\+C\+P\+Range (
  58. \begin{DoxyParamCaption}
  59. {}
  60. \end{DoxyParamCaption}
  61. )}\label{class_q_c_p_range_aca158d7e69702cee5d77d10a269b01e2}
  62. Constructs a range with {\itshape lower} and {\itshape upper} set to zero. \hypertarget{class_q_c_p_range_a1d9d84d084c8f368fdedd42e0978d405}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  63. \index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  64. \subsubsection[{Q\+C\+P\+Range}]{\setlength{\rightskip}{0pt plus 5cm}Q\+C\+P\+Range\+::\+Q\+C\+P\+Range (
  65. \begin{DoxyParamCaption}
  66. \item[{double}]{lower, }
  67. \item[{double}]{upper}
  68. \end{DoxyParamCaption}
  69. )}\label{class_q_c_p_range_a1d9d84d084c8f368fdedd42e0978d405}
  70. Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Constructs a range with the specified {\itshape lower} and {\itshape upper} values.
  71. \subsection{Documentación de las funciones miembro}
  72. \hypertarget{class_q_c_p_range_a3825b53cf17da5de0843c1f3baad07db}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!center@{center}}
  73. \index{center@{center}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  74. \subsubsection[{center}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Range\+::center (
  75. \begin{DoxyParamCaption}
  76. {}
  77. \end{DoxyParamCaption}
  78. ) const}\label{class_q_c_p_range_a3825b53cf17da5de0843c1f3baad07db}
  79. Returns the center of the range, i.\+e. ({\itshape upper+{\itshape lower})$\ast$0}.5 \hypertarget{class_q_c_p_range_a030ce95b527c32e01414d0351347b46d}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!contains@{contains}}
  80. \index{contains@{contains}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  81. \subsubsection[{contains}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Range\+::contains (
  82. \begin{DoxyParamCaption}
  83. \item[{double}]{value}
  84. \end{DoxyParamCaption}
  85. ) const}\label{class_q_c_p_range_a030ce95b527c32e01414d0351347b46d}
  86. Returns true when {\itshape value} lies within or exactly on the borders of the range. \hypertarget{class_q_c_p_range_a0fa1bc8048be50d52bea93a8caf08305}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!expand@{expand}}
  87. \index{expand@{expand}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  88. \subsubsection[{expand}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Range\+::expand (
  89. \begin{DoxyParamCaption}
  90. \item[{const {\bf Q\+C\+P\+Range} \&}]{other\+Range}
  91. \end{DoxyParamCaption}
  92. )}\label{class_q_c_p_range_a0fa1bc8048be50d52bea93a8caf08305}
  93. Expands this range such that {\itshape other\+Range} is contained in the new range. It is assumed that both this range and {\itshape other\+Range} are normalized (see \hyperlink{class_q_c_p_range_af914a7740269b0604d0827c634a878a9}{normalize}).
  94. If {\itshape other\+Range} is already inside the current range, this function does nothing.
  95. \begin{DoxySeeAlso}{Ver también}
  96. \hyperlink{class_q_c_p_range_a6437bdf29a7ebc2c88a6045c4e622384}{expanded}
  97. \end{DoxySeeAlso}
  98. \hypertarget{class_q_c_p_range_a6437bdf29a7ebc2c88a6045c4e622384}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!expanded@{expanded}}
  99. \index{expanded@{expanded}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  100. \subsubsection[{expanded}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Range} Q\+C\+P\+Range\+::expanded (
  101. \begin{DoxyParamCaption}
  102. \item[{const {\bf Q\+C\+P\+Range} \&}]{other\+Range}
  103. \end{DoxyParamCaption}
  104. ) const}\label{class_q_c_p_range_a6437bdf29a7ebc2c88a6045c4e622384}
  105. Returns an expanded range that contains this and {\itshape other\+Range}. It is assumed that both this range and {\itshape other\+Range} are normalized (see \hyperlink{class_q_c_p_range_af914a7740269b0604d0827c634a878a9}{normalize}).
  106. \begin{DoxySeeAlso}{Ver también}
  107. \hyperlink{class_q_c_p_range_a0fa1bc8048be50d52bea93a8caf08305}{expand}
  108. \end{DoxySeeAlso}
  109. \hypertarget{class_q_c_p_range_af914a7740269b0604d0827c634a878a9}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!normalize@{normalize}}
  110. \index{normalize@{normalize}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  111. \subsubsection[{normalize}]{\setlength{\rightskip}{0pt plus 5cm}void Q\+C\+P\+Range\+::normalize (
  112. \begin{DoxyParamCaption}
  113. {}
  114. \end{DoxyParamCaption}
  115. )}\label{class_q_c_p_range_af914a7740269b0604d0827c634a878a9}
  116. Makes sure {\itshape lower} is numerically smaller than {\itshape upper}. If this is not the case, the values are swapped. \hypertarget{class_q_c_p_range_a1ff029704c29a75adbc1dc36cecaf44c}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!sanitized\+For\+Lin\+Scale@{sanitized\+For\+Lin\+Scale}}
  117. \index{sanitized\+For\+Lin\+Scale@{sanitized\+For\+Lin\+Scale}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  118. \subsubsection[{sanitized\+For\+Lin\+Scale}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Range} Q\+C\+P\+Range\+::sanitized\+For\+Lin\+Scale (
  119. \begin{DoxyParamCaption}
  120. {}
  121. \end{DoxyParamCaption}
  122. ) const}\label{class_q_c_p_range_a1ff029704c29a75adbc1dc36cecaf44c}
  123. Returns a sanitized version of the range. Sanitized means for linear scales, that {\itshape lower} will always be numerically smaller (or equal) to {\itshape upper}. \hypertarget{class_q_c_p_range_aaf6a9046e78d91eeb8e89584fe46b034}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!sanitized\+For\+Log\+Scale@{sanitized\+For\+Log\+Scale}}
  124. \index{sanitized\+For\+Log\+Scale@{sanitized\+For\+Log\+Scale}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  125. \subsubsection[{sanitized\+For\+Log\+Scale}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Q\+C\+P\+Range} Q\+C\+P\+Range\+::sanitized\+For\+Log\+Scale (
  126. \begin{DoxyParamCaption}
  127. {}
  128. \end{DoxyParamCaption}
  129. ) const}\label{class_q_c_p_range_aaf6a9046e78d91eeb8e89584fe46b034}
  130. Returns a sanitized version of the range. Sanitized means for logarithmic scales, that the range won\textquotesingle{}t span the positive and negative sign domain, i.\+e. contain zero. Further {\itshape lower} will always be numerically smaller (or equal) to {\itshape upper}.
  131. If the original range does span positive and negative sign domains or contains zero, the returned range will try to approximate the original range as good as possible. If the positive interval of the original range is wider than the negative interval, the returned range will only contain the positive interval, with lower bound set to {\itshape range\+Fac} or {\itshape range\+Fac} $\ast${\itshape upper}, whichever is closer to zero. Same procedure is used if the negative interval is wider than the positive interval, this time by changing the {\itshape upper} bound. \hypertarget{class_q_c_p_range_afa57c13049b965edb6fd1c00ac56338a}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!size@{size}}
  132. \index{size@{size}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  133. \subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}double Q\+C\+P\+Range\+::size (
  134. \begin{DoxyParamCaption}
  135. {}
  136. \end{DoxyParamCaption}
  137. ) const}\label{class_q_c_p_range_afa57c13049b965edb6fd1c00ac56338a}
  138. Returns the size of the range, i.\+e. {\itshape upper-\/{\itshape lower} } \hypertarget{class_q_c_p_range_ab38bd4841c77c7bb86c9eea0f142dcc0}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!valid\+Range@{valid\+Range}}
  139. \index{valid\+Range@{valid\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  140. \subsubsection[{valid\+Range}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Range\+::valid\+Range (
  141. \begin{DoxyParamCaption}
  142. \item[{double}]{lower, }
  143. \item[{double}]{upper}
  144. \end{DoxyParamCaption}
  145. )\hspace{0.3cm}{\ttfamily [static]}}\label{class_q_c_p_range_ab38bd4841c77c7bb86c9eea0f142dcc0}
  146. Checks, whether the specified range is within valid bounds, which are defined as \hyperlink{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}{Q\+C\+P\+Range\+::max\+Range} and \hyperlink{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}{Q\+C\+P\+Range\+::min\+Range}. A valid range means\+: \begin{DoxyItemize}
  147. \item range bounds within -\/max\+Range and max\+Range \item range size above min\+Range \item range size below max\+Range \end{DoxyItemize}
  148. \hypertarget{class_q_c_p_range_a801b964752eaad6219be9d8a651ec2b3}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!valid\+Range@{valid\+Range}}
  149. \index{valid\+Range@{valid\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  150. \subsubsection[{valid\+Range}]{\setlength{\rightskip}{0pt plus 5cm}bool Q\+C\+P\+Range\+::valid\+Range (
  151. \begin{DoxyParamCaption}
  152. \item[{const {\bf Q\+C\+P\+Range} \&}]{range}
  153. \end{DoxyParamCaption}
  154. )\hspace{0.3cm}{\ttfamily [static]}}\label{class_q_c_p_range_a801b964752eaad6219be9d8a651ec2b3}
  155. Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Checks, whether the specified range is within valid bounds, which are defined as \hyperlink{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}{Q\+C\+P\+Range\+::max\+Range} and \hyperlink{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}{Q\+C\+P\+Range\+::min\+Range}. A valid range means\+: \begin{DoxyItemize}
  156. \item range bounds within -\/max\+Range and max\+Range \item range size above min\+Range \item range size below max\+Range \end{DoxyItemize}
  157. \subsection{Documentación de los datos miembro}
  158. \hypertarget{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!max\+Range@{max\+Range}}
  159. \index{max\+Range@{max\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  160. \subsubsection[{max\+Range}]{\setlength{\rightskip}{0pt plus 5cm}const double Q\+C\+P\+Range\+::max\+Range = 1e250\hspace{0.3cm}{\ttfamily [static]}}\label{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}
  161. Maximum values (negative and positive) the range will accept in range-\/changing functions. Larger absolute values would cause errors due to the 11-\/bit exponent of double precision numbers, corresponding to a maximum magnitude of roughly 1e308. Since the number of planck-\/volumes in the entire visible universe is only $\sim$1e183, this should be enough. \begin{DoxySeeAlso}{Ver también}
  162. \hyperlink{class_q_c_p_range_ab38bd4841c77c7bb86c9eea0f142dcc0}{valid\+Range}, \hyperlink{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}{min\+Range}
  163. \end{DoxySeeAlso}
  164. \hypertarget{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}{}\index{Q\+C\+P\+Range@{Q\+C\+P\+Range}!min\+Range@{min\+Range}}
  165. \index{min\+Range@{min\+Range}!Q\+C\+P\+Range@{Q\+C\+P\+Range}}
  166. \subsubsection[{min\+Range}]{\setlength{\rightskip}{0pt plus 5cm}const double Q\+C\+P\+Range\+::min\+Range = 1e-\/280\hspace{0.3cm}{\ttfamily [static]}}\label{class_q_c_p_range_ab46d3bc95030ee25efda41b89e2b616b}
  167. Minimum range size ({\itshape upper} -\/ {\itshape lower}) the range changing functions will accept. Smaller intervals would cause errors due to the 11-\/bit exponent of double precision numbers, corresponding to a minimum magnitude of roughly 1e-\/308. \begin{DoxySeeAlso}{Ver también}
  168. \hyperlink{class_q_c_p_range_ab38bd4841c77c7bb86c9eea0f142dcc0}{valid\+Range}, \hyperlink{class_q_c_p_range_a5ca51e7a2dc5dc0d49527ab171fe1f4f}{max\+Range}
  169. \end{DoxySeeAlso}
  170. La documentación para esta clase fue generada a partir de los siguientes ficheros\+:\begin{DoxyCompactItemize}
  171. \item
  172. \hyperlink{qcustomplot_8h}{qcustomplot.\+h}\item
  173. \hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}\end{DoxyCompactItemize}