📄 myset.h
字号:
#ifndef MY_SET_H
#define MY_SET_H
#include "myafx.h"
#include "MyHash.h"
// Set
// The sets with same values has a same handler
typedef struct MySet {
size_t size; // char size of the set
size_t count; // number of members in the set
void** set; // end by NULL
} SET;
typedef struct MySetFactory {
void** temp_set_space;
size_t temp_set_space_size;
HASH_TABLE* set_hash_table;
} SET_FACTORY;
SET_FACTORY* initialize_set_factory();
void release_set_factory( SET_FACTORY* f );
// new set
SET* new_set( SET_FACTORY* factory, void** set, size_t count);
// new set which contains two element
SET* new_set( SET_FACTORY* factory, void* n1, void* n2 );
// new set which contains one element
SET* new_set( SET_FACTORY* factory, void* n1 );
// union two set
SET* union_set( SET_FACTORY* factory, SET* s1, SET* s2 );
// union a set and a sorted list
SET* union_set( SET_FACTORY* factory, SET* s1, void** set, size_t count );
// find a set handler
SET* find_set( SET_FACTORY* factory, void** set, size_t count );
REG_EXPORT void PrintSet ( SET* s );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -