remove insert and delete

This commit is contained in:
eason 2023-12-21 14:00:49 +08:00
parent 37ca8ca5bf
commit 9a4de9225d
5 changed files with 2952 additions and 2989 deletions

5923
a.txt

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -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 .

View File

@ -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;

View File

@ -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);
}