ACSet

semagrams.acsets.ACSet
See theACSet companion object
case class ACSet(schema: Schema, props: PropMap, partsMap: Map[Ob, PartSet])

A nested acset.

Attributes

partsMap

the PartSet object for each Ob in the schema. This is where the subacsets are stored.

props

the top-level properties. The values of morphisms, attributes, and generic Propertys are stored here. We don't need what in Catlab we call "subparts"; it's folded into this. For instance, if this is the subacset for an edge, then the source and target are stored here.

schema

the schema that the acset conforms to

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addPart(p: Part, x: Ob, init: ACSet): (ACSet, Part)

Adds a part of type x to the subacset at p with initial subacset init

Adds a part of type x to the subacset at p with initial subacset init

Attributes

def addPart(p: Part, x: Ob, props: PropMap): (ACSet, Part)

Convenience overload of addPart

Convenience overload of addPart

Attributes

def addPart(x: Ob, props: PropMap): (ACSet, Part)

Convenience overload of addPart

Convenience overload of addPart

Attributes

def addPart(x: Ob, init: ACSet): (ACSet, Part)

Convenience overload of addPart

Convenience overload of addPart

Attributes

def addPart(p: Part, x: Ob): (ACSet, Part)

Convenience overload of addPart

Convenience overload of addPart

Attributes

def addPart(x: Ob): (ACSet, Part)

Convenience overload of addPart

Convenience overload of addPart

Attributes

def addParts(p: Part, x: Ob, inits: Seq[ACSet]): (ACSet, Seq[Part])

Add several parts of type x to the subacset at p with initial subacsets given by inits.

Add several parts of type x to the subacset at p with initial subacsets given by inits.

Attributes

def addPartsProps(p: Part, x: Ob, props: Seq[PropMap]): (ACSet, Seq[Part])

Convenience overload of addParts

Convenience overload of addParts

Attributes

def addProps(newProps: PropMap): ACSet

Add the properties in newProps to the top-level properties.

Add the properties in newProps to the top-level properties.

Attributes

def allProps(p: Part): Set[Property]
def hasPart(p: Part): Boolean

Check if a nested part exists in the ACSet

Check if a nested part exists in the ACSet

Attributes

def hasSubpart(f: Property, i: Part): Boolean

Check if the part i has property f

Check if the part i has property f

Attributes

def incident(p: Part, f: Hom): Seq[Part]

Return sequence of the parts that have property f set to p

Return sequence of the parts that have property f set to p

Attributes

Move the part p to the front of its parent PartSet. See PartSet.moveFront.

Move the part p to the front of its parent PartSet. See PartSet.moveFront.

Attributes

def moveToIndex(p: Part, idx: Int): ACSet

Move the part p to the front of its parent PartSet. See PartSet.moveFront.

Move the part p to the front of its parent PartSet. See PartSet.moveFront.

Attributes

def parts(i: Part, x: Ob): Seq[(Part, ACSet)]

Return all of the parts of the subacset at i with type x, along with their corresponding subacsets.

Return all of the parts of the subacset at i with type x, along with their corresponding subacsets.

Attributes

def partsOnly(i: Part, x: Ob): Seq[Part]

Return all of the parts of the subacset at i with type x, without subacsets

Return all of the parts of the subacset at i with type x, without subacsets

Attributes

def remPart(p: Part): ACSet

Remove a part and all of the other parts that refer to it.

Remove a part and all of the other parts that refer to it.

Attributes

Remove a part, but not any of the other parts that might refer to it.

Remove a part, but not any of the other parts that might refer to it.

Attributes

def remParts(ps: Seq[Part]): ACSet

Remove all of the parts in ps

Remove all of the parts in ps

Attributes

Unset the property f of p

Unset the property f of p

Attributes

def scale(from: Complex, to: Complex, scaleProps: Seq[Property { type Value = Complex; }]): ACSet
def setSubacset(p: Part, acs: ACSet): ACSet

Set the subacset for a nested part

Set the subacset for a nested part

Attributes

Set the property f of part p to v

Set the property f of part p to v

Attributes

Set the property f of part p to v

Set the property f of part p to v

Attributes

Get the subacset corresponding to a nested part; error if invalid

Get the subacset corresponding to a nested part; error if invalid

Attributes

def subpart(f: Property, i: Part): Value

Get the value of f at the part i; errors if unset.

Get the value of f at the part i; errors if unset.

Attributes

def trySubacset(p: Part): Option[ACSet]

Get the subacset corresponding to a nested part; return None if invalid

Get the subacset corresponding to a nested part; return None if invalid

Attributes

def trySubpart(f: Property, i: Part): Option[Value]

Get the value of f at the part i; returns None if unset.

Get the value of f at the part i; returns None if unset.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product