Many mathematical objects can be represented as functors from finitely-presented categories $\mathsf{C}$ to $\mathsf{Set}$. For instance, graphs are functors to $\mathsf{C}$ from the category with two parallel arrows. Such functors are known informally as $\mathsf{C}$-sets. In this paper, we describe and implement an extension of $\mathsf{C}$-sets having data attributes with fixed types, such as graphs with labeled vertices or real-valued edge weights. We call such structures "acsets," short for "attributed $\mathsf{C}$-sets." Derived from previous work on algebraic databases, acsets are a joint generalization of graphs and data frames. They also encompass more elaborate graph-like objects such as wiring diagrams and Petri nets with rate constants. We develop the mathematical theory of acsets and then describe a generic implementation in the Julia programming language, which uses advanced language features to achieve performance comparable with specialized data structures.
翻译:许多数学天体可以被描述为由 $\ mathsf{C} $ 到 $\ mathsf{Set} $。 例如, 图表是从两个平行箭头的类别中的真菌到 $mathsf{C} $。 这些真菌非正式地被称为 $\ mathsf{C} $- sets。 在本文中, 我们描述和实施一个有固定类型数据属性的 $\ mathsf{C} $ 数据集的扩展, 如带有固定类型的数据属性的图形, 如带有标签的顶尖或实际价值边缘重量的图形。 我们将这些结构称为“ acset ”, 简称为“ acset”, 简称为“ actratedd $\mathsf{C}- setrights” 。 。 这些真菌来自先前在 位词典数据库中的工作, acset is a common- like liglegle able 对象, 如有比例常数。 我们开发了一个数学理论集, 然后描述在朱丽亚利亚亚语言中可比较化的功能。