remove insert and delete
This commit is contained in:
parent
37ca8ca5bf
commit
9a4de9225d
BIN
homework_11
BIN
homework_11
Binary file not shown.
3
justfile
3
justfile
|
@ -15,7 +15,8 @@ release:
|
|||
run:
|
||||
cmake -DCMAKE_C_FLAGS="-fstandalone-debug" -DCMAKE_BUILD_TYPE=Debug -C clang-cmakeinit.cmake .
|
||||
make VERBOSE=1
|
||||
./homework_11
|
||||
rm a.txt
|
||||
./homework_11 > a.txt
|
||||
|
||||
mem-test:
|
||||
cmake -DCMAKE_C_FLAGS="-fsanitize=address -fstandalone-debug" -DCMAKE_BUILD_TYPE=Debug -C clang-cmakeinit.cmake .
|
||||
|
|
|
@ -15,8 +15,8 @@ int main()
|
|||
input(&state);
|
||||
length_distribution(&state);
|
||||
segment(&state);
|
||||
prefix_insert(&state);
|
||||
prefix_delete(&state);
|
||||
// prefix_insert(&state);
|
||||
// prefix_delete(&state);
|
||||
search(&state);
|
||||
|
||||
return 0;
|
||||
|
|
11
src/v3.c
11
src/v3.c
|
@ -130,9 +130,10 @@ void search(struct State* state){
|
|||
|
||||
record_start
|
||||
|
||||
freq++;
|
||||
|
||||
if(reduce_submask(mask)){
|
||||
struct Node* ll=hash_pop(state->hashmap,mask);
|
||||
freq++;
|
||||
|
||||
record_end("search.csv")
|
||||
|
||||
|
@ -142,13 +143,7 @@ void search(struct State* state){
|
|||
else printf("failed\n");
|
||||
hash_insert(state->hashmap,mask,ll);
|
||||
}else{
|
||||
struct Node* ll=state->head;
|
||||
|
||||
freq++;
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
if (xor_contain(ll,ip,eq_v3)) printf("successful\n");
|
||||
if (xor_contain(state->head,ip,eq_v3)) printf("successful\n");
|
||||
else printf("failed\n");
|
||||
free(mask);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue