pub trait LatticeState<const D: usize> {
const CA: Real;
// Required methods
fn link_matrix(&self) -> &LinkMatrix;
fn set_link_matrix(&mut self, link_matrix: LinkMatrix);
fn lattice(&self) -> &LatticeCyclic<D>;
fn beta(&self) -> Real;
fn hamiltonian_links(&self) -> Real;
// Provided methods
fn monte_carlo_step<M>(self, m: &mut M) -> Result<Self, M::Error>
where Self: Sized,
M: MonteCarlo<Self, D> + ?Sized { ... }
fn average_trace_plaquette(&self) -> Option<Complex> { ... }
}Expand description
Trait to represent a pure gauge lattice state of dimension D.
It defines only one field: link_matrix of type LinkMatrix.
§Example
They are many examples throughout the carte see by instance
super::monte_carlo::hybrid_monte_carlo.
Required Associated Constants§
Required Methods§
Sourcefn link_matrix(&self) -> &LinkMatrix
fn link_matrix(&self) -> &LinkMatrix
Get the link matrices of this state.
This is the field that stores the link matrices.
§Example
use lattice_qcd_rs::lattice::{DirectionEnum, LatticePoint};
use lattice_qcd_rs::simulation::{LatticeState, LatticeStateDefault};
let point = LatticePoint::new_zero();
let state = LatticeStateDefault::<4>::new_cold(1_f64, 10_f64, 4)?;
let _plaquette = state.link_matrix().pij(
&point,
&DirectionEnum::XPos.into(),
&DirectionEnum::YPos.into(),
state.lattice(),
);Sourcefn set_link_matrix(&mut self, link_matrix: LinkMatrix)
fn set_link_matrix(&mut self, link_matrix: LinkMatrix)
Replace the links matrices with the given input. It should panic if link matrix is not of the correct size.
§Panic
Panic if the length of link_matrix is different from
lattice.get_number_of_canonical_links_space()
Sourcefn lattice(&self) -> &LatticeCyclic<D>
fn lattice(&self) -> &LatticeCyclic<D>
Get the lattice into which the state exists.
Sourcefn hamiltonian_links(&self) -> Real
fn hamiltonian_links(&self) -> Real
Returns the Hamiltonian of the links configuration.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<State, const D: usize> LatticeState<D> for LatticeStateEFSyncDefault<State, D>where
State: LatticeState<D> + ?Sized,
impl<State, const D: usize> LatticeState<D> for LatticeStateEFSyncDefault<State, D>where
State: LatticeState<D> + ?Sized,
Source§impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>
We just transmit the function of State, there is nothing new.
impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>
We just transmit the function of State, there is nothing new.