Home > Common Problem > An abstract data type is defined only by a set of its characteristics

An abstract data type is defined only by a set of its characteristics

(*-*)浩
Release: 2019-11-18 16:01:31
Original
11913 people have browsed it

An Abstract Data Type (ADT) is a mathematical model of a specific category of data structures in computer science that has similar behavior; or a data type that has similar semantics to one or more programming languages.

An abstract data type is defined only by a set of its characteristics

Abstract data type: refers to a mathematical model and a set of operations defined on the model. The definition of an abstract data type only depends on its set of logical characteristics, and has nothing to do with how it is represented and implemented inside the computer. That is, no matter how its internal structure changes, as long as its mathematical characteristics remain unchanged, it will not affect other external uses. (Recommended learning: web front-end video tutorial)

Representation and implementation of abstract data types: It can be represented and implemented through inherent data types. That is, the data types already stored in the processor are used to describe new structures, and new operations are combined with already implemented operations.

Take a linear table as an example. The relationship between the two: the definition of an abstract data type linear table is only an abstract linear table in logical order, and its storage structure has not yet been involved. The representation is to establish the The storage structure of the linear table is implemented by writing specific algorithms through some specific programming languages, and then obtaining the results through the algorithms.

It can be summarized that their relationship is a process from abstract logical order to concrete implementation of algorithms.

Abstract data type (ADT) is a purely theoretical entity used to simplify the description of abstract algorithms, classify and evaluate data structures, and formally describe the type system of programming languages.

An ADT can be implemented using a specific data type or data structure. There are many ways to implement it in many programming languages; or it can be described in a formal specification language.

ADT is often implemented as a module: the module's interface declares the routine (procedure) corresponding to the ADT operation, and sometimes uses comments to describe the constraints.

Abstract data type (ADT, Abstract Data Type) refers to a mathematical model and a set of operations defined on this mathematical model. It is usually some kind of abstraction of data, defining the value range of the data and its structural form, as well as a collection of data operations.

For example, there are "integer" types in various high-level programming languages. Although they are implemented in different ways on different processors, they are "the same" to programmers, that is, the mathematical properties are the same . From the perspective of "mathematical abstraction", it can be called an "abstract data type".

The characteristic of abstract data types is to separate usage and implementation, thereby encapsulating and hiding information. Abstract data types are implemented in a certain part of the program through a specific data structure. They only care about the operations on this data type and do not care about the specific implementation of the data structure.

The above is the detailed content of An abstract data type is defined only by a set of its characteristics. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template