Consider the distinction between object aggregation and acquaintance and how differently they manifest
themselves at compile- and run-times. Aggregation implies that one object owns or is responsible for
another object. Generally we speak of an object having or being part of another object. Aggregation implies
that an aggregate object and its owner have identical lifetimes.
Acquaintance implies that an object merely knows of another object. Sometimes acquaintance is called
"association" or the "using" relationship. Acquainted objects may request operations of each other, but they
aren't responsible for each other. Acquaintance is a weaker relationship than aggregation and suggests much
looser coupling between objects.
In our diagrams, a plain arrowhead line denotes acquaintance. An arrowhead line with a diamond at its base
denotes aggregation:
It's easy to confuse aggregation and acquaintance, because they are often implemented in the same way. In
Smalltalk, all variables are references to other objects. There's no distinction in the programming language
between aggregation and acquaintance. In C++, aggregation can be implemented by defining member
variables that are real instances, but it's more common to define them as pointers or references to instances.
Acquaintance is implemented with pointers and references as well.
Ultimately, acquaintance and aggregation are determined more by intent than by explicit language
mechanisms. The distinction may be hard to see in the compile-time structure, but it's significant.
Aggregation relationships tend to be fewer and more permanent than acquaintance. Acquaintances, in
contrast, are made and remade more frequently, sometimes existing only for the duration of an operation.
Acquaintances are more dynamic as well, making them more difficult to discern in the source code.
分享到:
相关推荐
Association, Aggregation and Composition 的区别 在 Java 应用程序开发中,理解 UML 类图元素及其与 Java 的映射关系是非常重要的。其中,Association、Aggregation 和 Composition 是三个常见的 UML 元素,它们...
在IT领域,尤其是在优化模型的研究与应用中,聚合(Aggregation)与解聚合(Disaggregation)技术及其方法论扮演着至关重要的角色。这些技术旨在处理数据与决策模型之间的复杂关系,平衡模型的细节程度与解决模型的...
"Aggregation and adhesion properties of 22 Lactobacillus strains" 这篇文章主要探讨了22株不同物种的乳杆菌的自聚性、共聚性、疏水性和粘附性等特性,这些特性是衡量乳杆菌作为潜在益生菌的重要指标。...
Edzer Pebesma (2018). Numerical “map overlay” ...spatial data, so that any spatial properties can be used to define an aggregation predicate, and any R function can be used as aggregation function.
《Principles for Effective Data Aggregation and Risk Reporting》是一份由巴塞尔银行监管委员会(Basel Committee on Banking Supervision)发布的文档,旨在为金融机构提供一套关于如何有效地进行风险数据聚合与...
Some induced geometric aggregation operators with intuitionistic fuzzy information and their application to group decision making,卫贵武,,With respect to multiple attribute group decision making ...
Aggregation Aggregation Aggregation 适合聚类使用!有多类簇
标题中的"Recurrent Squeeze-and-Excitation Context Aggregation Net for Single Image Deraining"是一种用于单张图像去雨的深度学习模型,它结合了循环神经网络(RNN)与卷积神经网络(CNN)的优势,旨在提升图像...
图像分割是计算机视觉和图像处理领域的一个核心任务,旨在将图像划分为具有相似属性的区域,以便将物体从背景中分离出来。传统的图像分割算法往往依赖于单一的线索,如颜色、纹理、亮度或边界连续性等。...
Fuzzy Linguistic Hybrid Geometric Aggregation Operator and Its Application to Group Decision Making,卫贵武,,With respect to multiple attribute group decision making problem with triangular fuzzy ...
and in practice, this new aggregation allows to keep the same sample efficiency of SG methods while increasing the batch size. Experimentally, we also show that in the case of smooth convex ...
钌配合物抑制人胰岛淀粉样多肽纤维化及其诱导的活性氧的产生,马丽娟,郑文杰,人胰岛淀粉样多肽(hIAPP)是2型糖尿病患者胰岛中胰岛淀粉样沉积物的主要组成部分,在胰岛β细胞的凋亡中起着至关重要的作用。...
In conclusion, the HP Auto Port Aggregation (APA) Release Notes detail the latest advancements in network aggregation technology, focusing on improving performance, reliability, and compatibility....
07.grouping_and_aggregation.ipynb
In this paper, we propose a joint user association and resource allocation algorithm for MSA systems to achieve energy efficiency (EE) balance among different base stations. The problem is formulated...
链路聚合,或称LAG(Link Aggregation Group),是一种将多个物理连接组合成一个逻辑链路的技术,使得媒体访问控制(MAC)客户端可以将链路聚合组视为单一的高带宽链接。这种技术的核心是通过N个并行的全双工点对点...
### 机器学习技法课之Aggregation模型 #### 一、Aggregation模型概述 Aggregation模型是一种重要的机器学习技术,主要用于组合多个弱学习器以形成一个更强大的预测模型。这一技术的核心在于通过各种策略来整合不同...
Unsupervised Part-based Weighting Aggregation of Deep Convolutional Features for Image Retrieval.pdf
### 聚合管道(Aggregation Pipeline) 聚合管道是一个多层次的处理过程,它将数据文档转换为聚合结果。它由多个阶段组成,每个阶段都按照声明的顺序进行操作。聚合管道中常见的一些操作包括: - **$match**: 过滤...
KLAP: Kernel Launch Aggregation and Promotion for Optimizing Dynamic ParallelismIzzat El Hajj∗‡, Juan Gómez-Luna†, Cheng Li∗, Li-Wen Chang∗, Dejan Milojicic‡ and Wen-mei Hwu∗ ∗University of ...