src/hmisc/extra/treediff/mapping_store

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Mapping = tuple[first, second: Tree]
  Source   Edit
MappingStore = ref object
  src*, dst*: Tree
  srcToDst, dstToSrc: Table[Tree, Tree]
  Source   Edit
MultiMappingStore = ref object
  srcToDsts*: Table[Tree, HashSet[Tree]]
  dstToSrcs*: Table[Tree, HashSet[Tree]]
  Source   Edit

Procs

proc `$`(this: MappingStore): string {....raises: [ValueError, Exception,
    NilArgumentError], tags: [RootEffect].}
  Source   Edit
proc addMapping(this: MappingStore; src: Tree; dst: Tree): void {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc addMapping(this: MultiMappingStore; src: Tree; dst: Tree): void {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc addMappingRecursively(this: MappingStore; src: Tree; dst: Tree): void {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc allMappedDsts(this: MultiMappingStore): HashSet[Tree] {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc allMappedSrcs(this: MultiMappingStore): HashSet[Tree] {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc areBothUnmapped(this: MappingStore; src: Tree; dst: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc areDstsUnmapped(this: MappingStore; dsts: seq[Tree]): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc areSrcsUnmapped(this: MappingStore; srcs: seq[Tree]): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc getDstForSrc(this: MappingStore; src: Tree): Tree {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc getDsts(this: MultiMappingStore; src: Tree): HashSet[Tree] {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc getMappings(this: MultiMappingStore): HashSet[Mapping] {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc getSrcForDst(this: MappingStore; dst: Tree): Tree {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc getSrcs(this: MultiMappingStore; dst: Tree): HashSet[Tree] {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc has(this: MappingStore; src: Tree; dst: Tree): bool {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc has(this: MultiMappingStore; src: Tree; dst: Tree): bool {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc hasDst(this: MultiMappingStore; dst: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc hasSrc(this: MultiMappingStore; src: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc hasUnmappedDstChildren(this: MappingStore; t: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc hasUnmappedSrcChildren(this: MappingStore; t: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc isDstMapped(this: MappingStore; dst: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc isDstUnique(this: MultiMappingStore; dst: Tree): bool {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc isMappingAllowed(this: MappingStore; src: Tree; dst: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc isSrcMapped(this: MappingStore; src: Tree): bool {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc isSrcUnique(this: MultiMappingStore; src: Tree): bool {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc newMapping(a, b: Tree): Mapping {....raises: [], tags: [].}
  Source   Edit
proc newMappingStore(ms: MappingStore): MappingStore {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc newMappingStore(src: Tree; dst: Tree): MappingStore {.
    ...raises: [NilArgumentError], tags: [].}
  Source   Edit
proc newMultiMappingStore(): MultiMappingStore {....raises: [], tags: [].}
  Source   Edit
proc newMultiMappingStore(mappings: HashSet[Mapping]): MultiMappingStore {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc pprint(this: MappingStore) {....raises: [NilArgumentError, ImplementKindError,
    ImplementError, ValueError, Exception, ArgumentError, KeyError,
    NoneArgumentError], tags: [RootEffect, ReadEnvEffect].}
  Source   Edit
proc removeMapping(this: MultiMappingStore; src: Tree; dst: Tree): void {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc size(this: MappingStore): int {....raises: [], tags: [].}
  Source   Edit
proc size(this: MultiMappingStore): int {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit
proc toString(this: MultiMappingStore): string {.
    ...raises: [NilArgumentError, KeyError, Exception, ValueError],
    tags: [RootEffect].}
  Source   Edit

Iterators

iterator items(this: MappingStore): Mapping {....raises: [], tags: [].}
  Source   Edit
iterator items(this: MultiMappingStore): Mapping {.
    ...raises: [NilArgumentError, KeyError, Exception], tags: [RootEffect].}
  Source   Edit