본문으로 바로가기

홈페이지 : http://pages.infinit.net/cclients/files/containers.htm

Containers 1.2 패키지는 여러 컨테이너 객체를 구현하는 Tcl 프로그래밍 언어의 작은 확장입니다. 컨테이너 객체는 문자열, 리스트, 배열 및 프로시저와 같은 기본 Tcl 객체를 보유할 수 있으며 컨테이너의 객체를 조작할 수 있는 몇 가지 함수를 제공합니다.

 

The Containers 1.2 package is a small extension to the Tcl programming language that implements a number of container objects. Container objects can hold native Tcl objects like strings, lists, arrays and procs and provide some functions that allow the manipulation of the objects in the container.

 

This package implements the bag, stack, queue, tree, priority queue and random queue and structure containers. A bag is just an unordered list of items that is indexed according to the number of items in the container. A stack is a container that implements a LIFO queue. A queue is a container that implements a FIFO queue.

 

Tree, priority queue and random queue containers are implemented using binary tree structures. The tree container can be used to maintain a set of items in a sorted list, either in ascending collating sequence or descending collating sequence order. Optionally, the list may contain duplicate items, or be limited to items that have a unique string representation. You can also specify your own collating sequence for special sorting applications.

 

A priority queue is a list that is sorted by a value associated with the item termed its priority. Priority queues are useful when processing lists whose items can be associated with a value that indicates the order in which the items should be processed. In this implementation, priorities can be either strings or numerical values, and the order of sorting can be specified as either forward or reverse.

 

A random queue is a queue that orders new entries in a random fashion. This type of queue has use in simplifying the generation of data for transaction simulations, generating the order of certain types of search processing, and for implementing games.

 

A structure is a labelled list of data items. Structures are implemented by the creation of templates that contain the list of labels for elements of the structure. An instance of the structure template can then be initialized with data that may then be accessed by label. Since structures can contain structures, the hierarchical organization of information, and the creation of things like linked lists and transfer tables is made quite convenient.

 

In addition to the basic container objects, parameters for the individual commands allow the creation of things like circular buffers and fixed length service queues.

Download

contain.zip
0.18MB

 

 

Tcl & Tk확장 패키지 (Extension Package)카테고리의 다른글

Tree 3.1  (0) 2025.03.05
EMail 1.7  (0) 2025.03.05
Date 2.16  (0) 2025.03.05
RBTree 1.1.2  (0) 2025.03.05
mentry 2.8  (0) 2025.03.05