-
Use vector in ThreadScope to Reduce the Memory Usage
As described in the issue ThreadScope#29, the ThreadScope is really slow when loading a relatively huge eventlog file, and consumed an unacceptable volume of memory. High memory usage caused by using incorrect data structure is fairly common in many Haskell applications, thus at first glance, I focused on the internal data structure that ThreadScope uses when browsing the source code. I found that replacing
List
usingVector
could bring a significant improvement. -
Coupon Collector's Problem
The coupon collector’s problem describes the following question: there are $n$ different types of coupons and the collector will receive a random coupon every time, what is the expected trials that the collector can collect all $n$ types of coupons? We can conclude that the expected trails grows as $\mathcal{O}(n\log{n})$.
-
Join in SQL
join
is a kind of SQL operation in relational algebra, combining columns cross tables. -
Excluded Middle in Coq
Excluded middle is an important theorem in classical logic. However in intuitionistic logic, the excluded middle theory doesn’t satisfy the constructive principle. The excluded middle law is provable in Coq and often confused with some other theorems in Coq.
-
CNN Meets Graphs
Graph convolutional network is a kind of neural network that use graph data as input, developing a serials of Conv operator and
Pooling
theory based on graph theory, mainly the spectral graph theory. -
Pattern Matching in List Comprehension
After the
|
in list comprehension, pattern matching can be used to filter expected values. -
随机向量和概率统计
-
矩母函数和特征函数
概率论中,矩母函数(Moment-generating Function)和特征函数(Characteristic Function)是定义 概率分布函数的另一种形式。
-
DLL的初始化和退出处理
将Haskell代码编译成动态链接库供其他语言调用时,需要调用
hs_init
函数初始化GHC的运行时环境,退出时 需要调用hs_exit
函数来完成释放内存等清理工作1。如果把初始化和退出处理交给用户程序去做,不仅会给 用户程序代码带来额外的麻烦,而且错误的初始化和退出处理还会造成调用动态链接库时的错误。DLL本身的 处理化和退出清理机制可以很好地解决这一问题。-
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ffi-chap.html#using-the-ffi-with-ghc ↩
-
-
数学分析题目集锦
2018-08
2017-09
2017-08
2017-05
2016-12
2016-10
2016-09
Subscribe via RSS