Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ranadeep Biswas
dbcop
Commits
e0e46b89
Commit
e0e46b89
authored
Dec 13, 2019
by
Ranadeep Biswas
Browse files
std::collections
parent
a9780d44
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/consistency/algo.rs
View file @
e0e46b89
use
hashbrown
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
use
consistency
::
util
::{
ConstrainedLinearization
,
DiGraph
};
...
...
src/consistency/sat.rs
View file @
e0e46b89
use
hashbrown
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
use
std
::
fs
;
use
std
::
fs
::{
File
,
OpenOptions
};
...
...
src/consistency/util.rs
View file @
e0e46b89
...
...
@@ -2,7 +2,7 @@ use std::cmp::{Eq, Ord};
use
std
::
fmt
::
Debug
;
use
std
::
hash
::
Hash
;
use
hashbrown
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
use
std
::
collections
::
VecDeque
;
...
...
src/db/history.rs
View file @
e0e46b89
use
std
::
fmt
;
use
hashbrown
::
HashMap
;
use
std
::
collections
::
HashMap
;
use
rand
::
distributions
::{
Distribution
,
Uniform
};
use
rand
::
Rng
;
...
...
@@ -162,8 +162,8 @@ pub fn generate_single_history(
let
jump
=
(
n_variable
as
f64
/
n_node
as
f64
)
.ceil
()
as
usize
;
(
0
..
n_node
)
.map
(|
i_node
|
{
let
i
=
i_node
*
jump
;
let
j
=
std
::
cmp
::
min
((
i_node
+
1
)
*
jump
,
n_variable
);
//
let i = i_node * jump;
//
let j = std::cmp::min((i_node + 1) * jump, n_variable);
// let write_variable_range = Uniform::from(i..j);
(
0
..
n_transaction
)
.map
(|
_
|
Transaction
{
...
...
src/lib.rs
View file @
e0e46b89
extern
crate
ansi_term
;
extern
crate
rand
;
extern
crate
chrono
;
extern
crate
rayon
;
extern
crate
hashbrown
;
extern
crate
petgraph
;
pub
mod
consistency
;
pub
mod
db
;
pub
mod
verifier
;
...
...
src/verifier/mod.rs
View file @
e0e46b89
use
hashbrown
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
// use std::fs;
use
std
::
fs
::
File
;
use
std
::
io
::
{
Buf
Write
r
,
Write
}
;
use
std
::
io
::
Write
;
use
std
::
path
::
PathBuf
;
use
consistency
::
sat
::
Sat
;
...
...
src/verifier/util.rs
View file @
e0e46b89
use
hashbrown
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
use
std
::
fmt
::
Debug
;
use
std
::
hash
::
Hash
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment