Struct qmc::sse::fast_ops::FastOpsTemplate[][src]

pub struct FastOpsTemplate<O: Op, ALLOC: FastOpAllocator = DefaultFastOpAllocator> { /* fields omitted */ }
Expand description

A fast op container.

Implementations

A new manager which can handle nvars and is optimized for nbonds, will allocate memory using the given allocator.

A new manager which can handle nvars and is optimized for nbonds.

New manager which can handle nvars

Make a new Manager from an interator of ops, and number of variables.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Flip each cluster in the graph using an rng instance, add to state changes in acc. Use this version if there’s ising symmetry in your graph. Returns the number of cluster found. Read more

Flip each cluster in the graph using an rng instance, add to state changes in acc. You can provide a function to adjust the weights for flipping each cluster based off the nodes within it. Edges of the cluster will always be constant ops but the total weight change inside the cluster will affect the probability of acceptance (multiplied by a global prob for each cluster). This function should take a node reference and return the ratio of the new weight divided by old weight if a global spin flip were to take place. Read more

Find a site with a constant op.

Called after an update.

Formats the value using the given formatter. Read more

Count the number of diagonal and offdiagonal ops. Sum is self.get_n()

Count the number of constant ops.

The type required for mutating p values.

Mutate a single p value.

Mutate using a restricted prange and args. Allows for running on smaller subsections of the variables. Read more

Mutate ops using a restricted prange and args. Allows for running on smaller subsections of the variables. Read more

Get empty args for a subsection of variables, or from an existing set of args (does not clear).

Get the args required for mutation.

Use a list of ps to make args. Hint provides up to one ps per var in order. Read more

Returns arg made for the mutation

Get the substate at p using ps to set values. Hint provides up to one ps per var in order. substate should start in p=0 configuration. Read more

Iterate over ops at indices less than or equal to p. Applies function f_at_p only to the op at p. Applies f to all other ops above p. Read more

Folds across the p values, passing T down. Mutates op if returned values is Some(…)

Mutate only the ops. Override with more efficient solutions if needed.

Iterate through the ops and call f. Exit early with Err(v).

Iterate through ops only. Can override with more efficient implementation.

Iterate through the ops and call f.

Iterate through ops only. Calls try_iterate_ops by default. Read more

Perform a diagonal update step with thread rng.

Perform a diagonal update step.

Perform a diagonal update step using in place edits to state.

Called after an update.

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Get an instance of T

Return an instance of T

Perform a single heatbath update.

Perform a single heatbath update.

Perform a single heatbath update.

Make the bond weights struct for this container.

Perform a single heatbath update.

The type used to contain the Op and handle movement around the worldlines.

Get a ref to a node at position p

Get a mutable ref to the node at position p

Get the first occupied p if it exists.

Get the last occupied p if it exists.

Get the first p occupied which covers variable var, also returns the relative index.

Get the last p occupied which covers variable var, also returns the relative index.

Get the previous occupied p compared to node.

Get the next occupied p compared to node.

Get the previous p for a given var, takes the relative var index in node. Also returns the new relative var index. Read more

Get the next p for a given var, takes the relative var index in node. Also returns the new relative var index. Read more

Get the nth occupied p.

Get the previous p for a given var.

Get the next p for a given var.

Returns if a given variable is covered by any ops.

Make a loop update to the graph with thread rng.

Make a loop update to the graph.

Called after an update.

The op object to manage.

Get the cutoff for this container.

Set the cutoff for this container.

Get the number of non-identity ops.

Get the number of managed variables.

Get the pth op, None is identity.

Gets the count of bond ops in the graph.

Iterate through the imaginary time states of the opcontainer.

Verify the integrity of the OpContainer.

Make a new container for nvars.

Make a new container for nvars giving a hint as to the number of bonds.

Fill ps with the p values of constant (Hij=k) ops for a given var. An implementation by the same name is provided for LoopUpdaters Read more

Fill ps with the p values of spin flips for a given var. An implementation by the same name is provided for LoopUpdaters Read more

Perform a resonating bond update. edges lists all the 2-site bonds which define the lattice. state is the propagated state at time 0. updates is the number of updated to perform. diagonal_edge_hamiltonian gives the weight of a diagonal edge given a spin state. rng prng instance to use. Read more

Perform a resonating bond update. edges lists all the 2-site bonds which define the lattice. state is the propagated state at time 0. updates is the number of updated to perform. diagonal_edge_hamiltonian gives the weight of a diagonal edge given a spin state. ising_ratio provides the weight ratio of a node after a global ising flip to current. rng prng instance to use. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.