umappp 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (395) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +25 -0
  3. data/README.md +110 -0
  4. data/ext/umappp/extconf.rb +25 -0
  5. data/ext/umappp/numo.hpp +867 -0
  6. data/ext/umappp/umappp.cpp +225 -0
  7. data/lib/umappp/version.rb +5 -0
  8. data/lib/umappp.rb +41 -0
  9. data/vendor/Eigen/Cholesky +45 -0
  10. data/vendor/Eigen/CholmodSupport +48 -0
  11. data/vendor/Eigen/Core +384 -0
  12. data/vendor/Eigen/Dense +7 -0
  13. data/vendor/Eigen/Eigen +2 -0
  14. data/vendor/Eigen/Eigenvalues +60 -0
  15. data/vendor/Eigen/Geometry +59 -0
  16. data/vendor/Eigen/Householder +29 -0
  17. data/vendor/Eigen/IterativeLinearSolvers +48 -0
  18. data/vendor/Eigen/Jacobi +32 -0
  19. data/vendor/Eigen/KLUSupport +41 -0
  20. data/vendor/Eigen/LU +47 -0
  21. data/vendor/Eigen/MetisSupport +35 -0
  22. data/vendor/Eigen/OrderingMethods +70 -0
  23. data/vendor/Eigen/PaStiXSupport +49 -0
  24. data/vendor/Eigen/PardisoSupport +35 -0
  25. data/vendor/Eigen/QR +50 -0
  26. data/vendor/Eigen/QtAlignedMalloc +39 -0
  27. data/vendor/Eigen/SPQRSupport +34 -0
  28. data/vendor/Eigen/SVD +50 -0
  29. data/vendor/Eigen/Sparse +34 -0
  30. data/vendor/Eigen/SparseCholesky +37 -0
  31. data/vendor/Eigen/SparseCore +69 -0
  32. data/vendor/Eigen/SparseLU +50 -0
  33. data/vendor/Eigen/SparseQR +36 -0
  34. data/vendor/Eigen/StdDeque +27 -0
  35. data/vendor/Eigen/StdList +26 -0
  36. data/vendor/Eigen/StdVector +27 -0
  37. data/vendor/Eigen/SuperLUSupport +64 -0
  38. data/vendor/Eigen/UmfPackSupport +40 -0
  39. data/vendor/Eigen/src/Cholesky/LDLT.h +688 -0
  40. data/vendor/Eigen/src/Cholesky/LLT.h +558 -0
  41. data/vendor/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
  42. data/vendor/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
  43. data/vendor/Eigen/src/Core/ArithmeticSequence.h +413 -0
  44. data/vendor/Eigen/src/Core/Array.h +417 -0
  45. data/vendor/Eigen/src/Core/ArrayBase.h +226 -0
  46. data/vendor/Eigen/src/Core/ArrayWrapper.h +209 -0
  47. data/vendor/Eigen/src/Core/Assign.h +90 -0
  48. data/vendor/Eigen/src/Core/AssignEvaluator.h +1010 -0
  49. data/vendor/Eigen/src/Core/Assign_MKL.h +178 -0
  50. data/vendor/Eigen/src/Core/BandMatrix.h +353 -0
  51. data/vendor/Eigen/src/Core/Block.h +448 -0
  52. data/vendor/Eigen/src/Core/BooleanRedux.h +162 -0
  53. data/vendor/Eigen/src/Core/CommaInitializer.h +164 -0
  54. data/vendor/Eigen/src/Core/ConditionEstimator.h +175 -0
  55. data/vendor/Eigen/src/Core/CoreEvaluators.h +1741 -0
  56. data/vendor/Eigen/src/Core/CoreIterators.h +132 -0
  57. data/vendor/Eigen/src/Core/CwiseBinaryOp.h +183 -0
  58. data/vendor/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
  59. data/vendor/Eigen/src/Core/CwiseTernaryOp.h +197 -0
  60. data/vendor/Eigen/src/Core/CwiseUnaryOp.h +103 -0
  61. data/vendor/Eigen/src/Core/CwiseUnaryView.h +132 -0
  62. data/vendor/Eigen/src/Core/DenseBase.h +701 -0
  63. data/vendor/Eigen/src/Core/DenseCoeffsBase.h +685 -0
  64. data/vendor/Eigen/src/Core/DenseStorage.h +652 -0
  65. data/vendor/Eigen/src/Core/Diagonal.h +258 -0
  66. data/vendor/Eigen/src/Core/DiagonalMatrix.h +391 -0
  67. data/vendor/Eigen/src/Core/DiagonalProduct.h +28 -0
  68. data/vendor/Eigen/src/Core/Dot.h +318 -0
  69. data/vendor/Eigen/src/Core/EigenBase.h +160 -0
  70. data/vendor/Eigen/src/Core/ForceAlignedAccess.h +150 -0
  71. data/vendor/Eigen/src/Core/Fuzzy.h +155 -0
  72. data/vendor/Eigen/src/Core/GeneralProduct.h +465 -0
  73. data/vendor/Eigen/src/Core/GenericPacketMath.h +1040 -0
  74. data/vendor/Eigen/src/Core/GlobalFunctions.h +194 -0
  75. data/vendor/Eigen/src/Core/IO.h +258 -0
  76. data/vendor/Eigen/src/Core/IndexedView.h +237 -0
  77. data/vendor/Eigen/src/Core/Inverse.h +117 -0
  78. data/vendor/Eigen/src/Core/Map.h +171 -0
  79. data/vendor/Eigen/src/Core/MapBase.h +310 -0
  80. data/vendor/Eigen/src/Core/MathFunctions.h +2057 -0
  81. data/vendor/Eigen/src/Core/MathFunctionsImpl.h +200 -0
  82. data/vendor/Eigen/src/Core/Matrix.h +565 -0
  83. data/vendor/Eigen/src/Core/MatrixBase.h +547 -0
  84. data/vendor/Eigen/src/Core/NestByValue.h +85 -0
  85. data/vendor/Eigen/src/Core/NoAlias.h +109 -0
  86. data/vendor/Eigen/src/Core/NumTraits.h +335 -0
  87. data/vendor/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  88. data/vendor/Eigen/src/Core/PermutationMatrix.h +605 -0
  89. data/vendor/Eigen/src/Core/PlainObjectBase.h +1128 -0
  90. data/vendor/Eigen/src/Core/Product.h +191 -0
  91. data/vendor/Eigen/src/Core/ProductEvaluators.h +1179 -0
  92. data/vendor/Eigen/src/Core/Random.h +218 -0
  93. data/vendor/Eigen/src/Core/Redux.h +515 -0
  94. data/vendor/Eigen/src/Core/Ref.h +381 -0
  95. data/vendor/Eigen/src/Core/Replicate.h +142 -0
  96. data/vendor/Eigen/src/Core/Reshaped.h +454 -0
  97. data/vendor/Eigen/src/Core/ReturnByValue.h +119 -0
  98. data/vendor/Eigen/src/Core/Reverse.h +217 -0
  99. data/vendor/Eigen/src/Core/Select.h +164 -0
  100. data/vendor/Eigen/src/Core/SelfAdjointView.h +365 -0
  101. data/vendor/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
  102. data/vendor/Eigen/src/Core/Solve.h +188 -0
  103. data/vendor/Eigen/src/Core/SolveTriangular.h +235 -0
  104. data/vendor/Eigen/src/Core/SolverBase.h +168 -0
  105. data/vendor/Eigen/src/Core/StableNorm.h +251 -0
  106. data/vendor/Eigen/src/Core/StlIterators.h +463 -0
  107. data/vendor/Eigen/src/Core/Stride.h +116 -0
  108. data/vendor/Eigen/src/Core/Swap.h +68 -0
  109. data/vendor/Eigen/src/Core/Transpose.h +464 -0
  110. data/vendor/Eigen/src/Core/Transpositions.h +386 -0
  111. data/vendor/Eigen/src/Core/TriangularMatrix.h +1001 -0
  112. data/vendor/Eigen/src/Core/VectorBlock.h +96 -0
  113. data/vendor/Eigen/src/Core/VectorwiseOp.h +784 -0
  114. data/vendor/Eigen/src/Core/Visitor.h +381 -0
  115. data/vendor/Eigen/src/Core/arch/AVX/Complex.h +372 -0
  116. data/vendor/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
  117. data/vendor/Eigen/src/Core/arch/AVX/PacketMath.h +1574 -0
  118. data/vendor/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
  119. data/vendor/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  120. data/vendor/Eigen/src/Core/arch/AVX512/MathFunctions.h +362 -0
  121. data/vendor/Eigen/src/Core/arch/AVX512/PacketMath.h +2303 -0
  122. data/vendor/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  123. data/vendor/Eigen/src/Core/arch/AltiVec/Complex.h +417 -0
  124. data/vendor/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
  125. data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  126. data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  127. data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  128. data/vendor/Eigen/src/Core/arch/AltiVec/PacketMath.h +2711 -0
  129. data/vendor/Eigen/src/Core/arch/CUDA/Complex.h +258 -0
  130. data/vendor/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  131. data/vendor/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
  132. data/vendor/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  133. data/vendor/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  134. data/vendor/Eigen/src/Core/arch/Default/Half.h +942 -0
  135. data/vendor/Eigen/src/Core/arch/Default/Settings.h +49 -0
  136. data/vendor/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  137. data/vendor/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
  138. data/vendor/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  139. data/vendor/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  140. data/vendor/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  141. data/vendor/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  142. data/vendor/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  143. data/vendor/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  144. data/vendor/Eigen/src/Core/arch/NEON/Complex.h +584 -0
  145. data/vendor/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  146. data/vendor/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
  147. data/vendor/Eigen/src/Core/arch/NEON/PacketMath.h +4587 -0
  148. data/vendor/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  149. data/vendor/Eigen/src/Core/arch/SSE/Complex.h +351 -0
  150. data/vendor/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
  151. data/vendor/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
  152. data/vendor/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
  153. data/vendor/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  154. data/vendor/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  155. data/vendor/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  156. data/vendor/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  157. data/vendor/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  158. data/vendor/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  159. data/vendor/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  160. data/vendor/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  161. data/vendor/Eigen/src/Core/arch/ZVector/Complex.h +426 -0
  162. data/vendor/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
  163. data/vendor/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
  164. data/vendor/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
  165. data/vendor/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
  166. data/vendor/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
  167. data/vendor/Eigen/src/Core/functors/StlFunctors.h +166 -0
  168. data/vendor/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
  169. data/vendor/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
  170. data/vendor/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
  171. data/vendor/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
  172. data/vendor/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
  173. data/vendor/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
  174. data/vendor/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
  175. data/vendor/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
  176. data/vendor/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
  177. data/vendor/Eigen/src/Core/products/Parallelizer.h +180 -0
  178. data/vendor/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
  179. data/vendor/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
  180. data/vendor/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
  181. data/vendor/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
  182. data/vendor/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  183. data/vendor/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
  184. data/vendor/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
  185. data/vendor/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
  186. data/vendor/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
  187. data/vendor/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
  188. data/vendor/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
  189. data/vendor/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
  190. data/vendor/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
  191. data/vendor/Eigen/src/Core/util/BlasUtil.h +583 -0
  192. data/vendor/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  193. data/vendor/Eigen/src/Core/util/Constants.h +563 -0
  194. data/vendor/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
  195. data/vendor/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
  196. data/vendor/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  197. data/vendor/Eigen/src/Core/util/IntegralConstant.h +272 -0
  198. data/vendor/Eigen/src/Core/util/MKL_support.h +137 -0
  199. data/vendor/Eigen/src/Core/util/Macros.h +1464 -0
  200. data/vendor/Eigen/src/Core/util/Memory.h +1163 -0
  201. data/vendor/Eigen/src/Core/util/Meta.h +812 -0
  202. data/vendor/Eigen/src/Core/util/NonMPL2.h +3 -0
  203. data/vendor/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
  204. data/vendor/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  205. data/vendor/Eigen/src/Core/util/StaticAssert.h +221 -0
  206. data/vendor/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  207. data/vendor/Eigen/src/Core/util/XprHelper.h +856 -0
  208. data/vendor/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
  209. data/vendor/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
  210. data/vendor/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
  211. data/vendor/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
  212. data/vendor/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
  213. data/vendor/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
  214. data/vendor/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
  215. data/vendor/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
  216. data/vendor/Eigen/src/Eigenvalues/RealQZ.h +657 -0
  217. data/vendor/Eigen/src/Eigenvalues/RealSchur.h +558 -0
  218. data/vendor/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
  219. data/vendor/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
  220. data/vendor/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
  221. data/vendor/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
  222. data/vendor/Eigen/src/Geometry/AlignedBox.h +486 -0
  223. data/vendor/Eigen/src/Geometry/AngleAxis.h +247 -0
  224. data/vendor/Eigen/src/Geometry/EulerAngles.h +114 -0
  225. data/vendor/Eigen/src/Geometry/Homogeneous.h +501 -0
  226. data/vendor/Eigen/src/Geometry/Hyperplane.h +282 -0
  227. data/vendor/Eigen/src/Geometry/OrthoMethods.h +235 -0
  228. data/vendor/Eigen/src/Geometry/ParametrizedLine.h +232 -0
  229. data/vendor/Eigen/src/Geometry/Quaternion.h +870 -0
  230. data/vendor/Eigen/src/Geometry/Rotation2D.h +199 -0
  231. data/vendor/Eigen/src/Geometry/RotationBase.h +206 -0
  232. data/vendor/Eigen/src/Geometry/Scaling.h +188 -0
  233. data/vendor/Eigen/src/Geometry/Transform.h +1563 -0
  234. data/vendor/Eigen/src/Geometry/Translation.h +202 -0
  235. data/vendor/Eigen/src/Geometry/Umeyama.h +166 -0
  236. data/vendor/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  237. data/vendor/Eigen/src/Householder/BlockHouseholder.h +110 -0
  238. data/vendor/Eigen/src/Householder/Householder.h +176 -0
  239. data/vendor/Eigen/src/Householder/HouseholderSequence.h +545 -0
  240. data/vendor/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
  241. data/vendor/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
  242. data/vendor/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
  243. data/vendor/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
  244. data/vendor/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
  245. data/vendor/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
  246. data/vendor/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
  247. data/vendor/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
  248. data/vendor/Eigen/src/Jacobi/Jacobi.h +483 -0
  249. data/vendor/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  250. data/vendor/Eigen/src/LU/Determinant.h +117 -0
  251. data/vendor/Eigen/src/LU/FullPivLU.h +877 -0
  252. data/vendor/Eigen/src/LU/InverseImpl.h +432 -0
  253. data/vendor/Eigen/src/LU/PartialPivLU.h +624 -0
  254. data/vendor/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
  255. data/vendor/Eigen/src/LU/arch/InverseSize4.h +351 -0
  256. data/vendor/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  257. data/vendor/Eigen/src/OrderingMethods/Amd.h +435 -0
  258. data/vendor/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
  259. data/vendor/Eigen/src/OrderingMethods/Ordering.h +153 -0
  260. data/vendor/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
  261. data/vendor/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
  262. data/vendor/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
  263. data/vendor/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
  264. data/vendor/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
  265. data/vendor/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
  266. data/vendor/Eigen/src/QR/HouseholderQR.h +434 -0
  267. data/vendor/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
  268. data/vendor/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
  269. data/vendor/Eigen/src/SVD/BDCSVD.h +1366 -0
  270. data/vendor/Eigen/src/SVD/JacobiSVD.h +812 -0
  271. data/vendor/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
  272. data/vendor/Eigen/src/SVD/SVDBase.h +376 -0
  273. data/vendor/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
  274. data/vendor/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
  275. data/vendor/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
  276. data/vendor/Eigen/src/SparseCore/AmbiVector.h +378 -0
  277. data/vendor/Eigen/src/SparseCore/CompressedStorage.h +274 -0
  278. data/vendor/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
  279. data/vendor/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
  280. data/vendor/Eigen/src/SparseCore/SparseAssign.h +270 -0
  281. data/vendor/Eigen/src/SparseCore/SparseBlock.h +571 -0
  282. data/vendor/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  283. data/vendor/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
  284. data/vendor/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
  285. data/vendor/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
  286. data/vendor/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
  287. data/vendor/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  288. data/vendor/Eigen/src/SparseCore/SparseDot.h +98 -0
  289. data/vendor/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
  290. data/vendor/Eigen/src/SparseCore/SparseMap.h +305 -0
  291. data/vendor/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
  292. data/vendor/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
  293. data/vendor/Eigen/src/SparseCore/SparsePermutation.h +178 -0
  294. data/vendor/Eigen/src/SparseCore/SparseProduct.h +181 -0
  295. data/vendor/Eigen/src/SparseCore/SparseRedux.h +49 -0
  296. data/vendor/Eigen/src/SparseCore/SparseRef.h +397 -0
  297. data/vendor/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
  298. data/vendor/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
  299. data/vendor/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
  300. data/vendor/Eigen/src/SparseCore/SparseTranspose.h +92 -0
  301. data/vendor/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
  302. data/vendor/Eigen/src/SparseCore/SparseUtil.h +186 -0
  303. data/vendor/Eigen/src/SparseCore/SparseVector.h +478 -0
  304. data/vendor/Eigen/src/SparseCore/SparseView.h +254 -0
  305. data/vendor/Eigen/src/SparseCore/TriangularSolver.h +315 -0
  306. data/vendor/Eigen/src/SparseLU/SparseLU.h +923 -0
  307. data/vendor/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  308. data/vendor/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
  309. data/vendor/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
  310. data/vendor/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
  311. data/vendor/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  312. data/vendor/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
  313. data/vendor/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
  314. data/vendor/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
  315. data/vendor/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
  316. data/vendor/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
  317. data/vendor/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
  318. data/vendor/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
  319. data/vendor/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  320. data/vendor/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  321. data/vendor/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
  322. data/vendor/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  323. data/vendor/Eigen/src/SparseQR/SparseQR.h +758 -0
  324. data/vendor/Eigen/src/StlSupport/StdDeque.h +116 -0
  325. data/vendor/Eigen/src/StlSupport/StdList.h +106 -0
  326. data/vendor/Eigen/src/StlSupport/StdVector.h +131 -0
  327. data/vendor/Eigen/src/StlSupport/details.h +84 -0
  328. data/vendor/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
  329. data/vendor/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
  330. data/vendor/Eigen/src/misc/Image.h +82 -0
  331. data/vendor/Eigen/src/misc/Kernel.h +79 -0
  332. data/vendor/Eigen/src/misc/RealSvd2x2.h +55 -0
  333. data/vendor/Eigen/src/misc/blas.h +440 -0
  334. data/vendor/Eigen/src/misc/lapack.h +152 -0
  335. data/vendor/Eigen/src/misc/lapacke.h +16292 -0
  336. data/vendor/Eigen/src/misc/lapacke_mangling.h +17 -0
  337. data/vendor/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
  338. data/vendor/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
  339. data/vendor/Eigen/src/plugins/BlockMethods.h +1442 -0
  340. data/vendor/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
  341. data/vendor/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
  342. data/vendor/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  343. data/vendor/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
  344. data/vendor/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
  345. data/vendor/Eigen/src/plugins/ReshapedMethods.h +149 -0
  346. data/vendor/aarand/aarand.hpp +114 -0
  347. data/vendor/annoy/annoylib.h +1495 -0
  348. data/vendor/annoy/kissrandom.h +120 -0
  349. data/vendor/annoy/mman.h +242 -0
  350. data/vendor/hnswlib/bruteforce.h +152 -0
  351. data/vendor/hnswlib/hnswalg.h +1192 -0
  352. data/vendor/hnswlib/hnswlib.h +108 -0
  353. data/vendor/hnswlib/space_ip.h +282 -0
  354. data/vendor/hnswlib/space_l2.h +281 -0
  355. data/vendor/hnswlib/visited_list_pool.h +79 -0
  356. data/vendor/irlba/irlba.hpp +575 -0
  357. data/vendor/irlba/lanczos.hpp +212 -0
  358. data/vendor/irlba/parallel.hpp +474 -0
  359. data/vendor/irlba/utils.hpp +224 -0
  360. data/vendor/irlba/wrappers.hpp +228 -0
  361. data/vendor/kmeans/Base.hpp +75 -0
  362. data/vendor/kmeans/Details.hpp +79 -0
  363. data/vendor/kmeans/HartiganWong.hpp +492 -0
  364. data/vendor/kmeans/InitializeKmeansPP.hpp +144 -0
  365. data/vendor/kmeans/InitializeNone.hpp +44 -0
  366. data/vendor/kmeans/InitializePCAPartition.hpp +309 -0
  367. data/vendor/kmeans/InitializeRandom.hpp +91 -0
  368. data/vendor/kmeans/Kmeans.hpp +161 -0
  369. data/vendor/kmeans/Lloyd.hpp +134 -0
  370. data/vendor/kmeans/MiniBatch.hpp +269 -0
  371. data/vendor/kmeans/QuickSearch.hpp +179 -0
  372. data/vendor/kmeans/compute_centroids.hpp +32 -0
  373. data/vendor/kmeans/compute_wcss.hpp +27 -0
  374. data/vendor/kmeans/is_edge_case.hpp +42 -0
  375. data/vendor/kmeans/random.hpp +55 -0
  376. data/vendor/knncolle/Annoy/Annoy.hpp +193 -0
  377. data/vendor/knncolle/BruteForce/BruteForce.hpp +120 -0
  378. data/vendor/knncolle/Hnsw/Hnsw.hpp +225 -0
  379. data/vendor/knncolle/Kmknn/Kmknn.hpp +286 -0
  380. data/vendor/knncolle/VpTree/VpTree.hpp +256 -0
  381. data/vendor/knncolle/knncolle.hpp +34 -0
  382. data/vendor/knncolle/utils/Base.hpp +100 -0
  383. data/vendor/knncolle/utils/NeighborQueue.hpp +94 -0
  384. data/vendor/knncolle/utils/distances.hpp +98 -0
  385. data/vendor/knncolle/utils/find_nearest_neighbors.hpp +112 -0
  386. data/vendor/powerit/PowerIterations.hpp +157 -0
  387. data/vendor/umappp/NeighborList.hpp +37 -0
  388. data/vendor/umappp/Umap.hpp +662 -0
  389. data/vendor/umappp/combine_neighbor_sets.hpp +95 -0
  390. data/vendor/umappp/find_ab.hpp +157 -0
  391. data/vendor/umappp/neighbor_similarities.hpp +136 -0
  392. data/vendor/umappp/optimize_layout.hpp +285 -0
  393. data/vendor/umappp/spectral_init.hpp +181 -0
  394. data/vendor/umappp/umappp.hpp +13 -0
  395. metadata +465 -0
