在pascal中使用set的实现是什么? [英] What is the implementation of sets used in pascal?
问题描述
我想知道该语言提供的以pascal为单位的set类型的实际实现.特别地,我想知道freepascal运行时库中使用的那个,但是我对任何pascal的实现都感兴趣.
I want to know the actual implementation of the set type in pascal, provided by the language. Specially, I would like to know the one used in the freepascal runtime library, but I'm interested in any pascal implementation.
I care about the run-time complexity of it. The best implementations of Disjoint-set data structure are in O(log*n), and I wish to know if pascal implementation has this one.
可在以下位置找到fpc rtl的文档: ftp://ftp.freepascal.org/pub/fpc/docs-pdf/rtl.pdf ,但是它太大(> 1700页),无法在不知道它的位置找到它. freepascal Wiki对此没有任何启示.
The doc for the fpc rtl is found here: ftp://ftp.freepascal.org/pub/fpc/docs-pdf/rtl.pdf , but it's too large (>1700 pages) for looking for this without knowing if it's even there. The freepascal wiki doesn't shed any light on this.
推荐答案
根据此解释,Pascal在内部将集合表示为位字符串.但是,本文显然没有提到Pascal的特定实现.在本文档中,还指出了位串用于表示.更准确地说,本文档明确提到了32个字节用于存储设置.
According to this explanation, Pascal internally represents sets as bit strings. However, the article apparently does not refer to a specific implementation of Pascal. In this documentation, it is also stated that bitstrings are used for representation. More precisely, this documentation explicitly mentions 32 bytes for storage of a set.
这篇关于在pascal中使用set的实现是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!