tomoto 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/LICENSE.txt +1 -1
  4. data/ext/tomoto/ct.cpp +1 -1
  5. data/ext/tomoto/dmr.cpp +1 -1
  6. data/ext/tomoto/dt.cpp +1 -1
  7. data/ext/tomoto/extconf.rb +4 -8
  8. data/ext/tomoto/gdmr.cpp +1 -1
  9. data/ext/tomoto/hdp.cpp +1 -1
  10. data/ext/tomoto/hlda.cpp +1 -1
  11. data/ext/tomoto/hpa.cpp +1 -1
  12. data/ext/tomoto/lda.cpp +29 -3
  13. data/ext/tomoto/llda.cpp +1 -1
  14. data/ext/tomoto/mglda.cpp +1 -1
  15. data/ext/tomoto/pa.cpp +1 -1
  16. data/ext/tomoto/plda.cpp +1 -1
  17. data/ext/tomoto/slda.cpp +1 -1
  18. data/lib/tomoto/lda.rb +1 -0
  19. data/lib/tomoto/version.rb +1 -1
  20. data/vendor/EigenRand/EigenRand/Core.h +6 -4
  21. data/vendor/EigenRand/EigenRand/CwiseHeteroBinaryOp.h +265 -0
  22. data/vendor/EigenRand/EigenRand/Dists/Basic.h +345 -12
  23. data/vendor/EigenRand/EigenRand/Dists/Discrete.h +381 -7
  24. data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +4 -4
  25. data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +576 -4
  26. data/vendor/EigenRand/EigenRand/EigenRand +4 -4
  27. data/vendor/EigenRand/EigenRand/Macro.h +3 -3
  28. data/vendor/EigenRand/EigenRand/MorePacketMath.h +31 -30
  29. data/vendor/EigenRand/EigenRand/MvDists/Multinomial.h +41 -29
  30. data/vendor/EigenRand/EigenRand/MvDists/MvNormal.h +19 -7
  31. data/vendor/EigenRand/EigenRand/PacketFilter.h +8 -5
  32. data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +3 -3
  33. data/vendor/EigenRand/EigenRand/RandUtils.h +180 -5
  34. data/vendor/EigenRand/EigenRand/arch/AVX/MorePacketMath.h +42 -3
  35. data/vendor/EigenRand/EigenRand/arch/AVX/PacketFilter.h +3 -3
  36. data/vendor/EigenRand/EigenRand/arch/AVX/RandUtils.h +3 -3
  37. data/vendor/EigenRand/EigenRand/arch/AVX512/MorePacketMath.h +312 -0
  38. data/vendor/EigenRand/EigenRand/arch/AVX512/PacketFilter.h +79 -0
  39. data/vendor/EigenRand/EigenRand/arch/AVX512/RandUtils.h +147 -0
  40. data/vendor/EigenRand/EigenRand/arch/NEON/MorePacketMath.h +118 -3
  41. data/vendor/EigenRand/EigenRand/arch/NEON/PacketFilter.h +3 -3
  42. data/vendor/EigenRand/EigenRand/arch/NEON/RandUtils.h +21 -3
  43. data/vendor/EigenRand/EigenRand/arch/SSE/MorePacketMath.h +32 -4
  44. data/vendor/EigenRand/EigenRand/arch/SSE/PacketFilter.h +3 -3
  45. data/vendor/EigenRand/EigenRand/arch/SSE/RandUtils.h +3 -3
  46. data/vendor/EigenRand/EigenRand/doc.h +108 -157
  47. data/vendor/EigenRand/README.md +60 -272
  48. data/vendor/tomotopy/README.kr.rst +27 -5
  49. data/vendor/tomotopy/README.rst +27 -5
  50. data/vendor/tomotopy/README_pypi.rst +583 -0
  51. data/vendor/tomotopy/licenses_bundled/EigenRand +21 -0
  52. data/vendor/tomotopy/src/TopicModel/CT.h +1 -1
  53. data/vendor/tomotopy/src/TopicModel/CTModel.cpp +1 -1
  54. data/vendor/tomotopy/src/TopicModel/DMR.h +1 -1
  55. data/vendor/tomotopy/src/TopicModel/DMRModel.cpp +1 -1
  56. data/vendor/tomotopy/src/TopicModel/DT.h +1 -1
  57. data/vendor/tomotopy/src/TopicModel/DTModel.cpp +1 -1
  58. data/vendor/tomotopy/src/TopicModel/GDMR.h +1 -1
  59. data/vendor/tomotopy/src/TopicModel/GDMRModel.cpp +1 -1
  60. data/vendor/tomotopy/src/TopicModel/HDP.h +1 -1
  61. data/vendor/tomotopy/src/TopicModel/HDPModel.cpp +1 -1
  62. data/vendor/tomotopy/src/TopicModel/HLDA.h +1 -1
  63. data/vendor/tomotopy/src/TopicModel/HLDAModel.cpp +1 -1
  64. data/vendor/tomotopy/src/TopicModel/HPA.h +1 -1
  65. data/vendor/tomotopy/src/TopicModel/HPAModel.cpp +1 -1
  66. data/vendor/tomotopy/src/TopicModel/LDA.h +1 -1
  67. data/vendor/tomotopy/src/TopicModel/LDAModel.cpp +1 -1
  68. data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +6 -6
  69. data/vendor/tomotopy/src/TopicModel/LLDA.h +1 -1
  70. data/vendor/tomotopy/src/TopicModel/LLDAModel.cpp +1 -1
  71. data/vendor/tomotopy/src/TopicModel/MGLDA.h +1 -1
  72. data/vendor/tomotopy/src/TopicModel/MGLDAModel.cpp +1 -1
  73. data/vendor/tomotopy/src/TopicModel/PA.h +1 -1
  74. data/vendor/tomotopy/src/TopicModel/PAModel.cpp +1 -1
  75. data/vendor/tomotopy/src/TopicModel/PLDA.h +1 -1
  76. data/vendor/tomotopy/src/TopicModel/PLDAModel.cpp +1 -1
  77. data/vendor/tomotopy/src/TopicModel/PT.h +1 -1
  78. data/vendor/tomotopy/src/TopicModel/PTModel.cpp +1 -1
  79. data/vendor/tomotopy/src/TopicModel/SLDA.h +1 -1
  80. data/vendor/tomotopy/src/TopicModel/SLDAModel.cpp +1 -1
  81. data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +6 -6
  82. data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +41 -0
  83. data/vendor/tomotopy/src/Utils/ThreadPool.hpp +6 -6
  84. data/vendor/tomotopy/src/Utils/Utils.hpp +3 -3
  85. data/vendor/tomotopy/src/Utils/avx512_gamma.h +46 -0
  86. data/vendor/tomotopy/src/Utils/avx512_mathfun.h +99 -0
  87. metadata +10 -9
  88. data/vendor/variant/LICENSE +0 -25
  89. data/vendor/variant/LICENSE_1_0.txt +0 -23
  90. data/vendor/variant/README.md +0 -102
  91. data/vendor/variant/include/mapbox/optional.hpp +0 -74
  92. data/vendor/variant/include/mapbox/recursive_wrapper.hpp +0 -122
  93. data/vendor/variant/include/mapbox/variant.hpp +0 -974
  94. data/vendor/variant/include/mapbox/variant_io.hpp +0 -45
@@ -1,102 +0,0 @@
1
- # Mapbox Variant
2
-
3
- An alternative to `boost::variant` for C++11 and C++14
4
-
5
- [![Build Status](https://secure.travis-ci.org/mapbox/variant.svg)](https://travis-ci.org/mapbox/variant)
6
- [![Build status](https://ci.appveyor.com/api/projects/status/v9tatx21j1k0fcgy)](https://ci.appveyor.com/project/Mapbox/variant)
7
- [![Coverage Status](https://coveralls.io/repos/mapbox/variant/badge.svg?branch=master&service=github)](https://coveralls.io/r/mapbox/variant?branch=master)
8
-
9
-
10
- ## Why use Mapbox Variant?
11
-
12
- Mapbox variant has the same speedy performance of `boost::variant` but is
13
- faster to compile, results in smaller binaries, and has no dependencies.
14
-
15
- For example on OS X 10.9 with clang++ and libc++:
16
-
17
- Test | Mapbox Variant | Boost Variant
18
- ---- | -------------- | -------------
19
- Size of pre-compiled header (release / debug) | 2.8/2.8 MB | 12/15 MB
20
- Size of simple program linking variant (release / debug) | 8/24 K | 12/40 K
21
- Time to compile header | 185 ms | 675 ms
22
-
23
- (Numbers from an older version of Mapbox variant.)
24
-
25
-
26
- ## Goals
27
-
28
- Mapbox `variant` has been a very valuable, lightweight alternative for apps
29
- that can use c++11 or c++14 but that do not want a boost dependency.
30
- Mapbox `variant` has also been useful in apps that do depend on boost, like
31
- mapnik, to help (slightly) with compile times and to majorly lessen dependence
32
- on boost in core headers. The original goal and near term goal is to maintain
33
- external API compatibility with `boost::variant` such that Mapbox `variant`
34
- can be a "drop in". At the same time the goal is to stay minimal: Only
35
- implement the features that are actually needed in existing software. So being
36
- an "incomplete" implementation is just fine.
37
-
38
- Currently Mapbox variant doesn't try to be API compatible with the upcoming
39
- variant standard, because the standard is not finished and it would be too much
40
- work. But we'll revisit this decision in the future if needed.
41
-
42
- If Mapbox variant is not for you, have a look at [these other
43
- implementations](doc/other_implementations.md).
44
-
45
- Want to know more about the upcoming standard? Have a look at our
46
- [overview](doc/standards_effort.md).
47
-
48
-
49
- ## Depends
50
-
51
- - Compiler supporting `-std=c++11` or `-std=c++14`
52
-
53
- Tested with:
54
-
55
- - g++-4.7
56
- - g++-4.8
57
- - g++-4.9
58
- - g++-5.2
59
- - clang++-3.5
60
- - clang++-3.6
61
- - clang++-3.7
62
- - clang++-3.8
63
- - clang++-3.9
64
- - Visual Studio 2015
65
-
66
- ## Usage
67
-
68
- There is nothing to build, just include `variant.hpp` in your project. Include `variant_io.hpp` if you need
69
- the `operator<<` overload for variant.
70
-
71
-
72
- ## Unit Tests
73
-
74
- On Unix systems compile and run the unit tests with `make test`.
75
-
76
- On Windows run `scripts/build-local.bat`.
77
-
78
-
79
- ## Limitations
80
-
81
- * The `variant` can not hold references (something like `variant<int&>` is
82
- not possible). You might want to try `std::reference_wrapper` instead.
83
-
84
-
85
- ## Deprecations
86
-
87
- * The included implementation of `optional` is deprecated and will be removed
88
- in a future version. See https://github.com/mapbox/variant/issues/64.
89
- * Old versions of the code needed visitors to derive from `static_visitor`.
90
- This is not needed any more and marked as deprecated. The `static_visitor`
91
- class will be removed in future versions.
92
-
93
-
94
- ## Benchmarks
95
-
96
- make bench
97
-
98
-
99
- ## Check object sizes
100
-
101
- make sizes /path/to/boost/variant.hpp
102
-
@@ -1,74 +0,0 @@
1
- #ifndef MAPBOX_UTIL_OPTIONAL_HPP
2
- #define MAPBOX_UTIL_OPTIONAL_HPP
3
-
4
- #pragma message("This implementation of optional is deprecated. See https://github.com/mapbox/variant/issues/64.")
5
-
6
- #include <type_traits>
7
- #include <utility>
8
-
9
- #include <mapbox/variant.hpp>
10
-
11
- namespace mapbox {
12
- namespace util {
13
-
14
- template <typename T>
15
- class optional
16
- {
17
- static_assert(!std::is_reference<T>::value, "optional doesn't support references");
18
-
19
- struct none_type
20
- {
21
- };
22
-
23
- variant<none_type, T> variant_;
24
-
25
- public:
26
- optional() = default;
27
-
28
- optional(optional const& rhs)
29
- {
30
- if (this != &rhs)
31
- { // protect against invalid self-assignment
32
- variant_ = rhs.variant_;
33
- }
34
- }
35
-
36
- optional(T const& v) { variant_ = v; }
37
-
38
- explicit operator bool() const noexcept { return variant_.template is<T>(); }
39
-
40
- T const& get() const { return variant_.template get<T>(); }
41
- T& get() { return variant_.template get<T>(); }
42
-
43
- T const& operator*() const { return this->get(); }
44
- T operator*() { return this->get(); }
45
-
46
- optional& operator=(T const& v)
47
- {
48
- variant_ = v;
49
- return *this;
50
- }
51
-
52
- optional& operator=(optional const& rhs)
53
- {
54
- if (this != &rhs)
55
- {
56
- variant_ = rhs.variant_;
57
- }
58
- return *this;
59
- }
60
-
61
- template <typename... Args>
62
- void emplace(Args&&... args)
63
- {
64
- variant_ = T{std::forward<Args>(args)...};
65
- }
66
-
67
- void reset() { variant_ = none_type{}; }
68
-
69
- }; // class optional
70
-
71
- } // namespace util
72
- } // namespace mapbox
73
-
74
- #endif // MAPBOX_UTIL_OPTIONAL_HPP
@@ -1,122 +0,0 @@
1
- #ifndef MAPBOX_UTIL_RECURSIVE_WRAPPER_HPP
2
- #define MAPBOX_UTIL_RECURSIVE_WRAPPER_HPP
3
-
4
- // Based on variant/recursive_wrapper.hpp from boost.
5
- //
6
- // Original license:
7
- //
8
- // Copyright (c) 2002-2003
9
- // Eric Friedman, Itay Maman
10
- //
11
- // Distributed under the Boost Software License, Version 1.0. (See
12
- // accompanying file LICENSE_1_0.txt or copy at
13
- // http://www.boost.org/LICENSE_1_0.txt)
14
-
15
- #include <cassert>
16
- #include <utility>
17
-
18
- namespace mapbox {
19
- namespace util {
20
-
21
- template <typename T>
22
- class recursive_wrapper
23
- {
24
-
25
- T* p_;
26
-
27
- void assign(T const& rhs)
28
- {
29
- this->get() = rhs;
30
- }
31
-
32
- public:
33
- using type = T;
34
-
35
- /**
36
- * Default constructor default initializes the internally stored value.
37
- * For POD types this means nothing is done and the storage is
38
- * uninitialized.
39
- *
40
- * @throws std::bad_alloc if there is insufficient memory for an object
41
- * of type T.
42
- * @throws any exception thrown by the default constructur of T.
43
- */
44
- recursive_wrapper()
45
- : p_(new T){}
46
-
47
- ~recursive_wrapper() noexcept { delete p_; }
48
-
49
- recursive_wrapper(recursive_wrapper const& operand)
50
- : p_(new T(operand.get())) {}
51
-
52
- recursive_wrapper(T const& operand)
53
- : p_(new T(operand)) {}
54
-
55
- recursive_wrapper(recursive_wrapper&& operand)
56
- : p_(new T(std::move(operand.get()))) {}
57
-
58
- recursive_wrapper(T&& operand)
59
- : p_(new T(std::move(operand))) {}
60
-
61
- inline recursive_wrapper& operator=(recursive_wrapper const& rhs)
62
- {
63
- assign(rhs.get());
64
- return *this;
65
- }
66
-
67
- inline recursive_wrapper& operator=(T const& rhs)
68
- {
69
- assign(rhs);
70
- return *this;
71
- }
72
-
73
- inline void swap(recursive_wrapper& operand) noexcept
74
- {
75
- T* temp = operand.p_;
76
- operand.p_ = p_;
77
- p_ = temp;
78
- }
79
-
80
- recursive_wrapper& operator=(recursive_wrapper&& rhs) noexcept
81
- {
82
- swap(rhs);
83
- return *this;
84
- }
85
-
86
- recursive_wrapper& operator=(T&& rhs)
87
- {
88
- get() = std::move(rhs);
89
- return *this;
90
- }
91
-
92
- T& get()
93
- {
94
- assert(p_);
95
- return *get_pointer();
96
- }
97
-
98
- T const& get() const
99
- {
100
- assert(p_);
101
- return *get_pointer();
102
- }
103
-
104
- T* get_pointer() { return p_; }
105
-
106
- const T* get_pointer() const { return p_; }
107
-
108
- operator T const&() const { return this->get(); }
109
-
110
- operator T&() { return this->get(); }
111
-
112
- }; // class recursive_wrapper
113
-
114
- template <typename T>
115
- inline void swap(recursive_wrapper<T>& lhs, recursive_wrapper<T>& rhs) noexcept
116
- {
117
- lhs.swap(rhs);
118
- }
119
- } // namespace util
120
- } // namespace mapbox
121
-
122
- #endif // MAPBOX_UTIL_RECURSIVE_WRAPPER_HPP