def template_dynamic(num_osc, own_weight = -3, neigh_weight = -1, initial_states = None, initial_outputs = None, steps = 1000, time = 10):
    network = hysteresis_network(num_osc, own_weight, neigh_weight);
    
    if (initial_states is not None):
        network.states = initial_states;
        
    if (initial_outputs is not None):
        network.outputs = initial_outputs;
    
    output_dynamic = network.simulate(steps, time);
    hysteresis_visualizer.show_output_dynamic(output_dynamic);
    
    ensembles = output_dynamic.allocate_sync_ensembles(tolerance = 0.5, threshold_steps = 5);
    print("Allocated synchronous ensembles ( amout:", len(ensembles), "):", ensembles);
def template_dynamic(num_osc,
                     own_weight=-3,
                     neigh_weight=-1,
                     initial_states=None,
                     initial_outputs=None,
                     steps=1000,
                     time=10):
    network = hysteresis_network(num_osc, own_weight, neigh_weight)

    if (initial_states is not None):
        network.states = initial_states

    if (initial_outputs is not None):
        network.outputs = initial_outputs

    output_dynamic = network.simulate(steps, time)
    hysteresis_visualizer.show_output_dynamic(output_dynamic)

    ensembles = output_dynamic.allocate_sync_ensembles(tolerance=0.5,
                                                       threshold_steps=5)
    print("Allocated synchronous ensembles ( amout:", len(ensembles), "):",
          ensembles)