unknownrate#

add2set_#

gunfolds.solvers.unknownrate.add2set_(ds, H, cp, ccf, iter=1, verbose=True, capsize=100)[source]#
Parameters:
  • ds

  • H

  • cp

  • ccf

  • iter

  • verbose

  • capsize

Returns:

Return type:

add2set_loop#

gunfolds.solvers.unknownrate.add2set_loop(ds, H, cp, ccf, iter=1, verbose=True, capsize=100, currsize=0)[source]#
Parameters:
  • ds

  • H

  • cp

  • ccf

  • iter

  • verbose

  • capsize

  • currsize

Returns:

Return type:

allsloops#

gunfolds.solvers.unknownrate.allsloops(n, asl=None)[source]#
Parameters:
  • n ((GUESS)integer) –

  • asl

Returns:

Return type:

bconflictor#

gunfolds.solvers.unknownrate.bconflictor(e, H)[source]#
Parameters:
  • e

  • H

Returns:

Return type:

build_loop_step#

gunfolds.solvers.unknownrate.build_loop_step(ds, loop, n, iter=1)[source]#
Parameters:
  • ds

  • loop

  • n

  • iter

Returns:

Return type:

cacheconflicts#

gunfolds.solvers.unknownrate.cacheconflicts(num, cache)[source]#

Given a number representation of a graph and an iterable of conflicting subgraphs return True if the graph conflicts with any of them and false otherwise

Parameters:
  • num – the number representation of a graph

  • cache – an iterable of number representations of conflicting graphs

Returns:

Return type:

conflictor#

gunfolds.solvers.unknownrate.conflictor(e, H)[source]#
Parameters:
  • e

  • H

Returns:

Return type:

conflictor_set#

gunfolds.solvers.unknownrate.conflictor_set(H)[source]#
Parameters:

H

Returns:

Return type:

conflictors#

gunfolds.solvers.unknownrate.conflictors(H)[source]#
Parameters:

H

Returns:

Return type:

confpairs#

gunfolds.solvers.unknownrate.confpairs(H)[source]#
Parameters:

H

Returns:

Return type:

del_loop#

gunfolds.solvers.unknownrate.del_loop(ds, H, iter=0)[source]#
Parameters:
  • ds

  • H

  • iter

Returns:

Return type:

delAloop#

gunfolds.solvers.unknownrate.delAloop(g, loop)[source]#
Parameters:
  • g – (GUESS)graph that generates the loop

  • g

  • loop – (GUESS)the reference loop

Returns:

Return type:

e2num#

gunfolds.solvers.unknownrate.e2num(e, n)[source]#
Parameters:
  • e

  • n

Returns:

Return type:

ekey2e#

gunfolds.solvers.unknownrate.ekey2e(ekey, n)[source]#
Parameters:
  • ekey

  • n

Returns:

Return type:

forward_loop_match#

gunfolds.solvers.unknownrate.forward_loop_match(loop, n)[source]#

Start with an empty graph and keep adding simple loops until the loop is generated at some undersampling rate

Parameters:
  • loop – binary encoding of the loop

  • n – number of nodes in the graph

Returns:

Return type:

gen_loops#

gunfolds.solvers.unknownrate.gen_loops(n)[source]#
Parameters:

n ((GUESS)integer) –

Returns:

Return type:

iteqclass#

gunfolds.solvers.unknownrate.iteqclass(H, verbose=True, capsize=100)[source]#

Find all graphs in the same equivalence class with respect to graph H and any undesampling rate.

Parameters:
  • H

  • verbose

  • capsize

Returns:

Return type:

lconflictors#

gunfolds.solvers.unknownrate.lconflictors(H, sloops=None)[source]#
Parameters:
  • H

  • sloops

Returns:

Return type:

lconfpairs#

gunfolds.solvers.unknownrate.lconfpairs(H, cap=10, sloops=None)[source]#
Parameters:
  • H

  • cap

  • sloops

Returns:

Return type:

le2num#

gunfolds.solvers.unknownrate.le2num(elist, n)[source]#
Parameters:
  • elist – list of edges to check

  • n

Returns:

Return type:

liteqclass#

gunfolds.solvers.unknownrate.liteqclass(H, verbose=True, capsize=100, asl=None)[source]#

Find all graphs in the same equivalence class with respect to graph H and any undesampling rate.

Parameters:
  • H

  • verbose

  • capsize

  • asl

Returns:

Return type:

loop2graph#

gunfolds.solvers.unknownrate.loop2graph(l, n)[source]#
Parameters:
  • l ((GUESS)integer) –

  • n ((GUESS)integer) –

Returns:

Return type:

main#

gunfolds.solvers.unknownrate.main()[source]#

matchAloop#

gunfolds.solvers.unknownrate.matchAloop(loop, n)[source]#

Returns a set of minimal graphs that generate this loop

Parameters:
  • loop – binary encoding of the loop

  • n – number of nodes in the graph

Returns:

Return type:

perm_circular#

gunfolds.solvers.unknownrate.perm_circular(l, cp=None)[source]#
Parameters:
  • l ((GUESS)integer) –

  • cp

Returns:

Return type:

prune_conflicts#

gunfolds.solvers.unknownrate.prune_conflicts(H, g, elist)[source]#

Checks if adding an edge from the list to graph g causes a conflict with respect to H and if it does removes the edge from the list

Parameters:
  • H – the undersampled graph

  • g – a graph under construction

  • elist – list of edges to check

Returns:

Return type:

prune_loops#

gunfolds.solvers.unknownrate.prune_loops(loops, H)[source]#
Parameters:
  • loops

  • H

Returns:

Return type:

reverse#

gunfolds.solvers.unknownrate.reverse(H, verbose=True, capsize=1000)[source]#
Parameters:
  • H

  • verbose

  • capsize

Returns:

Return type:

reverse_edge_match#

gunfolds.solvers.unknownrate.reverse_edge_match(g, loop)[source]#

Start with a graph and keep removing loops while the loop is still matched

Parameters:
  • g – graph that generates the loop

  • g

  • loop – the reference loop

Returns:

Return type:

reverse_loop_match#

gunfolds.solvers.unknownrate.reverse_loop_match(g, loop)[source]#

Start with a graph and keep removing loops while the loop is still matched

Parameters:
  • g – graph that generates the loop

  • g

  • loop – the reference loop

Returns:

Return type:

skip_conflict#

gunfolds.solvers.unknownrate.skip_conflict(g1, g2, ds)[source]#
Parameters:
  • g1

  • g2

  • ds

Returns:

Return type:

skip_conflictors#

gunfolds.solvers.unknownrate.skip_conflictors(gnum, ccf)[source]#
Parameters:
  • gnum

  • ccf

Returns:

Return type:

start_progress_bar#

gunfolds.solvers.unknownrate.start_progress_bar(iter, n, verbose=True)[source]#
Parameters:
  • iter

  • n

  • verbose

Returns:

Return type: