Many mathematical objects can be represented as functors from finitely-presented categories $\mathsf{C}$ to $\mathsf{Set}$. For instance, graphs are functors to $\mathsf{Set}$ 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{Set} 美元的配方。 这些配方被非正式地称为 $\mathsf{C} $- sets。 在本文中, 我们描述并实施一个有固定类型数据属性的 $\mathsf{C} 元集的扩展。 例如, 带有标签的顶端或真实值边缘重量的图形。 我们称之为“ actset ”, 简称为“ acts”, 简称为“ actrated $\mathsf{C}- setrights”。 ” 。 这些配方程式是从先前的代数数据库工作中衍生出来的 。 acsetts是图表和数据框架的共同统称。 我们还包含一个更精细的图形类对象, 如带图和带有标准常数的图。 我们开发了一个数学理论, 并随后描述朱利亚语言可比较化的功能。