@@ -0,0 +1,1442 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5
+ // Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
6
+ //
7
+ // This Source Code Form is subject to the terms of the Mozilla
8
+ // Public License v. 2.0. If a copy of the MPL was not distributed
9
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
+
11
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
12
+
13
+ /// \internal expression type of a column */
14
+ typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
15
+ typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
16
+ /// \internal expression type of a row */
17
+ typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
18
+ typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
19
+ /// \internal expression type of a block of whole columns */
20
+ typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;
21
+ typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;
22
+ /// \internal expression type of a block of whole rows */
23
+ typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
24
+ typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
25
+ /// \internal expression type of a block of whole columns */
26
+ template<int N> struct NColsBlockXpr { typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
27
+ template<int N> struct ConstNColsBlockXpr { typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
28
+ /// \internal expression type of a block of whole rows */
29
+ template<int N> struct NRowsBlockXpr { typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
30
+ template<int N> struct ConstNRowsBlockXpr { typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
31
+ /// \internal expression of a block */
32
+ typedef Block<Derived> BlockXpr;
33
+ typedef const Block<const Derived> ConstBlockXpr;
34
+ /// \internal expression of a block of fixed sizes */
35
+ template<int Rows, int Cols> struct FixedBlockXpr { typedef Block<Derived,Rows,Cols> Type; };
36
+ template<int Rows, int Cols> struct ConstFixedBlockXpr { typedef Block<const Derived,Rows,Cols> Type; };
37
+
38
+ typedef VectorBlock<Derived> SegmentReturnType;
39
+ typedef const VectorBlock<const Derived> ConstSegmentReturnType;
40
+ template<int Size> struct FixedSegmentReturnType { typedef VectorBlock<Derived, Size> Type; };
41
+ template<int Size> struct ConstFixedSegmentReturnType { typedef const VectorBlock<const Derived, Size> Type; };
42
+
43
+ /// \internal inner-vector
44
+ typedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> InnerVectorReturnType;
45
+ typedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> ConstInnerVectorReturnType;
46
+
47
+ /// \internal set of inner-vectors
48
+ typedef Block<Derived,Dynamic,Dynamic,true> InnerVectorsReturnType;
49
+ typedef Block<const Derived,Dynamic,Dynamic,true> ConstInnerVectorsReturnType;
50
+
51
+ #endif // not EIGEN_PARSED_BY_DOXYGEN
52
+
53
+ /// \returns an expression of a block in \c *this with either dynamic or fixed sizes.
54
+ ///
55
+ /// \param startRow the first row in the block
56
+ /// \param startCol the first column in the block
57
+ /// \param blockRows number of rows in the block, specified at either run-time or compile-time
58
+ /// \param blockCols number of columns in the block, specified at either run-time or compile-time
59
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
60
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
61
+ ///
62
+ /// Example using runtime (aka dynamic) sizes: \include MatrixBase_block_int_int_int_int.cpp
63
+ /// Output: \verbinclude MatrixBase_block_int_int_int_int.out
64
+ ///
65
+ /// \newin{3.4}:
66
+ ///
67
+ /// The number of rows \a blockRows and columns \a blockCols can also be specified at compile-time by passing Eigen::fix<N>,
68
+ /// or Eigen::fix<N>(n) as arguments. In the later case, \c n plays the role of a runtime fallback value in case \c N equals Eigen::Dynamic.
69
+ /// Here is an example with a fixed number of rows \c NRows and dynamic number of columns \c cols:
70
+ /// \code
71
+ /// mat.block(i,j,fix<NRows>,cols)
72
+ /// \endcode
73
+ ///
74
+ /// This function thus fully covers the features offered by the following overloads block<NRows,NCols>(Index, Index),
75
+ /// and block<NRows,NCols>(Index, Index, Index, Index) that are thus obsolete. Indeed, this generic version avoids
76
+ /// redundancy, it preserves the argument order, and prevents the need to rely on the template keyword in templated code.
77
+ ///
78
+ /// but with less redundancy and more consistency as it does not modify the argument order
79
+ /// and seamlessly enable hybrid fixed/dynamic sizes.
80
+ ///
81
+ /// \note Even in the case that the returned expression has dynamic size, in the case
82
+ /// when it is applied to a fixed-size matrix, it inherits a fixed maximal size,
83
+ /// which means that evaluating it does not cause a dynamic memory allocation.
84
+ ///
85
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
86
+ ///
87
+ /// \sa class Block, fix, fix<N>(int)
88
+ ///
89
+ template<typename NRowsType, typename NColsType>
90
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
91
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
92
+ typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
93
+ #else
94
+ typename FixedBlockXpr<...,...>::Type
95
+ #endif
96
+ block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
97
+ {
98
+ return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type(
99
+ derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));
100
+ }
101
+
102
+ /// This is the const version of block(Index,Index,NRowsType,NColsType)
103
+ template<typename NRowsType, typename NColsType>
104
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
105
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
106
+ const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
107
+ #else
108
+ const typename ConstFixedBlockXpr<...,...>::Type
109
+ #endif
110
+ block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) const
111
+ {
112
+ return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type(
113
+ derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));
114
+ }
115
+
116
+
117
+
118
+ /// \returns a expression of a top-right corner of \c *this with either dynamic or fixed sizes.
119
+ ///
120
+ /// \param cRows the number of rows in the corner
121
+ /// \param cCols the number of columns in the corner
122
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
123
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
124
+ ///
125
+ /// Example with dynamic sizes: \include MatrixBase_topRightCorner_int_int.cpp
126
+ /// Output: \verbinclude MatrixBase_topRightCorner_int_int.out
127
+ ///
128
+ /// The number of rows \a blockRows and columns \a blockCols can also be specified at compile-time by passing Eigen::fix<N>,
129
+ /// or Eigen::fix<N>(n) as arguments. See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
130
+ ///
131
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
132
+ ///
133
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
134
+ ///
135
+ template<typename NRowsType, typename NColsType>
136
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
137
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
138
+ typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
139
+ #else
140
+ typename FixedBlockXpr<...,...>::Type
141
+ #endif
142
+ topRightCorner(NRowsType cRows, NColsType cCols)
143
+ {
144
+ return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
145
+ (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
146
+ }
147
+
148
+ /// This is the const version of topRightCorner(NRowsType, NColsType).
149
+ template<typename NRowsType, typename NColsType>
150
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
151
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
152
+ const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
153
+ #else
154
+ const typename ConstFixedBlockXpr<...,...>::Type
155
+ #endif
156
+ topRightCorner(NRowsType cRows, NColsType cCols) const
157
+ {
158
+ return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
159
+ (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
160
+ }
161
+
162
+ /// \returns an expression of a fixed-size top-right corner of \c *this.
163
+ ///
164
+ /// \tparam CRows the number of rows in the corner
165
+ /// \tparam CCols the number of columns in the corner
166
+ ///
167
+ /// Example: \include MatrixBase_template_int_int_topRightCorner.cpp
168
+ /// Output: \verbinclude MatrixBase_template_int_int_topRightCorner.out
169
+ ///
170
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
171
+ ///
172
+ /// \sa class Block, block<int,int>(Index,Index)
173
+ ///
174
+ template<int CRows, int CCols>
175
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
176
+ typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
177
+ {
178
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
179
+ }
180
+
181
+ /// This is the const version of topRightCorner<int, int>().
182
+ template<int CRows, int CCols>
183
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
184
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner() const
185
+ {
186
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
187
+ }
188
+
189
+ /// \returns an expression of a top-right corner of \c *this.
190
+ ///
191
+ /// \tparam CRows number of rows in corner as specified at compile-time
192
+ /// \tparam CCols number of columns in corner as specified at compile-time
193
+ /// \param cRows number of rows in corner as specified at run-time
194
+ /// \param cCols number of columns in corner as specified at run-time
195
+ ///
196
+ /// This function is mainly useful for corners where the number of rows is specified at compile-time
197
+ /// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
198
+ /// information should not contradict. In other words, \a cRows should equal \a CRows unless
199
+ /// \a CRows is \a Dynamic, and the same for the number of columns.
200
+ ///
201
+ /// Example: \include MatrixBase_template_int_int_topRightCorner_int_int.cpp
202
+ /// Output: \verbinclude MatrixBase_template_int_int_topRightCorner_int_int.out
203
+ ///
204
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
205
+ ///
206
+ /// \sa class Block
207
+ ///
208
+ template<int CRows, int CCols>
209
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
210
+ typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
211
+ {
212
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
213
+ }
214
+
215
+ /// This is the const version of topRightCorner<int, int>(Index, Index).
216
+ template<int CRows, int CCols>
217
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
218
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) const
219
+ {
220
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
221
+ }
222
+
223
+
224
+
225
+ /// \returns an expression of a top-left corner of \c *this with either dynamic or fixed sizes.
226
+ ///
227
+ /// \param cRows the number of rows in the corner
228
+ /// \param cCols the number of columns in the corner
229
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
230
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
231
+ ///
232
+ /// Example: \include MatrixBase_topLeftCorner_int_int.cpp
233
+ /// Output: \verbinclude MatrixBase_topLeftCorner_int_int.out
234
+ ///
235
+ /// The number of rows \a blockRows and columns \a blockCols can also be specified at compile-time by passing Eigen::fix<N>,
236
+ /// or Eigen::fix<N>(n) as arguments. See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
237
+ ///
238
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
239
+ ///
240
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
241
+ ///
242
+ template<typename NRowsType, typename NColsType>
243
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
244
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
245
+ typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
246
+ #else
247
+ typename FixedBlockXpr<...,...>::Type
248
+ #endif
249
+ topLeftCorner(NRowsType cRows, NColsType cCols)
250
+ {
251
+ return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
252
+ (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
253
+ }
254
+
255
+ /// This is the const version of topLeftCorner(Index, Index).
256
+ template<typename NRowsType, typename NColsType>
257
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
258
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
259
+ const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
260
+ #else
261
+ const typename ConstFixedBlockXpr<...,...>::Type
262
+ #endif
263
+ topLeftCorner(NRowsType cRows, NColsType cCols) const
264
+ {
265
+ return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
266
+ (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
267
+ }
268
+
269
+ /// \returns an expression of a fixed-size top-left corner of \c *this.
270
+ ///
271
+ /// The template parameters CRows and CCols are the number of rows and columns in the corner.
272
+ ///
273
+ /// Example: \include MatrixBase_template_int_int_topLeftCorner.cpp
274
+ /// Output: \verbinclude MatrixBase_template_int_int_topLeftCorner.out
275
+ ///
276
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
277
+ ///
278
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
279
+ ///
280
+ template<int CRows, int CCols>
281
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
282
+ typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
283
+ {
284
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
285
+ }
286
+
287
+ /// This is the const version of topLeftCorner<int, int>().
288
+ template<int CRows, int CCols>
289
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
290
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner() const
291
+ {
292
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
293
+ }
294
+
295
+ /// \returns an expression of a top-left corner of \c *this.
296
+ ///
297
+ /// \tparam CRows number of rows in corner as specified at compile-time
298
+ /// \tparam CCols number of columns in corner as specified at compile-time
299
+ /// \param cRows number of rows in corner as specified at run-time
300
+ /// \param cCols number of columns in corner as specified at run-time
301
+ ///
302
+ /// This function is mainly useful for corners where the number of rows is specified at compile-time
303
+ /// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
304
+ /// information should not contradict. In other words, \a cRows should equal \a CRows unless
305
+ /// \a CRows is \a Dynamic, and the same for the number of columns.
306
+ ///
307
+ /// Example: \include MatrixBase_template_int_int_topLeftCorner_int_int.cpp
308
+ /// Output: \verbinclude MatrixBase_template_int_int_topLeftCorner_int_int.out
309
+ ///
310
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
311
+ ///
312
+ /// \sa class Block
313
+ ///
314
+ template<int CRows, int CCols>
315
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
316
+ typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
317
+ {
318
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
319
+ }
320
+
321
+ /// This is the const version of topLeftCorner<int, int>(Index, Index).
322
+ template<int CRows, int CCols>
323
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
324
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) const
325
+ {
326
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
327
+ }
328
+
329
+
330
+
331
+ /// \returns an expression of a bottom-right corner of \c *this with either dynamic or fixed sizes.
332
+ ///
333
+ /// \param cRows the number of rows in the corner
334
+ /// \param cCols the number of columns in the corner
335
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
336
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
337
+ ///
338
+ /// Example: \include MatrixBase_bottomRightCorner_int_int.cpp
339
+ /// Output: \verbinclude MatrixBase_bottomRightCorner_int_int.out
340
+ ///
341
+ /// The number of rows \a blockRows and columns \a blockCols can also be specified at compile-time by passing Eigen::fix<N>,
342
+ /// or Eigen::fix<N>(n) as arguments. See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
343
+ ///
344
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
345
+ ///
346
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
347
+ ///
348
+ template<typename NRowsType, typename NColsType>
349
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
350
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
351
+ typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
352
+ #else
353
+ typename FixedBlockXpr<...,...>::Type
354
+ #endif
355
+ bottomRightCorner(NRowsType cRows, NColsType cCols)
356
+ {
357
+ return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
358
+ (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
359
+ internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
360
+ }
361
+
362
+ /// This is the const version of bottomRightCorner(NRowsType, NColsType).
363
+ template<typename NRowsType, typename NColsType>
364
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
365
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
366
+ const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
367
+ #else
368
+ const typename ConstFixedBlockXpr<...,...>::Type
369
+ #endif
370
+ bottomRightCorner(NRowsType cRows, NColsType cCols) const
371
+ {
372
+ return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
373
+ (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),
374
+ internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
375
+ }
376
+
377
+ /// \returns an expression of a fixed-size bottom-right corner of \c *this.
378
+ ///
379
+ /// The template parameters CRows and CCols are the number of rows and columns in the corner.
380
+ ///
381
+ /// Example: \include MatrixBase_template_int_int_bottomRightCorner.cpp
382
+ /// Output: \verbinclude MatrixBase_template_int_int_bottomRightCorner.out
383
+ ///
384
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
385
+ ///
386
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
387
+ ///
388
+ template<int CRows, int CCols>
389
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
390
+ typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
391
+ {
392
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
393
+ }
394
+
395
+ /// This is the const version of bottomRightCorner<int, int>().
396
+ template<int CRows, int CCols>
397
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
398
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner() const
399
+ {
400
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
401
+ }
402
+
403
+ /// \returns an expression of a bottom-right corner of \c *this.
404
+ ///
405
+ /// \tparam CRows number of rows in corner as specified at compile-time
406
+ /// \tparam CCols number of columns in corner as specified at compile-time
407
+ /// \param cRows number of rows in corner as specified at run-time
408
+ /// \param cCols number of columns in corner as specified at run-time
409
+ ///
410
+ /// This function is mainly useful for corners where the number of rows is specified at compile-time
411
+ /// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
412
+ /// information should not contradict. In other words, \a cRows should equal \a CRows unless
413
+ /// \a CRows is \a Dynamic, and the same for the number of columns.
414
+ ///
415
+ /// Example: \include MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
416
+ /// Output: \verbinclude MatrixBase_template_int_int_bottomRightCorner_int_int.out
417
+ ///
418
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
419
+ ///
420
+ /// \sa class Block
421
+ ///
422
+ template<int CRows, int CCols>
423
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
424
+ typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
425
+ {
426
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
427
+ }
428
+
429
+ /// This is the const version of bottomRightCorner<int, int>(Index, Index).
430
+ template<int CRows, int CCols>
431
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
432
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) const
433
+ {
434
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
435
+ }
436
+
437
+
438
+
439
+ /// \returns an expression of a bottom-left corner of \c *this with either dynamic or fixed sizes.
440
+ ///
441
+ /// \param cRows the number of rows in the corner
442
+ /// \param cCols the number of columns in the corner
443
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
444
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
445
+ ///
446
+ /// Example: \include MatrixBase_bottomLeftCorner_int_int.cpp
447
+ /// Output: \verbinclude MatrixBase_bottomLeftCorner_int_int.out
448
+ ///
449
+ /// The number of rows \a blockRows and columns \a blockCols can also be specified at compile-time by passing Eigen::fix<N>,
450
+ /// or Eigen::fix<N>(n) as arguments. See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
451
+ ///
452
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
453
+ ///
454
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
455
+ ///
456
+ template<typename NRowsType, typename NColsType>
457
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
458
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
459
+ typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
460
+ #else
461
+ typename FixedBlockXpr<...,...>::Type
462
+ #endif
463
+ bottomLeftCorner(NRowsType cRows, NColsType cCols)
464
+ {
465
+ return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
466
+ (derived(), rows() - internal::get_runtime_value(cRows), 0,
467
+ internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
468
+ }
469
+
470
+ /// This is the const version of bottomLeftCorner(NRowsType, NColsType).
471
+ template<typename NRowsType, typename NColsType>
472
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
473
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
474
+ typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
475
+ #else
476
+ typename ConstFixedBlockXpr<...,...>::Type
477
+ #endif
478
+ bottomLeftCorner(NRowsType cRows, NColsType cCols) const
479
+ {
480
+ return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
481
+ (derived(), rows() - internal::get_runtime_value(cRows), 0,
482
+ internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));
483
+ }
484
+
485
+ /// \returns an expression of a fixed-size bottom-left corner of \c *this.
486
+ ///
487
+ /// The template parameters CRows and CCols are the number of rows and columns in the corner.
488
+ ///
489
+ /// Example: \include MatrixBase_template_int_int_bottomLeftCorner.cpp
490
+ /// Output: \verbinclude MatrixBase_template_int_int_bottomLeftCorner.out
491
+ ///
492
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
493
+ ///
494
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
495
+ ///
496
+ template<int CRows, int CCols>
497
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
498
+ typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
499
+ {
500
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
501
+ }
502
+
503
+ /// This is the const version of bottomLeftCorner<int, int>().
504
+ template<int CRows, int CCols>
505
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
506
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() const
507
+ {
508
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
509
+ }
510
+
511
+ /// \returns an expression of a bottom-left corner of \c *this.
512
+ ///
513
+ /// \tparam CRows number of rows in corner as specified at compile-time
514
+ /// \tparam CCols number of columns in corner as specified at compile-time
515
+ /// \param cRows number of rows in corner as specified at run-time
516
+ /// \param cCols number of columns in corner as specified at run-time
517
+ ///
518
+ /// This function is mainly useful for corners where the number of rows is specified at compile-time
519
+ /// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
520
+ /// information should not contradict. In other words, \a cRows should equal \a CRows unless
521
+ /// \a CRows is \a Dynamic, and the same for the number of columns.
522
+ ///
523
+ /// Example: \include MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
524
+ /// Output: \verbinclude MatrixBase_template_int_int_bottomLeftCorner_int_int.out
525
+ ///
526
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
527
+ ///
528
+ /// \sa class Block
529
+ ///
530
+ template<int CRows, int CCols>
531
+ EIGEN_STRONG_INLINE
532
+ typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
533
+ {
534
+ return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
535
+ }
536
+
537
+ /// This is the const version of bottomLeftCorner<int, int>(Index, Index).
538
+ template<int CRows, int CCols>
539
+ EIGEN_STRONG_INLINE
540
+ const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) const
541
+ {
542
+ return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
543
+ }
544
+
545
+
546
+
547
+ /// \returns a block consisting of the top rows of \c *this.
548
+ ///
549
+ /// \param n the number of rows in the block
550
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
551
+ ///
552
+ /// Example: \include MatrixBase_topRows_int.cpp
553
+ /// Output: \verbinclude MatrixBase_topRows_int.out
554
+ ///
555
+ /// The number of rows \a n can also be specified at compile-time by passing Eigen::fix<N>,
556
+ /// or Eigen::fix<N>(n) as arguments.
557
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
558
+ ///
559
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
560
+ ///
561
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
562
+ ///
563
+ template<typename NRowsType>
564
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
565
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
566
+ typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
567
+ #else
568
+ typename NRowsBlockXpr<...>::Type
569
+ #endif
570
+ topRows(NRowsType n)
571
+ {
572
+ return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
573
+ (derived(), 0, 0, internal::get_runtime_value(n), cols());
574
+ }
575
+
576
+ /// This is the const version of topRows(NRowsType).
577
+ template<typename NRowsType>
578
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
579
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
580
+ const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
581
+ #else
582
+ const typename ConstNRowsBlockXpr<...>::Type
583
+ #endif
584
+ topRows(NRowsType n) const
585
+ {
586
+ return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
587
+ (derived(), 0, 0, internal::get_runtime_value(n), cols());
588
+ }
589
+
590
+ /// \returns a block consisting of the top rows of \c *this.
591
+ ///
592
+ /// \tparam N the number of rows in the block as specified at compile-time
593
+ /// \param n the number of rows in the block as specified at run-time
594
+ ///
595
+ /// The compile-time and run-time information should not contradict. In other words,
596
+ /// \a n should equal \a N unless \a N is \a Dynamic.
597
+ ///
598
+ /// Example: \include MatrixBase_template_int_topRows.cpp
599
+ /// Output: \verbinclude MatrixBase_template_int_topRows.out
600
+ ///
601
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
602
+ ///
603
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
604
+ ///
605
+ template<int N>
606
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
607
+ typename NRowsBlockXpr<N>::Type topRows(Index n = N)
608
+ {
609
+ return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
610
+ }
611
+
612
+ /// This is the const version of topRows<int>().
613
+ template<int N>
614
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
615
+ typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const
616
+ {
617
+ return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
618
+ }
619
+
620
+
621
+
622
+ /// \returns a block consisting of the bottom rows of \c *this.
623
+ ///
624
+ /// \param n the number of rows in the block
625
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
626
+ ///
627
+ /// Example: \include MatrixBase_bottomRows_int.cpp
628
+ /// Output: \verbinclude MatrixBase_bottomRows_int.out
629
+ ///
630
+ /// The number of rows \a n can also be specified at compile-time by passing Eigen::fix<N>,
631
+ /// or Eigen::fix<N>(n) as arguments.
632
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
633
+ ///
634
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
635
+ ///
636
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
637
+ ///
638
+ template<typename NRowsType>
639
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
640
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
641
+ typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
642
+ #else
643
+ typename NRowsBlockXpr<...>::Type
644
+ #endif
645
+ bottomRows(NRowsType n)
646
+ {
647
+ return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
648
+ (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
649
+ }
650
+
651
+ /// This is the const version of bottomRows(NRowsType).
652
+ template<typename NRowsType>
653
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
654
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
655
+ const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
656
+ #else
657
+ const typename ConstNRowsBlockXpr<...>::Type
658
+ #endif
659
+ bottomRows(NRowsType n) const
660
+ {
661
+ return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
662
+ (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());
663
+ }
664
+
665
+ /// \returns a block consisting of the bottom rows of \c *this.
666
+ ///
667
+ /// \tparam N the number of rows in the block as specified at compile-time
668
+ /// \param n the number of rows in the block as specified at run-time
669
+ ///
670
+ /// The compile-time and run-time information should not contradict. In other words,
671
+ /// \a n should equal \a N unless \a N is \a Dynamic.
672
+ ///
673
+ /// Example: \include MatrixBase_template_int_bottomRows.cpp
674
+ /// Output: \verbinclude MatrixBase_template_int_bottomRows.out
675
+ ///
676
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
677
+ ///
678
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
679
+ ///
680
+ template<int N>
681
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
682
+ typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
683
+ {
684
+ return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
685
+ }
686
+
687
+ /// This is the const version of bottomRows<int>().
688
+ template<int N>
689
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
690
+ typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const
691
+ {
692
+ return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
693
+ }
694
+
695
+
696
+
697
+ /// \returns a block consisting of a range of rows of \c *this.
698
+ ///
699
+ /// \param startRow the index of the first row in the block
700
+ /// \param n the number of rows in the block
701
+ /// \tparam NRowsType the type of the value handling the number of rows in the block, typically Index.
702
+ ///
703
+ /// Example: \include DenseBase_middleRows_int.cpp
704
+ /// Output: \verbinclude DenseBase_middleRows_int.out
705
+ ///
706
+ /// The number of rows \a n can also be specified at compile-time by passing Eigen::fix<N>,
707
+ /// or Eigen::fix<N>(n) as arguments.
708
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
709
+ ///
710
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
711
+ ///
712
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
713
+ ///
714
+ template<typename NRowsType>
715
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
716
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
717
+ typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
718
+ #else
719
+ typename NRowsBlockXpr<...>::Type
720
+ #endif
721
+ middleRows(Index startRow, NRowsType n)
722
+ {
723
+ return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
724
+ (derived(), startRow, 0, internal::get_runtime_value(n), cols());
725
+ }
726
+
727
+ /// This is the const version of middleRows(Index,NRowsType).
728
+ template<typename NRowsType>
729
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
730
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
731
+ const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
732
+ #else
733
+ const typename ConstNRowsBlockXpr<...>::Type
734
+ #endif
735
+ middleRows(Index startRow, NRowsType n) const
736
+ {
737
+ return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
738
+ (derived(), startRow, 0, internal::get_runtime_value(n), cols());
739
+ }
740
+
741
+ /// \returns a block consisting of a range of rows of \c *this.
742
+ ///
743
+ /// \tparam N the number of rows in the block as specified at compile-time
744
+ /// \param startRow the index of the first row in the block
745
+ /// \param n the number of rows in the block as specified at run-time
746
+ ///
747
+ /// The compile-time and run-time information should not contradict. In other words,
748
+ /// \a n should equal \a N unless \a N is \a Dynamic.
749
+ ///
750
+ /// Example: \include DenseBase_template_int_middleRows.cpp
751
+ /// Output: \verbinclude DenseBase_template_int_middleRows.out
752
+ ///
753
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
754
+ ///
755
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
756
+ ///
757
+ template<int N>
758
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
759
+ typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
760
+ {
761
+ return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
762
+ }
763
+
764
+ /// This is the const version of middleRows<int>().
765
+ template<int N>
766
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
767
+ typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const
768
+ {
769
+ return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
770
+ }
771
+
772
+
773
+
774
+ /// \returns a block consisting of the left columns of \c *this.
775
+ ///
776
+ /// \param n the number of columns in the block
777
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
778
+ ///
779
+ /// Example: \include MatrixBase_leftCols_int.cpp
780
+ /// Output: \verbinclude MatrixBase_leftCols_int.out
781
+ ///
782
+ /// The number of columns \a n can also be specified at compile-time by passing Eigen::fix<N>,
783
+ /// or Eigen::fix<N>(n) as arguments.
784
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
785
+ ///
786
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
787
+ ///
788
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
789
+ ///
790
+ template<typename NColsType>
791
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
792
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
793
+ typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
794
+ #else
795
+ typename NColsBlockXpr<...>::Type
796
+ #endif
797
+ leftCols(NColsType n)
798
+ {
799
+ return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
800
+ (derived(), 0, 0, rows(), internal::get_runtime_value(n));
801
+ }
802
+
803
+ /// This is the const version of leftCols(NColsType).
804
+ template<typename NColsType>
805
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
806
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
807
+ const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
808
+ #else
809
+ const typename ConstNColsBlockXpr<...>::Type
810
+ #endif
811
+ leftCols(NColsType n) const
812
+ {
813
+ return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
814
+ (derived(), 0, 0, rows(), internal::get_runtime_value(n));
815
+ }
816
+
817
+ /// \returns a block consisting of the left columns of \c *this.
818
+ ///
819
+ /// \tparam N the number of columns in the block as specified at compile-time
820
+ /// \param n the number of columns in the block as specified at run-time
821
+ ///
822
+ /// The compile-time and run-time information should not contradict. In other words,
823
+ /// \a n should equal \a N unless \a N is \a Dynamic.
824
+ ///
825
+ /// Example: \include MatrixBase_template_int_leftCols.cpp
826
+ /// Output: \verbinclude MatrixBase_template_int_leftCols.out
827
+ ///
828
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
829
+ ///
830
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
831
+ ///
832
+ template<int N>
833
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
834
+ typename NColsBlockXpr<N>::Type leftCols(Index n = N)
835
+ {
836
+ return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
837
+ }
838
+
839
+ /// This is the const version of leftCols<int>().
840
+ template<int N>
841
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
842
+ typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const
843
+ {
844
+ return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
845
+ }
846
+
847
+
848
+
849
+ /// \returns a block consisting of the right columns of \c *this.
850
+ ///
851
+ /// \param n the number of columns in the block
852
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
853
+ ///
854
+ /// Example: \include MatrixBase_rightCols_int.cpp
855
+ /// Output: \verbinclude MatrixBase_rightCols_int.out
856
+ ///
857
+ /// The number of columns \a n can also be specified at compile-time by passing Eigen::fix<N>,
858
+ /// or Eigen::fix<N>(n) as arguments.
859
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
860
+ ///
861
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
862
+ ///
863
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
864
+ ///
865
+ template<typename NColsType>
866
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
867
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
868
+ typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
869
+ #else
870
+ typename NColsBlockXpr<...>::Type
871
+ #endif
872
+ rightCols(NColsType n)
873
+ {
874
+ return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
875
+ (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
876
+ }
877
+
878
+ /// This is the const version of rightCols(NColsType).
879
+ template<typename NColsType>
880
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
881
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
882
+ const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
883
+ #else
884
+ const typename ConstNColsBlockXpr<...>::Type
885
+ #endif
886
+ rightCols(NColsType n) const
887
+ {
888
+ return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
889
+ (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));
890
+ }
891
+
892
+ /// \returns a block consisting of the right columns of \c *this.
893
+ ///
894
+ /// \tparam N the number of columns in the block as specified at compile-time
895
+ /// \param n the number of columns in the block as specified at run-time
896
+ ///
897
+ /// The compile-time and run-time information should not contradict. In other words,
898
+ /// \a n should equal \a N unless \a N is \a Dynamic.
899
+ ///
900
+ /// Example: \include MatrixBase_template_int_rightCols.cpp
901
+ /// Output: \verbinclude MatrixBase_template_int_rightCols.out
902
+ ///
903
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
904
+ ///
905
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
906
+ ///
907
+ template<int N>
908
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
909
+ typename NColsBlockXpr<N>::Type rightCols(Index n = N)
910
+ {
911
+ return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
912
+ }
913
+
914
+ /// This is the const version of rightCols<int>().
915
+ template<int N>
916
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
917
+ typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const
918
+ {
919
+ return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
920
+ }
921
+
922
+
923
+
924
+ /// \returns a block consisting of a range of columns of \c *this.
925
+ ///
926
+ /// \param startCol the index of the first column in the block
927
+ /// \param numCols the number of columns in the block
928
+ /// \tparam NColsType the type of the value handling the number of columns in the block, typically Index.
929
+ ///
930
+ /// Example: \include DenseBase_middleCols_int.cpp
931
+ /// Output: \verbinclude DenseBase_middleCols_int.out
932
+ ///
933
+ /// The number of columns \a n can also be specified at compile-time by passing Eigen::fix<N>,
934
+ /// or Eigen::fix<N>(n) as arguments.
935
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
936
+ ///
937
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
938
+ ///
939
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
940
+ ///
941
+ template<typename NColsType>
942
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
943
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
944
+ typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
945
+ #else
946
+ typename NColsBlockXpr<...>::Type
947
+ #endif
948
+ middleCols(Index startCol, NColsType numCols)
949
+ {
950
+ return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
951
+ (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
952
+ }
953
+
954
+ /// This is the const version of middleCols(Index,NColsType).
955
+ template<typename NColsType>
956
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
957
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
958
+ const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
959
+ #else
960
+ const typename ConstNColsBlockXpr<...>::Type
961
+ #endif
962
+ middleCols(Index startCol, NColsType numCols) const
963
+ {
964
+ return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
965
+ (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));
966
+ }
967
+
968
+ /// \returns a block consisting of a range of columns of \c *this.
969
+ ///
970
+ /// \tparam N the number of columns in the block as specified at compile-time
971
+ /// \param startCol the index of the first column in the block
972
+ /// \param n the number of columns in the block as specified at run-time
973
+ ///
974
+ /// The compile-time and run-time information should not contradict. In other words,
975
+ /// \a n should equal \a N unless \a N is \a Dynamic.
976
+ ///
977
+ /// Example: \include DenseBase_template_int_middleCols.cpp
978
+ /// Output: \verbinclude DenseBase_template_int_middleCols.out
979
+ ///
980
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
981
+ ///
982
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
983
+ ///
984
+ template<int N>
985
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
986
+ typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
987
+ {
988
+ return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
989
+ }
990
+
991
+ /// This is the const version of middleCols<int>().
992
+ template<int N>
993
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
994
+ typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const
995
+ {
996
+ return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
997
+ }
998
+
999
+
1000
+
1001
+ /// \returns a fixed-size expression of a block of \c *this.
1002
+ ///
1003
+ /// The template parameters \a NRows and \a NCols are the number of
1004
+ /// rows and columns in the block.
1005
+ ///
1006
+ /// \param startRow the first row in the block
1007
+ /// \param startCol the first column in the block
1008
+ ///
1009
+ /// Example: \include MatrixBase_block_int_int.cpp
1010
+ /// Output: \verbinclude MatrixBase_block_int_int.out
1011
+ ///
1012
+ /// \note The usage of of this overload is discouraged from %Eigen 3.4, better used the generic
1013
+ /// block(Index,Index,NRowsType,NColsType), here is the one-to-one equivalence:
1014
+ /// \code
1015
+ /// mat.template block<NRows,NCols>(i,j) <--> mat.block(i,j,fix<NRows>,fix<NCols>)
1016
+ /// \endcode
1017
+ ///
1018
+ /// \note since block is a templated member, the keyword template has to be used
1019
+ /// if the matrix type is also a template parameter: \code m.template block<3,3>(1,1); \endcode
1020
+ ///
1021
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1022
+ ///
1023
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
1024
+ ///
1025
+ template<int NRows, int NCols>
1026
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1027
+ typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
1028
+ {
1029
+ return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
1030
+ }
1031
+
1032
+ /// This is the const version of block<>(Index, Index). */
1033
+ template<int NRows, int NCols>
1034
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1035
+ const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) const
1036
+ {
1037
+ return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
1038
+ }
1039
+
1040
+ /// \returns an expression of a block of \c *this.
1041
+ ///
1042
+ /// \tparam NRows number of rows in block as specified at compile-time
1043
+ /// \tparam NCols number of columns in block as specified at compile-time
1044
+ /// \param startRow the first row in the block
1045
+ /// \param startCol the first column in the block
1046
+ /// \param blockRows number of rows in block as specified at run-time
1047
+ /// \param blockCols number of columns in block as specified at run-time
1048
+ ///
1049
+ /// This function is mainly useful for blocks where the number of rows is specified at compile-time
1050
+ /// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
1051
+ /// information should not contradict. In other words, \a blockRows should equal \a NRows unless
1052
+ /// \a NRows is \a Dynamic, and the same for the number of columns.
1053
+ ///
1054
+ /// Example: \include MatrixBase_template_int_int_block_int_int_int_int.cpp
1055
+ /// Output: \verbinclude MatrixBase_template_int_int_block_int_int_int_int.out
1056
+ ///
1057
+ /// \note The usage of of this overload is discouraged from %Eigen 3.4, better used the generic
1058
+ /// block(Index,Index,NRowsType,NColsType), here is the one-to-one complete equivalence:
1059
+ /// \code
1060
+ /// mat.template block<NRows,NCols>(i,j,rows,cols) <--> mat.block(i,j,fix<NRows>(rows),fix<NCols>(cols))
1061
+ /// \endcode
1062
+ /// If we known that, e.g., NRows==Dynamic and NCols!=Dynamic, then the equivalence becomes:
1063
+ /// \code
1064
+ /// mat.template block<Dynamic,NCols>(i,j,rows,NCols) <--> mat.block(i,j,rows,fix<NCols>)
1065
+ /// \endcode
1066
+ ///
1067
+ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
1068
+ ///
1069
+ /// \sa block(Index,Index,NRowsType,NColsType), class Block
1070
+ ///
1071
+ template<int NRows, int NCols>
1072
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1073
+ typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
1074
+ Index blockRows, Index blockCols)
1075
+ {
1076
+ return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1077
+ }
1078
+
1079
+ /// This is the const version of block<>(Index, Index, Index, Index).
1080
+ template<int NRows, int NCols>
1081
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1082
+ const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
1083
+ Index blockRows, Index blockCols) const
1084
+ {
1085
+ return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
1086
+ }
1087
+
1088
+ /// \returns an expression of the \a i-th column of \c *this. Note that the numbering starts at 0.
1089
+ ///
1090
+ /// Example: \include MatrixBase_col.cpp
1091
+ /// Output: \verbinclude MatrixBase_col.out
1092
+ ///
1093
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
1094
+ /**
1095
+ * \sa row(), class Block */
1096
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1097
+ ColXpr col(Index i)
1098
+ {
1099
+ return ColXpr(derived(), i);
1100
+ }
1101
+
1102
+ /// This is the const version of col().
1103
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1104
+ ConstColXpr col(Index i) const
1105
+ {
1106
+ return ConstColXpr(derived(), i);
1107
+ }
1108
+
1109
+ /// \returns an expression of the \a i-th row of \c *this. Note that the numbering starts at 0.
1110
+ ///
1111
+ /// Example: \include MatrixBase_row.cpp
1112
+ /// Output: \verbinclude MatrixBase_row.out
1113
+ ///
1114
+ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
1115
+ /**
1116
+ * \sa col(), class Block */
1117
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1118
+ RowXpr row(Index i)
1119
+ {
1120
+ return RowXpr(derived(), i);
1121
+ }
1122
+
1123
+ /// This is the const version of row(). */
1124
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1125
+ ConstRowXpr row(Index i) const
1126
+ {
1127
+ return ConstRowXpr(derived(), i);
1128
+ }
1129
+
1130
+ /// \returns an expression of a segment (i.e. a vector block) in \c *this with either dynamic or fixed sizes.
1131
+ ///
1132
+ /// \only_for_vectors
1133
+ ///
1134
+ /// \param start the first coefficient in the segment
1135
+ /// \param n the number of coefficients in the segment
1136
+ /// \tparam NType the type of the value handling the number of coefficients in the segment, typically Index.
1137
+ ///
1138
+ /// Example: \include MatrixBase_segment_int_int.cpp
1139
+ /// Output: \verbinclude MatrixBase_segment_int_int.out
1140
+ ///
1141
+ /// The number of coefficients \a n can also be specified at compile-time by passing Eigen::fix<N>,
1142
+ /// or Eigen::fix<N>(n) as arguments.
1143
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
1144
+ ///
1145
+ /// \note Even in the case that the returned expression has dynamic size, in the case
1146
+ /// when it is applied to a fixed-size vector, it inherits a fixed maximal size,
1147
+ /// which means that evaluating it does not cause a dynamic memory allocation.
1148
+ ///
1149
+ /// \sa block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block
1150
+ ///
1151
+ template<typename NType>
1152
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1153
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1154
+ typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1155
+ #else
1156
+ typename FixedSegmentReturnType<...>::Type
1157
+ #endif
1158
+ segment(Index start, NType n)
1159
+ {
1160
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1161
+ return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1162
+ (derived(), start, internal::get_runtime_value(n));
1163
+ }
1164
+
1165
+
1166
+ /// This is the const version of segment(Index,NType).
1167
+ template<typename NType>
1168
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1169
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1170
+ const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1171
+ #else
1172
+ const typename ConstFixedSegmentReturnType<...>::Type
1173
+ #endif
1174
+ segment(Index start, NType n) const
1175
+ {
1176
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1177
+ return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1178
+ (derived(), start, internal::get_runtime_value(n));
1179
+ }
1180
+
1181
+ /// \returns an expression of the first coefficients of \c *this with either dynamic or fixed sizes.
1182
+ ///
1183
+ /// \only_for_vectors
1184
+ ///
1185
+ /// \param n the number of coefficients in the segment
1186
+ /// \tparam NType the type of the value handling the number of coefficients in the segment, typically Index.
1187
+ ///
1188
+ /// Example: \include MatrixBase_start_int.cpp
1189
+ /// Output: \verbinclude MatrixBase_start_int.out
1190
+ ///
1191
+ /// The number of coefficients \a n can also be specified at compile-time by passing Eigen::fix<N>,
1192
+ /// or Eigen::fix<N>(n) as arguments.
1193
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
1194
+ ///
1195
+ /// \note Even in the case that the returned expression has dynamic size, in the case
1196
+ /// when it is applied to a fixed-size vector, it inherits a fixed maximal size,
1197
+ /// which means that evaluating it does not cause a dynamic memory allocation.
1198
+ ///
1199
+ /// \sa class Block, block(Index,Index)
1200
+ ///
1201
+ template<typename NType>
1202
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1203
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1204
+ typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1205
+ #else
1206
+ typename FixedSegmentReturnType<...>::Type
1207
+ #endif
1208
+ head(NType n)
1209
+ {
1210
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1211
+ return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1212
+ (derived(), 0, internal::get_runtime_value(n));
1213
+ }
1214
+
1215
+ /// This is the const version of head(NType).
1216
+ template<typename NType>
1217
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1218
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1219
+ const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1220
+ #else
1221
+ const typename ConstFixedSegmentReturnType<...>::Type
1222
+ #endif
1223
+ head(NType n) const
1224
+ {
1225
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1226
+ return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1227
+ (derived(), 0, internal::get_runtime_value(n));
1228
+ }
1229
+
1230
+ /// \returns an expression of a last coefficients of \c *this with either dynamic or fixed sizes.
1231
+ ///
1232
+ /// \only_for_vectors
1233
+ ///
1234
+ /// \param n the number of coefficients in the segment
1235
+ /// \tparam NType the type of the value handling the number of coefficients in the segment, typically Index.
1236
+ ///
1237
+ /// Example: \include MatrixBase_end_int.cpp
1238
+ /// Output: \verbinclude MatrixBase_end_int.out
1239
+ ///
1240
+ /// The number of coefficients \a n can also be specified at compile-time by passing Eigen::fix<N>,
1241
+ /// or Eigen::fix<N>(n) as arguments.
1242
+ /// See \link block(Index,Index,NRowsType,NColsType) block() \endlink for the details.
1243
+ ///
1244
+ /// \note Even in the case that the returned expression has dynamic size, in the case
1245
+ /// when it is applied to a fixed-size vector, it inherits a fixed maximal size,
1246
+ /// which means that evaluating it does not cause a dynamic memory allocation.
1247
+ ///
1248
+ /// \sa class Block, block(Index,Index)
1249
+ ///
1250
+ template<typename NType>
1251
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1252
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1253
+ typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1254
+ #else
1255
+ typename FixedSegmentReturnType<...>::Type
1256
+ #endif
1257
+ tail(NType n)
1258
+ {
1259
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1260
+ return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1261
+ (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1262
+ }
1263
+
1264
+ /// This is the const version of tail(Index).
1265
+ template<typename NType>
1266
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1267
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
1268
+ const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1269
+ #else
1270
+ const typename ConstFixedSegmentReturnType<...>::Type
1271
+ #endif
1272
+ tail(NType n) const
1273
+ {
1274
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1275
+ return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
1276
+ (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));
1277
+ }
1278
+
1279
+ /// \returns a fixed-size expression of a segment (i.e. a vector block) in \c *this
1280
+ ///
1281
+ /// \only_for_vectors
1282
+ ///
1283
+ /// \tparam N the number of coefficients in the segment as specified at compile-time
1284
+ /// \param start the index of the first element in the segment
1285
+ /// \param n the number of coefficients in the segment as specified at compile-time
1286
+ ///
1287
+ /// The compile-time and run-time information should not contradict. In other words,
1288
+ /// \a n should equal \a N unless \a N is \a Dynamic.
1289
+ ///
1290
+ /// Example: \include MatrixBase_template_int_segment.cpp
1291
+ /// Output: \verbinclude MatrixBase_template_int_segment.out
1292
+ ///
1293
+ /// \sa segment(Index,NType), class Block
1294
+ ///
1295
+ template<int N>
1296
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1297
+ typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
1298
+ {
1299
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1300
+ return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
1301
+ }
1302
+
1303
+ /// This is the const version of segment<int>(Index).
1304
+ template<int N>
1305
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1306
+ typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const
1307
+ {
1308
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1309
+ return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
1310
+ }
1311
+
1312
+ /// \returns a fixed-size expression of the first coefficients of \c *this.
1313
+ ///
1314
+ /// \only_for_vectors
1315
+ ///
1316
+ /// \tparam N the number of coefficients in the segment as specified at compile-time
1317
+ /// \param n the number of coefficients in the segment as specified at run-time
1318
+ ///
1319
+ /// The compile-time and run-time information should not contradict. In other words,
1320
+ /// \a n should equal \a N unless \a N is \a Dynamic.
1321
+ ///
1322
+ /// Example: \include MatrixBase_template_int_start.cpp
1323
+ /// Output: \verbinclude MatrixBase_template_int_start.out
1324
+ ///
1325
+ /// \sa head(NType), class Block
1326
+ ///
1327
+ template<int N>
1328
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1329
+ typename FixedSegmentReturnType<N>::Type head(Index n = N)
1330
+ {
1331
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1332
+ return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
1333
+ }
1334
+
1335
+ /// This is the const version of head<int>().
1336
+ template<int N>
1337
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1338
+ typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const
1339
+ {
1340
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1341
+ return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
1342
+ }
1343
+
1344
+ /// \returns a fixed-size expression of the last coefficients of \c *this.
1345
+ ///
1346
+ /// \only_for_vectors
1347
+ ///
1348
+ /// \tparam N the number of coefficients in the segment as specified at compile-time
1349
+ /// \param n the number of coefficients in the segment as specified at run-time
1350
+ ///
1351
+ /// The compile-time and run-time information should not contradict. In other words,
1352
+ /// \a n should equal \a N unless \a N is \a Dynamic.
1353
+ ///
1354
+ /// Example: \include MatrixBase_template_int_end.cpp
1355
+ /// Output: \verbinclude MatrixBase_template_int_end.out
1356
+ ///
1357
+ /// \sa tail(NType), class Block
1358
+ ///
1359
+ template<int N>
1360
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1361
+ typename FixedSegmentReturnType<N>::Type tail(Index n = N)
1362
+ {
1363
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1364
+ return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
1365
+ }
1366
+
1367
+ /// This is the const version of tail<int>.
1368
+ template<int N>
1369
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1370
+ typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const
1371
+ {
1372
+ EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
1373
+ return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
1374
+ }
1375
+
1376
+ /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
1377
+ /// is col-major (resp. row-major).
1378
+ ///
1379
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1380
+ InnerVectorReturnType innerVector(Index outer)
1381
+ { return InnerVectorReturnType(derived(), outer); }
1382
+
1383
+ /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
1384
+ /// is col-major (resp. row-major). Read-only.
1385
+ ///
1386
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1387
+ const ConstInnerVectorReturnType innerVector(Index outer) const
1388
+ { return ConstInnerVectorReturnType(derived(), outer); }
1389
+
1390
+ /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
1391
+ /// is col-major (resp. row-major).
1392
+ ///
1393
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1394
+ InnerVectorsReturnType
1395
+ innerVectors(Index outerStart, Index outerSize)
1396
+ {
1397
+ return Block<Derived,Dynamic,Dynamic,true>(derived(),
1398
+ IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1399
+ IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1400
+
1401
+ }
1402
+
1403
+ /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
1404
+ /// is col-major (resp. row-major). Read-only.
1405
+ ///
1406
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1407
+ const ConstInnerVectorsReturnType
1408
+ innerVectors(Index outerStart, Index outerSize) const
1409
+ {
1410
+ return Block<const Derived,Dynamic,Dynamic,true>(derived(),
1411
+ IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
1412
+ IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);
1413
+
1414
+ }
1415
+
1416
+ /** \returns the i-th subvector (column or vector) according to the \c Direction
1417
+ * \sa subVectors()
1418
+ */
1419
+ template<DirectionType Direction>
1420
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1421
+ typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type
1422
+ subVector(Index i)
1423
+ {
1424
+ return typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type(derived(),i);
1425
+ }
1426
+
1427
+ /** This is the const version of subVector(Index) */
1428
+ template<DirectionType Direction>
1429
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1430
+ typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type
1431
+ subVector(Index i) const
1432
+ {
1433
+ return typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type(derived(),i);
1434
+ }
1435
+
1436
+ /** \returns the number of subvectors (rows or columns) in the direction \c Direction
1437
+ * \sa subVector(Index)
1438
+ */
1439
+ template<DirectionType Direction>
1440
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
1441
+ Index subVectors() const
1442
+ { return (Direction==Vertical)?cols():rows(); }