Unverified Commit 62dd5f96 authored by dwuggh's avatar dwuggh
Browse files

add simple example

parent 435e1c8b
use surfcode_rs::*;
use rayon::prelude::*;
use utils::load_arr;
use controller::*;
fn main() {
env_logger::init();
let xn = 8;
let zm = 8;
let pm = 0.01;
let mut m_correct = vec![0.; 256];
let mut m_error = vec![0.; 256];
m_correct[0] = 1. - pm;
m_error[0] = pm;
let measure_model = error::MeasureNoiseModel::new(m_correct, m_error);
loop {
println!("\n\n---------------------------------\n\n");
let result = runner2(xn, zm, 2, measure_model.clone());
if result == 0 {
break;
}
}
}
pub mod algo;
pub mod controller;
pub mod error;
pub mod model;
pub mod utils;
mod algo; use surfcode_rs::*;
mod controller;
mod error;
mod model;
mod utils;
use clap::{App, Arg}; use clap::{App, Arg};
use rayon::prelude::*; use rayon::prelude::*;
use controller::*; use controller::*;
use crate::utils::load_arr; use utils::load_arr;
fn main() { fn main() {
std::env::set_var("LD_LIBRARY_PATH", "bin/"); std::env::set_var("LD_LIBRARY_PATH", "bin/");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment