├── Topic-Aware-IM ├── src │ ├── PMIA_control.txt │ ├── time_PMIA_0100.txt │ ├── py_dependencies.txt │ ├── tests.sh │ ├── global.h │ ├── experiments │ ├── kmeans.sh │ ├── offline.sh │ ├── tests.cpp │ ├── Makefile │ ├── SPT_new_0100.txt │ ├── GC_PMIA_0100.txt │ ├── experiments.out │ ├── kmeans.py │ ├── tic.h │ ├── tim.h │ ├── experiments.cpp │ ├── offline.cpp │ ├── tic.cpp │ └── lastfm.list └── PMIA │ ├── time_PMIA_0020.txt │ ├── PMIA_control.txt │ ├── Code │ ├── limit.h │ ├── random.h │ ├── SPM_gc.h │ ├── greedy.h │ ├── general_cascade.h │ ├── SP1M_gc.h │ ├── degree.h │ ├── independ_cascade.h │ ├── weighteddegree.h │ ├── degreediscount_ic.h │ ├── pagerank.h │ ├── random.cpp │ ├── graph.h │ ├── mia.h │ ├── pmia.h │ ├── degreediscount_ic.cpp │ ├── degree.cpp │ ├── independ_cascade.cpp │ ├── general_cascade.cpp │ ├── weightedegree.cpp │ ├── SPM_gc.cpp │ ├── SP1M_gc.cpp │ ├── greedy.cpp │ ├── main.cpp │ ├── mia.cpp │ └── graph.cpp │ ├── SPT_new_0020.txt │ ├── GC_PMIA_0020.txt │ └── dm.inf.loc └── Location-Aware-IM ├── queries_prototype ├── mip ├── limit.cpp ├── general_cascade.h ├── heap.h ├── graph.h ├── Makefile ├── bench ├── Cache.h ├── limit.h ├── general_cascade.cpp ├── Quadtree.h ├── pmia_upgrade.h ├── heap.cpp ├── Cache.cpp ├── mip.h ├── graph.cpp └── Quadtree.cpp /Topic-Aware-IM/src/PMIA_control.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/time_PMIA_0100.txt: -------------------------------------------------------------------------------- 1 | 39328 2 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/time_PMIA_0020.txt: -------------------------------------------------------------------------------- 1 | 1.00547e+06 2 | -------------------------------------------------------------------------------- /Location-Aware-IM/queries_prototype: -------------------------------------------------------------------------------- 1 | 1 2 | 0.0 0.0 0.51 0.51 5 3 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/py_dependencies.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | scikit-learn 3 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/PMIA_control.txt: -------------------------------------------------------------------------------- 1 | 1.00547e+06 98.8935 20 9011.06 2 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/tests.sh: -------------------------------------------------------------------------------- 1 | make clean && make tests 2 | ./tests > tests.out 3 | -------------------------------------------------------------------------------- /Location-Aware-IM/mip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TsinghuaDatabaseGroup/SocialInfluenceMaximization/HEAD/Location-Aware-IM/mip -------------------------------------------------------------------------------- /Topic-Aware-IM/src/global.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBAL_H 2 | #define GLOBAL_H 3 | 4 | #define VERBOSE 5 | #define EXP 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/experiments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TsinghuaDatabaseGroup/SocialInfluenceMaximization/HEAD/Topic-Aware-IM/src/experiments -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/limit.h: -------------------------------------------------------------------------------- 1 | #ifndef LIMIT_H 2 | #define LIMIT_H 3 | 4 | #define MAX_NODE 40000 5 | #define MAX_EDGE 500000 6 | #define MAX_K 100 7 | 8 | #define STR_LEN 200 9 | 10 | #define NUM_ITER 2000 11 | #define SET_SIZE 200 12 | #define EPS 1e-10 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Location-Aware-IM/limit.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "limit.h" 3 | 4 | vector Args::is_native(MAX_NODE, false); 5 | vector Args::is_cdd(MAX_NODE, false); 6 | int Args::MAX_QK = 5000; 7 | int Args::MAX_CK = 5000; 8 | int Args::MIN_CK = 10; 9 | int Args::CACHE_RATIO = 10; 10 | int Args::CAPACITY = 500; 11 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/random.h: -------------------------------------------------------------------------------- 1 | #ifndef RANDOM_H 2 | #define RANDOM_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class Random 9 | { 10 | private: 11 | static int n; 12 | static vector list; 13 | static char file[STR_LEN]; 14 | 15 | public: 16 | static void Build(); 17 | static void BuildFromFile(); 18 | static int GetNode(int i); 19 | }; 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/SPM_gc.h: -------------------------------------------------------------------------------- 1 | #ifndef SPM_GC_H 2 | #define SPM_GC_H 3 | 4 | #include "limit.h" 5 | 6 | class SPM_gc 7 | { 8 | private: 9 | static int n, m; 10 | static int targetSize; 11 | static double resultSize; 12 | static int target[MAX_NODE]; 13 | static bool built; 14 | 15 | public: 16 | static void Build(); 17 | static void SetTarget(int size, int set[]); 18 | static double Run(int itr_num, int size, int set[]); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Location-Aware-IM/general_cascade.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERAL_CASCADE_H 2 | #define GENERAL_CASCADE_H 3 | 4 | #include "limit.h" 5 | 6 | class GeneralCascade 7 | { 8 | private: 9 | static int n, m; 10 | static int targetSize; 11 | static int resultSize; 12 | static int target[MAX_K]; 13 | static bool built; 14 | 15 | public: 16 | static void Build(); 17 | static void SetTarget(int size, int set[]); 18 | static double Run(int num_iter, int size, int set[]); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/greedy.h: -------------------------------------------------------------------------------- 1 | #ifndef GREEDY_H 2 | #define GREEDY_H 3 | 4 | #include "limit.h" 5 | 6 | class Greedy 7 | { 8 | private: 9 | static int n; 10 | static int top; 11 | static double d[MAX_NODE]; 12 | static int list[MAX_NODE]; 13 | static char file[STR_LEN]; 14 | 15 | public: 16 | static void Build(int k, double (*Run)(int num_iter, int size, int set[])); 17 | static void BuildFromFile(const char*); 18 | static int GetNode(int i); 19 | }; 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/general_cascade.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERAL_CASCADE_H 2 | #define GENERAL_CASCADE_H 3 | 4 | #include "limit.h" 5 | 6 | class GeneralCascade 7 | { 8 | private: 9 | static int n, m; 10 | static int targetSize; 11 | static int resultSize; 12 | static int target[MAX_K]; 13 | static bool built; 14 | 15 | public: 16 | static void Build(); 17 | static void SetTarget(int size, int set[]); 18 | static double Run(int num_iter, int size, int set[]); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/SP1M_gc.h: -------------------------------------------------------------------------------- 1 | #ifndef SP1M_GC_H 2 | #define SP1M_GC_H 3 | 4 | #include "limit.h" 5 | 6 | class SP1M_gc 7 | { 8 | private: 9 | static int n, m; 10 | static int targetSize; 11 | static double resultSize; 12 | static int target[MAX_NODE]; 13 | static bool built; 14 | //static double ratio; 15 | 16 | public: 17 | static void Build(); 18 | static void SetTarget(int size, int set[]); 19 | static double Run(int itr_num, int size, int set[]); 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/degree.h: -------------------------------------------------------------------------------- 1 | #ifndef DEGREE_H 2 | #define DEGREE_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class Degree 9 | { 10 | private: 11 | static int n; 12 | static vector d; 13 | static int list[SET_SIZE]; 14 | static char file[STR_LEN]; 15 | 16 | static void qsort_degree(int h, int t); 17 | 18 | public: 19 | static void Build(); 20 | static void BuildFromFile(); 21 | static int GetNode(int i); 22 | }; 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/kmeans.sh: -------------------------------------------------------------------------------- 1 | # DATA=lastfm 2 | DATA=dblp 3 | # DATA=diggs 4 | # DATA=flixster 5 | ITEMSET_TRAIN='../data/'$DATA'.train.itemset' 6 | source ~/pyenv/taim/bin/activate 7 | 8 | for p in 1 5 10 15 20 9 | do 10 | UITEMSAMPLE='../data/'$DATA'.'$p'p.up.sample' 11 | LITEMSAMPLE='../data/'$DATA'.'$p'p.low.sample' 12 | N=`expr $p \* 80` 13 | echo "python kmeans.py $ITEMSET_TRAIN $LITEMSAMPLE $UITEMSAMPLE -i 100 -n $N -m 10" 14 | python kmeans.py $ITEMSET_TRAIN $LITEMSAMPLE $UITEMSAMPLE -i 100 -n $N -m 10 15 | done 16 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/independ_cascade.h: -------------------------------------------------------------------------------- 1 | #ifndef INDEPEND_CASCADE_H 2 | #define INDEPEND_CASCADE_H 3 | 4 | #include "limit.h" 5 | 6 | class IndependCascade 7 | { 8 | private: 9 | static int n, m; 10 | static int targetSize; 11 | static int resultSize; 12 | static int target[MAX_NODE]; 13 | static bool built; 14 | static double ratio; 15 | 16 | public: 17 | static void Build(double ratio); 18 | static void SetTarget(int size, int set[]); 19 | static double Run(int itr_num, int size, int set[]); 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/weighteddegree.h: -------------------------------------------------------------------------------- 1 | #ifndef WEIGHTED_DEGREE_H 2 | #define WEIGHTED_DEGREE_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class WeightedDegree 9 | { 10 | private: 11 | static int n; 12 | static vector d; 13 | static int list[SET_SIZE]; 14 | static char file[STR_LEN]; 15 | 16 | static void qsort_degree(int h, int t); 17 | 18 | public: 19 | static void Build(); 20 | static void BuildFromFile(); 21 | static int GetNode(int i); 22 | }; 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/offline.sh: -------------------------------------------------------------------------------- 1 | DATA=lastfm 2 | TEDGES='../data/'$DATA'.tedge' 3 | LIST='../data/'$DATA'.list' 4 | 5 | bound1=100 6 | bound2=10 # out neighbor bound 7 | k=50 8 | UITEMSAMPLE='../data/'$DATA'.up.sample' 9 | LITEMSAMPLE='../data/'$DATA'.low.sample' 10 | UBOUND='../data/'$DATA'.up.bound' 11 | LBOUND='../data/'$DATA'.low.bound' 12 | 13 | make clean && make offline 14 | ./offline -l $TEDGES $bound1 $bound2 $LIST 15 | # ./offline -us $TEDGES $LIST $bound1 $k $UITEMSAMPLE $UBOUND 16 | # ./offline -ls $TEDGES $LIST $bound1 $k $LITEMSAMPLE $LBOUND 17 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/degreediscount_ic.h: -------------------------------------------------------------------------------- 1 | #ifndef DEGREE_DISCOUNT_IC_H 2 | #define DEGREE_DISCOUNT_IC_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class DegreeDiscount_IC 9 | { 10 | private: 11 | static int n; 12 | static vector d; 13 | static int list[MAX_K]; 14 | static char file[STR_LEN]; 15 | 16 | // static void qsort_degree(int h, int t); 17 | 18 | public: 19 | static void Build(double ratio); 20 | static void BuildFromFile(); 21 | static int GetNode(int i); 22 | }; 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/SPT_new_0020.txt: -------------------------------------------------------------------------------- 1 | 50 2 | 80 46.5462 3 | 14 32.2645 4 | 69 24.8217 5 | 13 17.9615 6 | 30 15.8475 7 | 44 14.1464 8 | 89 12.597 9 | 84 12.1498 10 | 81 10.708 11 | 76 10.3243 12 | 53 9.59131 13 | 66 8.01092 14 | 57 6.87277 15 | 39 6.27185 16 | 12 5.47825 17 | 22 5.58628 18 | 2 5.17958 19 | 75 5.04102 20 | 77 4.6691 21 | 71 4.61424 22 | 88 4.30197 23 | 4 4.1985 24 | 82 3.91108 25 | 35 3.47004 26 | 60 3.31242 27 | 36 3.10628 28 | 18 3.07291 29 | 51 2.78365 30 | 70 2.61959 31 | 52 2.55866 32 | 21 2.43472 33 | 46 2.3681 34 | 33 2.28316 35 | 74 2.28718 36 | 26 2.20633 37 | 45 2.18729 38 | 9 2.09426 39 | 42 2.02417 40 | 87 1.91276 41 | 72 1.81697 42 | 40 1.77555 43 | 98 1.56551 44 | 90 1.67563 45 | 95 1.56603 46 | 15 1.55465 47 | 11 1.44691 48 | 20 1.4447 49 | 5 1.43782 50 | 8 1.3738 51 | 85 1.37113 52 | -------------------------------------------------------------------------------- /Location-Aware-IM/heap.h: -------------------------------------------------------------------------------- 1 | #ifndef HEAP_H 2 | #define HEAP_H 3 | 4 | #include 5 | 6 | class Heap { 7 | 8 | private: 9 | 10 | int *heap; 11 | int *idxHeap; // keep a vertex's index in vector heap. 12 | double *score; 13 | 14 | int end; 15 | bool isMax; 16 | int capacity; 17 | 18 | clock_t start; 19 | 20 | public: 21 | 22 | Heap(bool max, int capacity = 10); 23 | ~Heap(); 24 | 25 | double timer; // remember how much time wasted on self. 26 | int size(); 27 | 28 | bool empty(); 29 | void clear(); 30 | bool push(int key, double val); 31 | bool pop(int* key, double* val); 32 | bool top(int* key, double* val); 33 | double peek(int key); 34 | 35 | void print(); 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/GC_PMIA_0020.txt: -------------------------------------------------------------------------------- 1 | 01 89.302 2 | 02 89.812 3 | 03 89.895 4 | 04 90.307 5 | 05 90.9065 6 | 06 90.995 7 | 07 91.2835 8 | 08 91.4015 9 | 09 92.139 10 | 10 92.8095 11 | 11 92.934 12 | 12 93.401 13 | 13 93.381 14 | 14 93.6865 15 | 15 93.651 16 | 16 93.8575 17 | 17 93.957 18 | 18 93.9945 19 | 19 94.0235 20 | 20 94.63 21 | 21 95.687 22 | 22 96.0265 23 | 23 96.1525 24 | 24 96.205 25 | 25 97.2705 26 | 26 97.616 27 | 27 97.616 28 | 28 97.793 29 | 29 98.019 30 | 30 97.994 31 | 31 98.072 32 | 32 98.1505 33 | 33 98.1745 34 | 34 98.202 35 | 35 98.4755 36 | 36 98.5465 37 | 37 98.613 38 | 38 98.578 39 | 39 98.6675 40 | 40 98.6615 41 | 41 98.6755 42 | 42 98.6515 43 | 43 98.684 44 | 44 98.7345 45 | 45 98.742 46 | 46 98.738 47 | 47 98.725 48 | 48 98.895 49 | 49 98.8655 50 | 50 98.906 51 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/tests.cpp: -------------------------------------------------------------------------------- 1 | #include "tim.h" 2 | 3 | int main() { 4 | TIC::Build2TICFromFile("./lastfm.tedge"); 5 | TIC::Stats(); 6 | TIC::Print(); 7 | TIC::SaveConverter("./lastfm.cvt"); 8 | 9 | int vertex = 23; 10 | printf("%d's out neighbor\n", vertex); 11 | for (int i = 0; i < TIC::GetOutNeighbor(vertex); i++) { 12 | Edge e = TIC::GetOutEdge(vertex, i); 13 | printf("%d\t%d", e.u, e.v); 14 | for (int z = 0; z < TIC::GetZ(); z++) { 15 | printf("\t%lg", e.w[z]); 16 | } 17 | printf("\n"); 18 | } 19 | printf("%d's in neighbor\n", vertex); 20 | for (int i = 0; i < TIC::GetInNeighbor(vertex); i++) { 21 | Edge e = TIC::GetInEdge(vertex, i); 22 | printf("%d\t%d", e.u, e.v); 23 | for (int z = 0; z < TIC::GetZ(); z++) { 24 | printf("\t%lg", e.w[z]); 25 | } 26 | printf("\n"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Location-Aware-IM/graph.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAPH_H 2 | #define GRAPH_H 3 | 4 | #include 5 | #include "limit.h" 6 | #include 7 | 8 | using namespace std; 9 | 10 | struct Edge 11 | { 12 | int u,v; 13 | double w1,w2; 14 | }; 15 | 16 | class Graph 17 | { 18 | private: 19 | 20 | static int n; 21 | static int m; 22 | static bool edgesSorted; 23 | static vector degree; 24 | static vector index; 25 | static vector edges; 26 | 27 | static void qsort_edges(int h, int t); 28 | static void RemoveMultiPaths(); 29 | static void IndexNodesOnEdges(); 30 | 31 | public: 32 | 33 | static int GetN(); 34 | static int GetM(); 35 | static int GetDegree(int node); 36 | static int GetNeighbor(int node); 37 | static Edge GetEdge(int node, int idx); 38 | static void BuildWC(); 39 | static void Build2WC(); 40 | static void Build2WCFromFile(char* ); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/Makefile: -------------------------------------------------------------------------------- 1 | CC=g++ 2 | CFLAGS=-O3 -Wall -Wunused-result 3 | # CFLAGS=-g3 -Wall 4 | LDFLAGS=-lm 5 | TAGS=tests experiments offline 6 | target_tests=tic.o tim.o tests.o 7 | target_offline=tic.o tim.o offline.o 8 | target_experiments=tic.o tim.o experiments.o 9 | 10 | all:$(TAGS) 11 | 12 | experiments: $(target_experiments) 13 | $(CC) $(CFLAGS) $(target_experiments) -o experiments $(LDFLAGS) 14 | experiments.o: experiments.cpp 15 | $(CC) $(CFLAGS) -o experiments.o -c experiments.cpp 16 | 17 | tests: $(target_tests) 18 | $(CC) $(CFLAGS) $(target_tests) -o tests $(LDFLAGS) 19 | tests.o: tests.cpp 20 | $(CC) $(CFLAGS) -o tests.o -c tests.cpp 21 | 22 | offline: $(target_offline) 23 | $(CC) $(CFLAGS) $(target_offline) -o offline $(LDFLAGS) 24 | offline.o: offline.cpp 25 | $(CC) $(CFLAGS) -o offline.o -c offline.cpp 26 | 27 | tim.o: tim.cpp 28 | $(CC) $(CFLAGS) -o tim.o -c tim.cpp 29 | tic.o: tic.cpp 30 | $(CC) $(CFLAGS) -o tic.o -c tic.cpp 31 | clean: 32 | rm -rf *.o $(TAGS) 33 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/pagerank.h: -------------------------------------------------------------------------------- 1 | #ifndef PAGERANK_H 2 | #define PAGERANK_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class pagerank 9 | { 10 | private: 11 | static int n; 12 | static int top; 13 | //static int k; 14 | static double d[MAX_K]; 15 | static int list[MAX_K]; 16 | static char file[STR_LEN]; 17 | //static vector *neighbor; 18 | static vector dp; 19 | static vector dd; 20 | 21 | public: 22 | static double Build(int num, double dampen=0.15); 23 | //static double Build(int num, int k, int bound, double (*Run)(int num_iter, int size, int set[]), double (*RunFast)(int num_iter, int size, int set[])); 24 | static void BuildFromFile(); 25 | static int GetNode(int i); 26 | static int GetMax(int round); 27 | //static int GetMax0(int round); 28 | //static int generateSPT_newfrom(int round, int node); 29 | //static int generateSPT_newto(int node); 30 | //static char* filename(int bound); 31 | }; 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Location-Aware-IM/Makefile: -------------------------------------------------------------------------------- 1 | CC= g++ 2 | CFLAGS= -O3 -Wall 3 | # CFLAGS= -Wall -O0 -fno-inline -g 4 | LDFLAGS= -lm 5 | TAGS=mip 6 | target_mip= Quadtree.o heap.o Cache.o limit.o general_cascade.o graph.o pmia_upgrade.o mip.o main.o 7 | 8 | all:$(TAGS) 9 | 10 | mip: $(target_mip) 11 | $(CC) $(CFLAGS) $(target_mip) -o mip $(LDFLAGS) 12 | main.o: main.cpp 13 | $(CC) $(CFLAGS) -o main.o -c main.cpp 14 | mip.o: mip.cpp 15 | $(CC) $(CFLAGS) -o mip.o -c mip.cpp 16 | pmia_upgrade.o: pmia_upgrade.cpp 17 | $(CC) $(CFLAGS) -o pmia_upgrade.o -c pmia_upgrade.cpp 18 | graph.o: graph.cpp 19 | $(CC) $(CFLAGS) -o graph.o -c graph.cpp 20 | general_cascade.o: general_cascade.cpp 21 | $(CC) $(CFLAGS) -o general_cascade.o -c general_cascade.cpp 22 | limit.o: limit.cpp 23 | $(CC) $(CFLAGS) -o limit.o -c limit.cpp 24 | Cache.o: Cache.cpp 25 | $(CC) $(CFLAGS) -o Cache.o -c Cache.cpp 26 | heap.o: heap.cpp 27 | $(CC) $(CFLAGS) -o heap.o -c heap.cpp 28 | Quadtree.o: Quadtree.cpp 29 | $(CC) $(CFLAGS) -o Quadtree.o -c Quadtree.cpp 30 | clean: 31 | rm -rf *.o $(TAGS) 32 | -------------------------------------------------------------------------------- /Location-Aware-IM/bench: -------------------------------------------------------------------------------- 1 | cd data/ 2 | python pre2inf.py 3 | cd .. 4 | 5 | make clean && make 6 | 7 | ./mip -m 20 prototype < queries_prototype 8 | ./mip -a 20 prototype < queries_prototype 9 | ./mip -h 20 prototype < queries_prototype 10 | # ./mip -m 100 prototype < queries_prototype 11 | # ./mip -a 100 prototype < queries_prototype 12 | # ./mip -h 100 prototype < queries_prototype 13 | 14 | # ./mip -m 20 gowalla < queries 15 | # ./mip -m 20 foursquare < queries 16 | # ./mip -m 20 foursquare_extend < queries 17 | 18 | # ./mip -a 20 gowalla < queries 19 | # ./mip -a 20 foursquare < queries 20 | # ./mip -a 20 foursquare_extend < queries 21 | 22 | # ./mip -h 20 gowalla < queries 23 | # ./mip -h 20 foursquare < queries 24 | # ./mip -h 20 foursquare_extend < queries 25 | 26 | # ./mip -m 100 gowalla < queries 27 | # ./mip -m 100 foursquare < queries 28 | # ./mip -m 100 foursquare_extend < queries 29 | 30 | # ./mip -a 100 gowalla < queries 31 | # ./mip -a 100 foursquare < queries 32 | # ./mip -a 100 foursquare_extend < queries 33 | 34 | # ./mip -h 100 gowalla < queries 35 | # ./mip -h 100 foursquare < queries 36 | # ./mip -h 100 foursquare_extend < queries 37 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/random.cpp: -------------------------------------------------------------------------------- 1 | #include "random.h" 2 | #include "graph.h" 3 | #include 4 | #include 5 | #include 6 | 7 | int Random::n = 0; 8 | vector Random::list(MAX_NODE,0); 9 | char Random::file[] = "random.txt"; 10 | 11 | void Random::Build() 12 | { 13 | n = Graph::GetN(); 14 | list.resize(n); 15 | for (int i=0; in-SET_SIZE; i--) 21 | { 22 | int t = rand()%i; 23 | int tmp = list[t]; 24 | list[t] = list[i-1]; 25 | list[i-1] = tmp; 26 | } 27 | 28 | FILE *out = fopen(file, "w"); 29 | for (int i=n-SET_SIZE; i=n) 50 | return -1; 51 | return list[i]; 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/graph.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAPH_H 2 | #define GRAPH_H 3 | 4 | #include "limit.h" 5 | #include 6 | 7 | using namespace std; 8 | 9 | struct Edge 10 | { 11 | int u,v,c; 12 | double w1,w2; 13 | }; 14 | 15 | class Graph 16 | { 17 | private: 18 | static bool built; 19 | static int n; 20 | static int m; 21 | static vector degree; 22 | static vector index; 23 | static vector edges; 24 | 25 | static void qsort_edges(int h, int t); 26 | 27 | public: 28 | static void Build(); 29 | static int GetN(); 30 | static int GetM(); 31 | static int GetDegree(int node); 32 | static int GetNeighbor(int node); 33 | static Edge GetEdge(int node, int idx); 34 | static void BuildIC(); 35 | static void BuildWC(); 36 | static void Build2GC(); 37 | static void Build2WC(); 38 | static void Build2DWC(); 39 | static void Build2IC(); 40 | static void Build2DIC(double, double); 41 | static void Build2RIC(double, double); 42 | static void Build2TIC(double, double, double); 43 | static void Build2DT(double, double, double); 44 | static void Build2T(double, double, double); 45 | static void Stats(); 46 | }; 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /Location-Aware-IM/Cache.h: -------------------------------------------------------------------------------- 1 | #ifndef CACHE_H 2 | #define CACHE_H 3 | 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | class Cache 10 | { 11 | private: 12 | static vector >topTau; // set of local topk users 13 | static vector >cdds; // set of candidates in a Quadtree node 14 | // initial incremental influence of each candidate 15 | static vector >dp; 16 | static vector >dpTau; 17 | 18 | static vector is_init_cached; 19 | static vector is_tau_cached; 20 | 21 | public: 22 | static void init(int numOfRegions); 23 | static bool isInitCached(int rid); 24 | static bool isTauCached(int rid); 25 | static void setInitCached(int rid, bool isCached); 26 | static void setTauCached(int rid, bool isCached); 27 | 28 | static bool getTopTau(vector& list, int rid, int num); 29 | static bool getCandidates(vector& list, int rid, int num); 30 | static bool getDP(vector& list, int rid, int num); 31 | static bool getDPTau(vector& list, int rid, int num); 32 | 33 | static void setCandidates(int rid, vector list); 34 | static void setTopTau(int rid, vector list); 35 | static void setDP(int rid, vector list); 36 | static void setDPTau(int rid, vector list); 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/mia.h: -------------------------------------------------------------------------------- 1 | #ifndef MIA_H 2 | #define MIA_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class MIA 9 | { 10 | private: 11 | static int n; 12 | static int top; 13 | static int k; 14 | static double d[MAX_K]; 15 | static int list[MAX_K]; 16 | static char file[STR_LEN]; 17 | static int topk[MAX_K]; 18 | static vector dd; 19 | static double longest; 20 | static vector dp; 21 | static vector used; 22 | static vector self; 23 | static vector lastupdate; 24 | static vectordelta; 25 | static vectorchildren, path; 26 | static int *S, *numchild, *queue; 27 | static double *distance, *b; 28 | static int *heap; 29 | static int *childlist, *oldchildlist, *parent; 30 | static bool *validlist[MAX_K]; 31 | static vector *childnum; 32 | static vector *allb; 33 | 34 | public: 35 | static double Build(int num, int bound); 36 | static double Build(int num, int k, int bound, double (*Run)(int num_iter, int size, int set[]), double (*RunFast)(int num_iter, int size, int set[])); 37 | static void BuildFromFile(int bound); 38 | static int GetNode(int i); 39 | static int GetMax(int round); 40 | static int GetMax0(int round); 41 | static int generateMIAfrom(int round, int node); 42 | static int generateMIAto(int node); 43 | static int generateMIAto0(int node); 44 | static int count(int node); 45 | static char* filename(int bound); 46 | }; 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/pmia.h: -------------------------------------------------------------------------------- 1 | #ifndef SPT_new_H 2 | #define SPT_new_H 3 | 4 | #include "limit.h" 5 | #include 6 | using namespace std; 7 | 8 | class SPT_new 9 | { 10 | private: 11 | static int n; 12 | static int top; 13 | static int k; 14 | static double d[MAX_K]; 15 | static int list[MAX_K]; 16 | static char file[STR_LEN]; 17 | static int topk[MAX_K]; 18 | static vector dd; 19 | static double longest; 20 | static vector dp; 21 | static vector used; 22 | static vector self; 23 | static vector lastupdate; 24 | static vectordelta; 25 | static vectorchildren, path; 26 | static int *S, *numchild, *queue; 27 | static double *distance, *b; 28 | static int *heap; 29 | static int *childlist, *oldchildlist, *parent; 30 | static bool *validlist[MAX_K]; 31 | static vector *childnum; 32 | static vector *allb; 33 | 34 | public: 35 | static double Build(int num, int bound); 36 | static double Build(int num, int k, int bound, double (*Run)(int num_iter, int size, int set[]), double (*RunFast)(int num_iter, int size, int set[])); 37 | static void BuildFromFile(int bound); 38 | static int GetNode(int i); 39 | static int GetMax(int round); 40 | static int GetMax0(int round); 41 | static int generateSPT_newfrom(int round, int node); 42 | static int generateSPT_newto(int node); 43 | static int generateSPT_newto0(int node); 44 | static int count(int node); 45 | static char* filename(int bound); 46 | }; 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/degreediscount_ic.cpp: -------------------------------------------------------------------------------- 1 | #include "degreediscount_ic.h" 2 | #include "graph.h" 3 | #include 4 | #include 5 | 6 | int DegreeDiscount_IC::n = 0; 7 | vector DegreeDiscount_IC::d(MAX_NODE,0); 8 | int DegreeDiscount_IC::list[MAX_K] = {0}; 9 | char DegreeDiscount_IC::file[] = "degreediscount_ic.txt"; 10 | 11 | void DegreeDiscount_IC::Build(double ratio) 12 | { 13 | n = Graph::GetN(); 14 | d.resize(n); 15 | for (int i=0; imax) 32 | { 33 | max = tmp; 34 | mp = j; 35 | } 36 | } 37 | 38 | list[i] = mp; 39 | used[mp] = true; 40 | fprintf(out, "%ld %ld\n", mp, d[mp]); 41 | 42 | for (int j=0; j=n) 65 | return -1; 66 | return list[i]; 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/SPT_new_0100.txt: -------------------------------------------------------------------------------- 1 | 100 2 | 17 20.546 3 | 252 15.5128 4 | 449 7.7096 5 | 285 7.40333 6 | 204 7.32893 7 | 66 6.082 8 | 197 5.96173 9 | 302 5.54981 10 | 16 4.44258 11 | 815 4.21709 12 | 500 4.16903 13 | 176 4.12047 14 | 420 3.94183 15 | 272 3.85264 16 | 321 3.73246 17 | 155 3.70968 18 | 223 3.54274 19 | 90 3.50397 20 | 180 3.48952 21 | 312 3.47271 22 | 102 3.44637 23 | 422 3.42323 24 | 264 3.11312 25 | 243 3.08831 26 | 47 3.02941 27 | 523 2.99352 28 | 219 2.91396 29 | 684 2.85167 30 | 149 2.83109 31 | 745 2.78121 32 | 195 2.77818 33 | 1108 2.72393 34 | 647 2.71397 35 | 215 2.67891 36 | 633 2.67015 37 | 161 2.64978 38 | 744 2.56297 39 | 742 2.53143 40 | 483 2.51611 41 | 293 2.46162 42 | 580 2.39577 43 | 554 2.37948 44 | 378 2.33241 45 | 806 2.32181 46 | 157 2.30272 47 | 289 2.28693 48 | 21 2.23613 49 | 183 2.23034 50 | 590 2.22321 51 | 775 2.20874 52 | 327 2.20809 53 | 1096 2.18354 54 | 1172 2.163 55 | 532 2.16283 56 | 18 2.16179 57 | 1254 2.1344 58 | 423 2.11316 59 | 896 2.1084 60 | 1259 2.10308 61 | 329 2.10013 62 | 311 2.03264 63 | 704 2.02528 64 | 186 2.00624 65 | 451 1.99484 66 | 893 1.98909 67 | 199 1.98798 68 | 100 1.99396 69 | 879 1.97533 70 | 3 1.9625 71 | 620 1.94972 72 | 83 1.9478 73 | 1180 1.92479 74 | 676 1.89817 75 | 306 1.88617 76 | 610 1.88404 77 | 46 1.87574 78 | 1046 1.86236 79 | 365 1.85523 80 | 39 1.8536 81 | 1167 1.84548 82 | 671 1.84247 83 | 367 1.82814 84 | 105 1.82624 85 | 585 1.81361 86 | 664 1.81325 87 | 1147 1.80812 88 | 298 1.80265 89 | 682 1.78698 90 | 28 1.77789 91 | 107 1.77555 92 | 753 1.77216 93 | 482 1.75756 94 | 191 1.7557 95 | 731 1.73494 96 | 1261 1.72587 97 | 359 1.6943 98 | 828 1.68274 99 | 428 1.68044 100 | 967 1.67904 101 | 362 1.66385 102 | -------------------------------------------------------------------------------- /Location-Aware-IM/limit.h: -------------------------------------------------------------------------------- 1 | #ifndef LIMIT_H 2 | #define LIMIT_H 3 | 4 | #define MAX_NODE 40000 5 | // #define MAX_EDGE 500000 6 | #define MAX_K 5000 7 | // // #define MAX_POPULATION 100000 8 | // #define MAX_REGION 100000 9 | // #define POPULATION_COVERAGE 0.9 10 | // 11 | // #define PROTOTYPE true 12 | #define PROTOTYPE false 13 | // 14 | #define STR_LEN 200 15 | // 16 | // #define NUM_ITER 200 17 | #define NUM_ITER 10 18 | // #define SET_SIZE 50 19 | #define EPS 1e-10 20 | 21 | #include 22 | 23 | using namespace std; 24 | 25 | class Args 26 | { 27 | private: 28 | // if this is a native 29 | static vector is_native; 30 | // if this is a candidate 31 | static vector is_cdd; 32 | 33 | public: 34 | static int MAX_QK; // 5000 35 | static int MAX_CK; // 5000 36 | static int MIN_CK; // 10 37 | static int CACHE_RATIO; // 10 38 | static int CAPACITY; // 500 39 | static void reset(int n) 40 | { 41 | is_native.resize(n); 42 | is_cdd.resize(n); 43 | for (int _ = 0; _ < n; _++) { 44 | is_native[_] = false; 45 | is_cdd[_] = true; 46 | } 47 | } 48 | 49 | static void setNative(int i) 50 | { 51 | is_native[i] = true; 52 | } 53 | 54 | static void setCandidate(int i) 55 | { 56 | is_cdd[i] = true; 57 | } 58 | 59 | static bool isCandidate(int i) 60 | { 61 | return is_cdd[i]; 62 | } 63 | 64 | static bool isNative(int i) 65 | { 66 | return is_native[i]; 67 | } 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/GC_PMIA_0100.txt: -------------------------------------------------------------------------------- 1 | 01 32.2065 2 | 02 52.884 3 | 03 60.4415 4 | 04 72.4755 5 | 05 78.7485 6 | 06 82.668 7 | 07 86.4845 8 | 08 89.503 9 | 09 92.7225 10 | 10 97.3515 11 | 11 100.266 12 | 12 102.184 13 | 13 104.457 14 | 14 107.49 15 | 15 109.097 16 | 16 112.427 17 | 17 114.323 18 | 18 117.96 19 | 19 121.765 20 | 20 123.82 21 | 21 126.975 22 | 22 128.531 23 | 23 130.645 24 | 24 133.683 25 | 25 136.852 26 | 26 138.252 27 | 27 140.888 28 | 28 144.038 29 | 29 146.858 30 | 30 148.626 31 | 31 150.655 32 | 32 152.413 33 | 33 153.988 34 | 34 155.405 35 | 35 156.067 36 | 36 156.959 37 | 37 159.465 38 | 38 160.646 39 | 39 163.145 40 | 40 164.542 41 | 41 166.341 42 | 42 168.232 43 | 43 169.356 44 | 44 172.459 45 | 45 173.904 46 | 46 176.444 47 | 47 177.859 48 | 48 180.684 49 | 49 182.014 50 | 50 183.429 51 | 51 185.421 52 | 52 186.957 53 | 53 188.726 54 | 54 190.514 55 | 55 192.989 56 | 56 195.007 57 | 57 197.141 58 | 58 199.162 59 | 59 201.316 60 | 60 202.655 61 | 61 204.289 62 | 62 206.821 63 | 63 209.005 64 | 64 210.29 65 | 65 212.474 66 | 66 214.128 67 | 67 215.453 68 | 68 217.433 69 | 69 218.1 70 | 70 219.817 71 | 71 221.908 72 | 72 223.927 73 | 73 225.69 74 | 74 227.035 75 | 75 228.583 76 | 76 229.186 77 | 77 231.109 78 | 78 232.54 79 | 79 233.815 80 | 80 235.906 81 | 81 237.336 82 | 82 238.963 83 | 83 239.917 84 | 84 240.996 85 | 85 242.393 86 | 86 244.205 87 | 87 245.537 88 | 88 246.156 89 | 89 246.956 90 | 90 248.529 91 | 91 249.879 92 | 92 252.191 93 | 93 253.487 94 | 94 255.41 95 | 95 256.947 96 | 96 257.786 97 | 97 259.217 98 | 98 261.021 99 | 99 262.474 100 | 100 263.913 101 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/degree.cpp: -------------------------------------------------------------------------------- 1 | #include "degree.h" 2 | #include "graph.h" 3 | #include 4 | 5 | int Degree::n = 0; 6 | vector Degree::d(MAX_NODE,0); 7 | int Degree::list[SET_SIZE]; 8 | char Degree::file[] = "degree.txt"; 9 | 10 | void Degree::qsort_degree(int h, int t) 11 | { 12 | if (hmidd)) 30 | i++; 31 | if (id[max]) 57 | max = j; 58 | d[max] = 0; 59 | list[i] = max; 60 | } 61 | 62 | // qsort_degree(0, n-1); 63 | 64 | FILE* out = fopen(file, "w"); 65 | for (int i=0; i=n) 85 | return -1; 86 | return list[i]; 87 | } 88 | 89 | 90 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/independ_cascade.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | #include "independ_cascade.h" 3 | #include 4 | #include 5 | #include 6 | //#include 7 | 8 | int IndependCascade::n = 0; 9 | int IndependCascade::m = 0; 10 | int IndependCascade::targetSize = 0; 11 | int IndependCascade::resultSize = 0; 12 | int IndependCascade::target[MAX_NODE] = {0}; 13 | bool IndependCascade::built = false; 14 | double IndependCascade::ratio = 0; 15 | 16 | void IndependCascade::Build(double r) 17 | { 18 | n = Graph::GetN(); 19 | m = Graph::GetM(); 20 | built = true; 21 | ratio = r; 22 | } 23 | 24 | void IndependCascade::SetTarget(int size, int set[]) 25 | { 26 | // if (!built) Build(); 27 | targetSize = size; 28 | for (int i=0; i 4 | #include 5 | #include 6 | #include 7 | //#include 8 | 9 | int GeneralCascade::n = 0; 10 | int GeneralCascade::m = 0; 11 | int GeneralCascade::targetSize = 0; 12 | int GeneralCascade::resultSize = 0; 13 | int GeneralCascade::target[MAX_K]={0}; 14 | bool GeneralCascade::built = false; 15 | 16 | void GeneralCascade::Build() 17 | { 18 | n = Graph::GetN(); 19 | m = Graph::GetM(); 20 | built = true; 21 | } 22 | 23 | void GeneralCascade::SetTarget(int size, int set[]) 24 | { 25 | if (!built) Build(); 26 | targetSize = size; 27 | for (int i=0; i 4 | #include 5 | #include 6 | #include 7 | #include "limit.h" 8 | //#include 9 | 10 | int GeneralCascade::n = 0; 11 | int GeneralCascade::m = 0; 12 | int GeneralCascade::targetSize = 0; 13 | int GeneralCascade::resultSize = 0; 14 | int GeneralCascade::target[MAX_K]={0}; 15 | bool GeneralCascade::built = false; 16 | 17 | void GeneralCascade::Build() 18 | { 19 | n = Graph::GetN(); 20 | m = Graph::GetM(); 21 | built = true; 22 | } 23 | 24 | void GeneralCascade::SetTarget(int size, int set[]) 25 | { 26 | if (!built) Build(); 27 | targetSize = size; 28 | for (int i=0; i 4 | #include 5 | int WeightedDegree::n = 0; 6 | vector WeightedDegree::d(MAX_NODE,0); 7 | int WeightedDegree::list[SET_SIZE]; 8 | char WeightedDegree::file[] = "weighteddegree.txt"; 9 | 10 | void WeightedDegree::qsort_degree(int h, int t) 11 | { 12 | if (hmidd)) 30 | i++; 31 | if (id[max]) 61 | max = j; 62 | //printf("%d %lg\n",max,d[max]); 63 | d[max] = 0.0; 64 | list[i] = max; 65 | 66 | } 67 | 68 | // qsort_degree(0, n-1); 69 | 70 | FILE *out = fopen(file, "w"); 71 | for (int i=0; i=n) 91 | return -1; 92 | //printf("%d %d\n", i, list[i]); 93 | return list[i]; 94 | } 95 | 96 | 97 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/tic.h: -------------------------------------------------------------------------------- 1 | #ifndef TIC_H 2 | #define TIC_H 3 | 4 | #include "global.h" 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | typedef std::pair di; 11 | 12 | struct Edge 13 | { 14 | int u,v; 15 | vector w; 16 | }; 17 | 18 | 19 | class TIC 20 | { 21 | private: 22 | static int n_; 23 | static int m_; 24 | static int Z_; 25 | 26 | static map cvt_; // ID converter 27 | 28 | // static vector indegree_; 29 | // static vector outdegree_; 30 | static vector inindex_; 31 | static vector outindex_; 32 | static vector inedges_; 33 | static vector outedges_; 34 | static vector outcache_; 35 | static vector incache_; 36 | static vector outcflag_; // is cached ? 37 | static vector incflag_; 38 | 39 | static void init(); 40 | 41 | static void qsort_inedges(int h, int t); 42 | static void qsort_outedges(int h, int t); 43 | static void RemoveMultiPaths(); 44 | static void IndexNodesOnEdges(); 45 | 46 | public: 47 | static int GetN(); 48 | static int GetM(); 49 | static int GetZ(); 50 | 51 | // static int GetOutDegree(int vertex); 52 | // static int GetInDegree(int vertex); 53 | static int GetOutNeighbor(int vertex); 54 | static int GetInNeighbor(int vertex); 55 | static Edge GetOutEdge(int vertex, int idx); 56 | static Edge GetInEdge(int vertex, int idx); 57 | static double GetOutEdgeWeight(int vertex, int idx, const vector&); 58 | static double GetInEdgeWeight(int vertex, int idx, const vector&); 59 | 60 | static void Build2TICFromFile(char *); 61 | static void Print(); 62 | static void SaveConverter(char *); 63 | static void Stats(); 64 | 65 | static double MaxPProb(vector&); 66 | static double PProb(const vector&, const vector&); 67 | static vector Dijkstra(int u, const double theta); 68 | static vector DijkstraWithStopIds(int u, const double theta, const set&); 69 | 70 | static double Spread(vector, vector); 71 | 72 | static void Convert2PMIA(vector, char *); 73 | static void resetCache(); 74 | }; 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/SPM_gc.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | #include "SPM_gc.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | //#include 8 | 9 | int SPM_gc::n = 0; 10 | int SPM_gc::m = 0; 11 | int SPM_gc::targetSize = 0; 12 | double SPM_gc::resultSize = 0; 13 | int SPM_gc::target[MAX_NODE] = {0}; 14 | bool SPM_gc::built = false; 15 | 16 | void SPM_gc::Build() 17 | { 18 | n = Graph::GetN(); 19 | m = Graph::GetM(); 20 | built = true; 21 | //ratio = r; 22 | } 23 | 24 | void SPM_gc::SetTarget(int size, int set[]) 25 | { 26 | if (!built) Build(); 27 | targetSize = size; 28 | for (int i=0; i0 && active[e.v]!=ring+1) continue; 68 | double puv = 1.0; 69 | puv=exp(-e.w1); 70 | //double ratio=1.0/(double)Graph::GetDegree(e.v); 71 | //for (int j=0; j 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | struct XY { 12 | XY(float _x, float _y) : x(_x), y(_y) {} // x as longitude, y as latitude 13 | float x, y; 14 | }; 15 | 16 | struct AABB { 17 | AABB(XY _center, XY _halfDimension) : center(_center), halfDimension(_halfDimension) {} 18 | 19 | bool containsPoint(float x, float y) { 20 | XY p(x, y); 21 | return ((p.x >= center.x - halfDimension.x && p.x <= center.x + halfDimension.x) && 22 | (p.y >= center.y - halfDimension.y && p.y <= center.y + halfDimension.y)); 23 | } 24 | 25 | bool intersectsAABB(AABB other) { 26 | // intersect or contain 27 | return fabs(other.center.x - center.x) < (halfDimension.x + other.halfDimension.x) && (fabs(other.center.y - center.y) < (halfDimension.y + other.halfDimension.y)); 28 | } 29 | 30 | bool containsAABB(AABB other) { 31 | return ( 32 | center.x + halfDimension.x > other.center.x + other.halfDimension.x && 33 | center.x - halfDimension.x < other.center.x - other.halfDimension.x && 34 | center.y + halfDimension.y > other.center.y + other.halfDimension.y && 35 | center.y - halfDimension.y < other.center.y - other.halfDimension.y); 36 | } 37 | 38 | XY center; 39 | XY halfDimension; 40 | }; 41 | 42 | class Quadtree { 43 | public: 44 | static int count; 45 | 46 | // Quadtree(XY, XY); 47 | Quadtree(XY, XY, int); 48 | 49 | bool insert(int, float, float); 50 | void subdivide(); 51 | void queryRange(std::vector &, AABB); 52 | void queryRangeFO(std::vector &, std::vector &, vector, AABB); 53 | void queryRangeLocations(std::vector &, std::vector &, std::vector &, AABB); 54 | 55 | // queryRangeRegion should contain all regions that intersects with AABB 56 | // not necessarily contained by AABB 57 | void queryRangeRegion(std::vector &, std::vector &, AABB); 58 | void overall(std::vector &); 59 | void print(); 60 | 61 | void clear(); 62 | 63 | AABB boundary; 64 | int nodeCapacity; 65 | int id; 66 | int population; 67 | 68 | // leaves 69 | Quadtree * NW; 70 | Quadtree * NE; 71 | Quadtree * SW; 72 | Quadtree * SE; 73 | 74 | // data 75 | std::vector ids; 76 | std::vector xs; 77 | std::vector ys; 78 | }; 79 | 80 | #endif // __QUADTREE__ 81 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/SP1M_gc.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | #include "SP1M_gc.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | //#include 8 | 9 | int SP1M_gc::n = 0; 10 | int SP1M_gc::m = 0; 11 | int SP1M_gc::targetSize = 0; 12 | double SP1M_gc::resultSize = 0; 13 | int SP1M_gc::target[MAX_NODE] = {0}; 14 | bool SP1M_gc::built = false; 15 | //double SP1M_gc::ratio = 0; 16 | 17 | void SP1M_gc::Build() 18 | { 19 | n = Graph::GetN(); 20 | m = Graph::GetM(); 21 | built = true; 22 | //ratio = r; 23 | } 24 | 25 | void SP1M_gc::SetTarget(int size, int set[]) 26 | { 27 | if (!built) Build(); 28 | targetSize = size; 29 | for (int i=0; iring){ 68 | ring=active[u]; 69 | for (int h1=h;h10 && active[e.v]!=ring+1) continue; 95 | double puv = 1.0; 96 | puv=exp(-e.w1); 97 | //double ratio=1.0/(double)Graph::GetDegree(e.v); 98 | //for (int j=0; j 6 | using namespace std; 7 | 8 | class SPT_upgrade 9 | { 10 | private: 11 | static int n; 12 | static int top; 13 | static int k; 14 | static double d[MAX_K]; // incremental influence of topk nodes 15 | static int list[MAX_K]; 16 | static char file[STR_LEN]; 17 | static int topk[MAX_K]; 18 | static vector dd; // number of members in in-arborescence 19 | static double longest; 20 | static vector dp; // incremental influence 21 | static vector used; // selected as topk 22 | static vector self; // self[node][i] is node's ith child's activation probability in node's in-arborescence 23 | // r = lastupdate[i] means node i get selected as seed at r step (total k steps) 24 | static vector lastupdate; 25 | static vectordelta; // alpha in the paper, delta[node][i] is node's ith child i's alpha over node 26 | // children consists of PMIIA members, children[node][i] = childlist[i] in in-arborescence of node 27 | static vectorchildren, path; 28 | // static vectoriv; // invalid children (blocked, no longer connected) 29 | // S[j] is j's rank in childlist + 1, then take the negative. S[j] < 0 means j is a member of in/out-arborescence. 30 | static int *S, *numchild, *queue; 31 | static double *distance, *b; 32 | static int *heap; 33 | // childlist is all the members of in/out-arborescence, ordered by their distance. 34 | // parent[i] is id of #i node's successor. 35 | static int *childlist, *oldchildlist, *parent; 36 | static bool *validlist[MAX_K]; // validlist[round][node] means round_th selected seed is invalid in node's in-arborescence 37 | 38 | /* my own enhancement to support subgraph PMIA 39 | */ 40 | static int bbound; 41 | static vectorbchildren, bpath; // b means "Back up" 42 | static vector bself; // self[node][i] is node's ith child's activation probability in node's in-arborescence 43 | static vector bdd; // number of members in in-arborescence 44 | static vectorbdelta; // alpha in the paper, delta[node][i] is node's ith child i's alpha over node 45 | 46 | public: 47 | static double Build(int num, int bound); 48 | // static double Build(int num, int k, int bound, double (*Run)(int num_iter, int size, int set[]), double (*RunFast)(int num_iter, int size, int set[])); 49 | static void BuildFromFile(int bound); 50 | static int GetNode(int i); 51 | static int GetMax(int round); 52 | static int GetMax0(int round); 53 | static int generateSPT_newfrom(int round, int node); 54 | static void updateSPT_to(int node); 55 | static int generateSPT_newto(int node); 56 | // static int generateSPT_newto0(int node); 57 | // static int count(int node); 58 | static char* filename(int bound); 59 | 60 | /* my own enhancement to support subgraph PMIA 61 | */ 62 | static vector is_native; // if this node is a native user. 63 | static int init_bound; // bound used to initialize PMIA globally 64 | 65 | // initialization of PMIA algorithm globally 66 | static void reset_native(); 67 | static void reset(); 68 | static double init(int bound); 69 | static void gc(); 70 | static void exit(); 71 | // pmia selection main loop 72 | static void select(int num); 73 | }; 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/greedy.cpp: -------------------------------------------------------------------------------- 1 | #include "greedy.h" 2 | #include "graph.h" 3 | #include 4 | #include 5 | #include 6 | 7 | int Greedy::n = 0; 8 | int Greedy::top = 0; 9 | double Greedy::d[MAX_NODE] = {0}; 10 | int Greedy::list[MAX_NODE] = {0}; 11 | char Greedy::file[] = "greedy.txt"; 12 | 13 | void Greedy::Build(int num, double (*Run)(int num_iter, int size, int set[])) 14 | { 15 | n = Graph::GetN(); 16 | top = num; 17 | 18 | bool *used= new bool[n]; 19 | memset(used, 0, sizeof(bool)*n); 20 | int set[SET_SIZE]; 21 | 22 | double old = 0.0; 23 | 24 | double *improve=new double[n]; 25 | int *lastupdate=new int[n]; 26 | int *heap=new int[n]; 27 | for (int i=0; i=top) 130 | return -1; 131 | return list[i]; 132 | } 133 | 134 | 135 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/tim.h: -------------------------------------------------------------------------------- 1 | #ifndef TIM_H 2 | #define TIM_H 3 | 4 | #include 5 | #include 6 | 7 | #include "tic.h" 8 | 9 | using namespace std; 10 | 11 | 12 | typedef struct 13 | { 14 | vector item; 15 | int k; 16 | } Q; 17 | 18 | typedef struct 19 | { 20 | vector ids; 21 | vector minflu; 22 | } S; 23 | 24 | // typedef struct 25 | // { 26 | // vector iees; 27 | // vector pre; 28 | // } Out; // out arborescence 29 | 30 | #define ESTIMATED 0 31 | #define COMPUTED 1 32 | typedef struct 33 | { 34 | int id; 35 | double infl; 36 | int round; 37 | int status; // ESTIMATED, COMPUTED 38 | } HNode; 39 | 40 | // typedef struct 41 | // { 42 | // int id; 43 | // double infl; 44 | // double infl2; // theta / theta2_ 45 | // } LNode; 46 | 47 | // Lower Bound 48 | typedef struct 49 | { 50 | // vector > lbouts; 51 | vector seeds; 52 | vector item; 53 | } LBSample; 54 | 55 | typedef struct 56 | { 57 | vector item; 58 | double ub; 59 | } UBSample; 60 | 61 | class TIM 62 | { 63 | private: 64 | // needed for all methods 65 | static int n_; 66 | static double *ap_; 67 | static Q q_; 68 | static int round_; 69 | static bool *used_; 70 | 71 | // not needed for every method 72 | // Greedy 73 | static vector H_; 74 | static vector > iees_cache_; 75 | static double* tap_; // temporary ap 76 | // static vector pre_; 77 | // static vector > In_; 78 | // List 79 | static vector L_; // \List 80 | static double *infl2_; /* sqrt(theta_) */ 81 | static int cursorL_; // cursor on \List 82 | // Dijkstra 83 | static double *dist_; 84 | static int *seen_; 85 | static int *seen_idx_; 86 | static int *children_; 87 | static int *pred_; /* predecessor id */ 88 | static bool *is_border_; /* if on the border, upper bounded needed */ 89 | 90 | // static vector > Iee_; // exact calculated out arborescence 91 | // Lower 92 | static double *lap_; 93 | static vector lbsamples_; 94 | // upper 95 | static vector ubsamples_; 96 | 97 | static int Dijkstra(int, double); 98 | // static double DijkstraV(int, double); 99 | static void UpdateHeap(bool); 100 | static void Exact(HNode&); 101 | static void Bounded(HNode&); 102 | static di BestFirst(); 103 | static di BestFirstNoBound(); 104 | static void UpdateAP(const int); 105 | static double MarginalAPOf(const int); 106 | 107 | static void Init(); 108 | 109 | // Lower 110 | static void LBLoad(char *); 111 | // static double LBCalculate(const vector >&, vector&); 112 | static double LBCalculate(const vector&); 113 | static vector LBSelect(); 114 | static double LBMarginalAPOf(const int); 115 | 116 | // Upper Approx 117 | static void UBLoad(char *); 118 | static double UBCalculate(); 119 | 120 | static S GreedyBound(Q, bool); 121 | 122 | public: 123 | // load 124 | static void LoadTIC(char *); 125 | static double theta_; 126 | static double theta2_; 127 | 128 | // query 129 | static void InitGreedy(char *); 130 | static S Greedy(Q); 131 | static S GreedyNoBound(Q); 132 | // static void InitGreedyUpApprox(); 133 | // static S GreedyUpApprox(Q); 134 | static void InitApprox(char *, char *, char *); 135 | static S Approx(Q, double epsilon); 136 | 137 | // static vector > LBGenerate(vector); 138 | 139 | static void Reset(); 140 | static void PrintArguments(); 141 | }; 142 | 143 | #endif 144 | -------------------------------------------------------------------------------- /Location-Aware-IM/heap.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "heap.h" 5 | 6 | using namespace std; 7 | 8 | Heap::Heap(bool max, int capacity) { 9 | isMax = max; 10 | this->capacity = capacity; 11 | 12 | end = 0; 13 | heap = new int[capacity]; 14 | 15 | idxHeap = new int[capacity]; 16 | for (int i = 0; i < capacity; i++) 17 | idxHeap[i] = capacity; 18 | 19 | score = new double[capacity]; 20 | // min-heap 21 | for (int i = 0; i < capacity; i++) 22 | score[i] = INFINITY; 23 | 24 | timer = 0.0; 25 | } 26 | 27 | Heap::~Heap() { 28 | delete[] heap; 29 | delete[] idxHeap; 30 | delete[] score; 31 | } 32 | 33 | bool Heap::push(int key, double val) { 34 | if (0 <= key && key < capacity) { 35 | int insertIdx; 36 | if (idxHeap[key] >= capacity) // not in heap 37 | insertIdx = end++; 38 | else if (idxHeap[key] >= 0) 39 | insertIdx = idxHeap[key]; 40 | else 41 | return false; 42 | 43 | heap[insertIdx] = key; 44 | score[key] = isMax ? -val : val; 45 | int x = (insertIdx - 1) / 2; 46 | 47 | start = clock(); 48 | // sift up 49 | while (insertIdx > 0) { 50 | if (score[heap[x]] > score[key]) { 51 | heap[insertIdx] = heap[x]; 52 | idxHeap[heap[x]] = insertIdx; 53 | insertIdx = x; 54 | x = (insertIdx - 1) / 2; 55 | } 56 | else 57 | break; 58 | } 59 | heap[insertIdx] = key; 60 | idxHeap[key] = insertIdx; 61 | 62 | timer += (double)(clock() - start) / CLOCKS_PER_SEC; 63 | return true; 64 | } 65 | else return false; 66 | } 67 | 68 | bool Heap::pop(int* key, double* val) { 69 | if (end == 0) return false; 70 | 71 | *key = heap[0]; 72 | *val = score[*key]; 73 | if (isMax) 74 | *val = -(*val); 75 | 76 | // pop out 77 | idxHeap[heap[0]] = capacity; 78 | score[heap[0]] = isMax ? -INFINITY : INFINITY; // restore 79 | heap[0] = heap[--end]; 80 | 81 | if (end == 0) return true; 82 | 83 | start = clock(); 84 | // sift down 85 | int tmp = heap[0]; 86 | int insertIdx = 0; 87 | int x = insertIdx*2 + 1; 88 | while (x < end) { 89 | if (x+1 < end && score[heap[x+1]] < score[heap[x]]) x++; 90 | if (score[heap[x]] < score[tmp]) { 91 | heap[insertIdx] = heap[x]; 92 | idxHeap[heap[x]] = insertIdx; 93 | insertIdx = x; 94 | x = insertIdx*2 + 1; 95 | } 96 | else 97 | break; 98 | } 99 | heap[insertIdx] = tmp; 100 | idxHeap[tmp] = insertIdx; 101 | 102 | timer += (double)(clock() - start) / CLOCKS_PER_SEC; 103 | return true; 104 | } 105 | 106 | bool Heap::top(int* key, double* val) { 107 | *key = heap[0]; 108 | *val = score[*key]; 109 | if (isMax) 110 | *val = -(*val); 111 | return true; 112 | } 113 | 114 | bool Heap::empty() { 115 | return end == 0; 116 | } 117 | 118 | void Heap::print() { 119 | for (int i = 0; i < end; i++) { 120 | cout << heap[i] << " " << -score[heap[i]] << " " << idxHeap[heap[i]] << " "; 121 | cout << endl; 122 | } 123 | } 124 | 125 | void Heap::clear() { 126 | for (int i = 0; i < end; i++) 127 | idxHeap[heap[i]] = capacity; 128 | 129 | for (int i = 0; i < end; i++) 130 | score[heap[i]] = INFINITY; 131 | 132 | // for (int i = 0; i < capacity; i++) 133 | // idxHeap[i] = -1; 134 | // 135 | // for (int i = 0; i < capacity; i++) 136 | // score[i] = INFINITY; 137 | 138 | end = 0; 139 | timer = 0; 140 | } 141 | 142 | double Heap::peek(int key) { 143 | double res; 144 | if (0 <= key && key < capacity) { 145 | res = score[key]; 146 | } 147 | else 148 | res = INFINITY; 149 | res = isMax ? -res : res; 150 | return res; 151 | } 152 | 153 | int Heap::size() { 154 | return end; 155 | } 156 | -------------------------------------------------------------------------------- /Location-Aware-IM/Cache.cpp: -------------------------------------------------------------------------------- 1 | #include "limit.h" 2 | #include "Cache.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | vector > Cache::topTau; 11 | vector > Cache::cdds; 12 | vector > Cache::dp; 13 | vector > Cache::dpTau; 14 | vector Cache::is_init_cached; 15 | vector Cache::is_tau_cached; 16 | 17 | void Cache::init(int numOfRegions) 18 | { 19 | cdds.resize(numOfRegions); 20 | topTau.resize(numOfRegions); 21 | dp.resize(numOfRegions); 22 | dpTau.resize(numOfRegions); 23 | is_init_cached.resize(numOfRegions, false); 24 | is_tau_cached.resize(numOfRegions, false); 25 | for (int _ = 0; _ < numOfRegions; _++) { 26 | cdds[_].clear(); 27 | topTau[_].clear(); 28 | dpTau[_].clear(); 29 | dp[_].clear(); 30 | } 31 | } 32 | 33 | bool Cache::isInitCached(int rid) 34 | { // if rid region has been cached 35 | return is_init_cached[rid]; 36 | } 37 | 38 | bool Cache::isTauCached(int rid) 39 | { // if rid region has been cached 40 | return is_tau_cached[rid]; 41 | } 42 | 43 | void Cache::setInitCached(int rid, bool isCached) 44 | { 45 | is_init_cached[rid] = isCached; 46 | } 47 | 48 | void Cache::setTauCached(int rid, bool isCached) 49 | { 50 | is_tau_cached[rid] = isCached; 51 | } 52 | 53 | bool Cache::getTopTau(vector& list, int rid, int num) 54 | { // return false if this region is not cached 55 | list.clear(); 56 | assert(rid >= 0 && rid < topTau.size()); 57 | 58 | if (num < 0 || num > topTau[rid].size()) { 59 | num = topTau[rid].size(); 60 | } 61 | list.resize(num); 62 | for (int i = 0; i < num; i++) { 63 | list[i] = topTau[rid][i]; 64 | } 65 | 66 | if (list.size() == 0) 67 | return false; 68 | else 69 | return true; 70 | } 71 | 72 | bool Cache::getCandidates(vector& list, int rid, int num) 73 | { // return false if this region is not cached 74 | list.clear(); 75 | assert(rid >= 0 && rid < cdds.size()); 76 | 77 | if (num < 0 || num > cdds[rid].size()) { 78 | num = cdds[rid].size(); 79 | } 80 | list.resize(num); 81 | for (int i = 0; i < num; i++) { 82 | list[i] = cdds[rid][i]; 83 | } 84 | 85 | if (list.size() == 0) 86 | return false; 87 | else 88 | return true; 89 | } 90 | 91 | bool Cache::getDP(vector& list, int rid, int num) 92 | { // return false if this region is not cached 93 | list.clear(); 94 | assert(rid >= 0 && rid < dp.size()); 95 | 96 | if (num < 0 || num > dp[rid].size()) { 97 | num = dp[rid].size(); 98 | } 99 | list.resize(num); 100 | for (int i = 0; i < num; i++) { 101 | list[i] = dp[rid][i]; 102 | } 103 | 104 | if (list.size() == 0) 105 | return false; 106 | else 107 | return true; 108 | } 109 | 110 | bool Cache::getDPTau(vector& list, int rid, int num) 111 | { // return false if this region is not cached 112 | list.clear(); 113 | if (num < 0 || num > dpTau[rid].size()) { 114 | num = dpTau[rid].size(); 115 | } 116 | list.resize(num); 117 | for (int i = 0; i < num; i++) { 118 | list[i] = dpTau[rid][i]; 119 | } 120 | 121 | if (list.size() == 0) 122 | return false; 123 | else 124 | return true; 125 | } 126 | 127 | void Cache::setCandidates(int rid, vector list) 128 | { 129 | // rid must be a valid region ID 130 | assert(rid >= 0 && rid < cdds.size()); 131 | cdds[rid] = list; 132 | is_init_cached[rid] = true; 133 | } 134 | 135 | void Cache::setTopTau(int rid, vector list) 136 | { 137 | assert(rid >= 0 && rid < topTau.size()); 138 | topTau[rid] = list; 139 | is_tau_cached[rid] = true; 140 | } 141 | 142 | void Cache::setDP(int rid, vector list) 143 | { 144 | assert(rid >= 0 && rid < dp.size()); 145 | dp[rid] = list; 146 | } 147 | 148 | void Cache::setDPTau(int rid, vector list) 149 | { 150 | assert(rid >= 0 && rid < dpTau.size()); 151 | dpTau[rid] = list; 152 | } 153 | -------------------------------------------------------------------------------- /Location-Aware-IM/mip.h: -------------------------------------------------------------------------------- 1 | #ifndef MIP_H 2 | #define MIP_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "limit.h" 10 | #include "graph.h" 11 | #include "heap.h" 12 | 13 | using namespace std; 14 | 15 | class Mip 16 | { 17 | private: 18 | static int n; 19 | // maximum influence path propagation probability. 20 | // resize to n 21 | static vector mip; 22 | static vector inflees; 23 | static vector numInflees; 24 | 25 | static vector changed; 26 | static vector bmip; 27 | static vector bInflees; 28 | static vector bNumInflees; 29 | 30 | static vector outPath; 31 | static vector outAp; 32 | static vector outB; 33 | 34 | static vector > cdds; 35 | static vector numCdds; 36 | 37 | static Heap *maxHeap; // \Heap in paper 38 | static Heap *lMaxHeap; // lower bound \Heap in paper 39 | 40 | // seeds currently selected 41 | static vector used; // selected as topk, global structure 42 | 43 | // activation probability 44 | // resize to n 45 | static vector ap; 46 | static vector sap; 47 | 48 | // paths from influencees to seeds. 49 | // resize to n 50 | static vector > path; 51 | static vector > children; 52 | static vector > bb; 53 | static vector b; 54 | static vector numInfrs; // total number of influencers 55 | static vector numchild; 56 | 57 | // dijkstra 58 | static vector S; 59 | static vector parent; 60 | static vector queue; 61 | static vector heap; 62 | static vector distance; 63 | static vector childlist; 64 | 65 | static vector status; 66 | static double longest; 67 | 68 | // hints 69 | // static vector hap; 70 | // static vector uap; // upper bound ap 71 | // static double lowerHint; 72 | 73 | // helper functions 74 | // spread from one node 75 | static void shortestPathsFrom(int fromNode); 76 | 77 | // really incremental influence 78 | static double incInfl(int s); 79 | // use \Heap to return next best seed in \Heap 80 | static int nextSeed(double *inc); 81 | // accept s as seed. It means to update influencees' influence path to 82 | // include s in them. 83 | static void accept(int s); 84 | static void gc(); 85 | static double estimateIncInfl(int s); 86 | static double estimateLowerIncInfl(const vector&); 87 | static double estimateUpperIncInfl(const vector&); 88 | static double lowerIncInfl(int s); 89 | 90 | static double getHints(vector&hint, const vector >& topTau, const vector >& dpTau, int num); 91 | 92 | public: 93 | // initialization process, calculate all MIPs 94 | static void init(double longest); 95 | 96 | // influence spread function 97 | // static double spread(const unordered_set& kset, const unordered_set& influencees); 98 | 99 | // select 100 | static vector select(int k); 101 | static void cacheTau(int k, vector& topTau, vector& tauDp); 102 | static vector assembly(int k, const vector >& candidates, const vector > &initDp); 103 | static vector hint(int k, double acceptRatio, const vector >& candidates, const vector > &initDp, const vector >& topTau, const vector > &dpTau); 104 | static vector dumbHint(int k, double acceptRatio, const vector >& candidates, const vector > &initDp); 105 | static void reset_native(); 106 | static void exit(); 107 | static void sortInit(const vector& vertices, vector& candidates, 108 | vector& cddsDp); 109 | 110 | // helper variables 111 | static int count; 112 | static int estCount; 113 | static double incInflTimer; 114 | static vector is_native; // if this node is a native user. 115 | static void reset(); 116 | }; 117 | 118 | #endif 119 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/experiments.cpp: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | #include "time.h" 3 | #include 4 | #include 5 | 6 | #include "tim.h" 7 | 8 | void PrintS(S s) { 9 | printf("S = \n"); 10 | for (unsigned int i = 0; i < s.ids.size(); i++) { 11 | printf("%d\t%lg\n", s.ids[i], s.minflu[i]); 12 | } 13 | } 14 | 15 | int 16 | main(int argc, char *argv[]) { 17 | clock_t start, end; 18 | double timer; 19 | 20 | string cmd; 21 | cmd = "-p"; 22 | if (!cmd.compare(argv[1])) { 23 | TIC::Build2TICFromFile(argv[2]); 24 | // load query items 25 | char dm[] = "very_very_very_very_very_long_dm_file_name"; 26 | FILE *f = fopen(argv[3], "r"); 27 | int nq = 0, Z = 0, k; 28 | int q_id; 29 | sscanf(argv[5], "%d", &q_id); 30 | vector item; 31 | fscanf(f, "%d %d", &nq, &Z); 32 | item.resize(Z); 33 | for (int i = 0; i < nq; i++) { 34 | fscanf(f, "%d", &k); 35 | for (int z = 0; z < Z; z++) { 36 | fscanf(f, "%lg", &(item[z])); 37 | } 38 | if (q_id == i) { 39 | sprintf(dm, "%s", argv[4]); 40 | // printf("%s\n", dm); 41 | start = clock(); 42 | TIC::Convert2PMIA(item, dm); 43 | #ifdef VERBO SE 44 | printf("convert time %lg\n", double(clock()-start)/CLOCKS_PER_SEC); 45 | #endif 46 | #ifdef EXP 47 | printf("%lg\n", double(clock()-start)/CLOCKS_PER_SEC); 48 | #endif 49 | } 50 | } 51 | fclose(f); 52 | } 53 | 54 | bool bounded = false; 55 | cmd = "-b"; 56 | string cmd2 = "-f"; 57 | if (!cmd.compare(argv[1]) || !cmd2.compare(argv[1])) { 58 | if (!cmd.compare(argv[1])) bounded = true; 59 | else bounded = false; 60 | // printf("bounded? %d", bounded ? 1 : 0); 61 | TIM::LoadTIC(argv[2]); 62 | TIM::InitGreedy(argv[3]); 63 | int bound1, bound2; 64 | sscanf(argv[4], "%d", &bound1); 65 | sscanf(argv[5], "%d", &bound2); 66 | TIM::theta_ = 1.0/bound1; 67 | TIM::theta2_ = 1.0/bound2; 68 | 69 | // load query items 70 | FILE *f = fopen(argv[6], "r"); 71 | int nq = 0, Z = 0, k; 72 | sscanf(argv[7], "%d", &k); 73 | vector item; 74 | fscanf(f, "%d %d", &nq, &Z); 75 | item.resize(Z); 76 | for (int i = 0; i < nq; i++) { 77 | start = clock(); 78 | 79 | for (int z = 0; z < Z; z++) { 80 | fscanf(f, "%lg", &(item[z])); 81 | } 82 | Q q = {.item=item, .k=k}; 83 | S s; 84 | if (bounded) s = TIM::Greedy(q); 85 | else s = TIM::GreedyNoBound(q); 86 | #ifdef VERBOSE 87 | PrintS(s); 88 | #endif 89 | end = clock(); 90 | timer = double(end - start); 91 | 92 | double spread = TIC::Spread(s.ids, q.item); 93 | 94 | double rt = 0; 95 | for (unsigned int i = 0; i < s.ids.size(); i++) { 96 | rt += s.minflu[i]; 97 | } 98 | 99 | #ifdef VERBOSE 100 | printf("spread : %lg, time: %lg\n", spread, timer/CLOCKS_PER_SEC); 101 | #endif 102 | #ifdef EXP 103 | for (int z = 0; z < Z; z++) { 104 | printf("%lg", item[z]); 105 | } 106 | printf("\n"); 107 | printf("%lg, %lg, %lg, %d, %d, %d\n", timer/CLOCKS_PER_SEC, spread, rt, bound1, bound2, k); 108 | #endif 109 | } 110 | fclose(f); 111 | } 112 | 113 | cmd = "-a"; 114 | if (!cmd.compare(argv[1])) { 115 | TIM::LoadTIC(argv[2]); 116 | TIM::InitApprox(argv[3], argv[4], argv[5]); 117 | int bound1, bound2; double epsilon; 118 | sscanf(argv[6], "%d", &bound1); 119 | sscanf(argv[7], "%d", &bound2); 120 | TIM::theta_ = 1.0/bound1; 121 | TIM::theta2_ = 1.0/bound2; 122 | 123 | // load query items 124 | FILE *f = fopen(argv[8], "r"); 125 | sscanf(argv[9], "%lg", &epsilon); 126 | int nq = 0, Z = 0, k; 127 | sscanf(argv[10], "%d", &k); 128 | vector item; 129 | fscanf(f, "%d %d", &nq, &Z); 130 | item.resize(Z); 131 | double placeholder; 132 | for (int i = 0; i < nq; i++) { 133 | start = clock(); 134 | fscanf(f, "%d", &placeholder); 135 | for (int z = 0; z < Z; z++) { 136 | fscanf(f, "%lg", &(item[z])); 137 | } 138 | Q q = {.item=item, .k=k}; 139 | S s = TIM::Approx(q, epsilon); 140 | 141 | #ifdef VERBOSE 142 | PrintS(s); 143 | #endif 144 | 145 | end = clock(); 146 | timer = double(end - start); 147 | 148 | double spread = TIC::Spread(s.ids, q.item); 149 | 150 | #ifdef VERBOSE 151 | printf("spread : %lg, time: %lg\n", spread, timer/CLOCKS_PER_SEC); 152 | #endif 153 | #ifdef EXP 154 | for (int z = 0; z < Z; z++) { 155 | printf("%lg", item[z]); 156 | } 157 | printf("\n"); 158 | printf("%lg, %lg, %d, %d, %d, %lg\n", timer/CLOCKS_PER_SEC, spread, bound1, bound2, k, epsilon); 159 | #endif 160 | } 161 | fclose(f); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/offline.cpp: -------------------------------------------------------------------------------- 1 | // offline methods 2 | 3 | // #define VERBOSE 4 | 5 | #include "stdio.h" 6 | #include 7 | #include 8 | #include // std::sort 9 | 10 | #include "tim.h" 11 | 12 | typedef struct 13 | { 14 | int id; 15 | double infl; 16 | double infl2; // theta / theta2_ 17 | } LNode; 18 | 19 | // bool max_lnode_cmp(const di&a, const di&b) { 20 | // // return a.infl > b.infl; 21 | // return a.first > b.first; 22 | // } 23 | 24 | bool max_lnode_cmp(const LNode&a, const LNode&b) { 25 | return a.infl > b.infl; 26 | } 27 | 28 | void List(double theta, double theta2, char *filename) { 29 | double delta = theta / theta2; // 0.01 / 0.1 = 0.1 30 | vector l; 31 | for (int i = 0; i < TIC::GetN(); i++) { 32 | if (i % 1000 == 0) printf("processing vertex %d...\n", i); 33 | vector rst = TIC::Dijkstra(i, -log(theta)); 34 | double rt = 0, rt2 = 0; 35 | for (unsigned int i = 0; i < rst.size(); i++) { 36 | if (rst[i].first > delta) rt2 += rst[i].first; 37 | rt += rst[i].first; 38 | } 39 | LNode ln = {.id = i, .infl=rt, .infl2 = rt2}; 40 | l.push_back(ln); 41 | } 42 | sort(l.begin(), l.end(), max_lnode_cmp); 43 | FILE *f = fopen(filename, "w"); 44 | fprintf(f, "%d\n", TIC::GetN()); 45 | for (int i = 0; i < TIC::GetN(); i++) { 46 | fprintf(f, "%d\t%lg\t%lg\n", l[i].id, l[i].infl, l[i].infl2); 47 | } 48 | fclose(f); 49 | } 50 | 51 | void UpSample(int k, char *filename, char *outname) { 52 | printf("up sampling...\n"); 53 | FILE* f = fopen(filename, "r"); 54 | FILE *fo = fopen(outname, "w"); 55 | int nq = 0, Z = 0; 56 | vector item; 57 | fscanf(f, "%d %d", &nq, &Z); 58 | fprintf(fo, "%d\t%d\t%d\n", nq, Z, k); 59 | item.resize(Z); 60 | double tmp; 61 | for (int i = 0; i < nq; i++) { 62 | #ifdef VERBOSE 63 | printf("processing sample %d...\n", i); 64 | #endif 65 | fscanf(f, "%lg", &tmp); 66 | for (int z = 0; z < Z; z++) { 67 | fscanf(f, "%lg", &(item[z])); 68 | } 69 | Q q = {.item=item, .k=k}; 70 | S s = TIM::Greedy(q); 71 | double spread = 0; 72 | for (unsigned int i = 0; i < s.minflu.size(); i++) { 73 | spread += s.minflu[i]; 74 | } 75 | fprintf(fo, "%lg\n", spread); 76 | for (int z = 0; z < Z; z++) { 77 | fprintf(fo, "%lg ", item[z]); 78 | } 79 | fprintf(fo, "\n"); 80 | } 81 | fclose(f); 82 | fclose(fo); 83 | } 84 | 85 | void LowSample(int k, char *filename, char *outname) { 86 | printf("low sampling...\n"); 87 | FILE* f = fopen(filename, "r"); 88 | FILE *fo = fopen(outname, "w"); 89 | int nq = 0, Z = 0; 90 | vector item; 91 | fscanf(f, "%d %d", &nq, &Z); 92 | fprintf(fo, "%d\t%d\t%d\n", nq, Z, k); 93 | item.resize(Z); 94 | for (int i = 0; i < nq; i++) { 95 | if (i % 100 == 0) printf("processing sample %d...\n", i); 96 | for (int z = 0; z < Z; z++) { 97 | fscanf(f, "%lg", &(item[z])); 98 | } 99 | Q q = {.item=item, .k=k}; 100 | S s = TIM::Greedy(q); 101 | // vector seeds = TIM::LBGenerate(s.ids); 102 | 103 | for (int z = 0; z < Z; z++) { 104 | fprintf(fo, "%lg ", item[z]); 105 | } 106 | fprintf(fo, "\n"); 107 | for (int j = 0; j < k; j++) { 108 | fprintf(fo, "%d ", s.ids[j]); 109 | } 110 | fprintf(fo, "\n"); 111 | // for (int i = 0; i < k; i++) { 112 | // fprintf(fo, "%d ", lbouts[i].size()); 113 | // for (unsigned int j = 0; j < lbouts[i].size(); j++) { 114 | // fprintf(fo, "%d ", lbouts[i][j]); 115 | // } 116 | // fprintf(fo, "\n"); 117 | // } 118 | } 119 | fclose(f); 120 | fclose(fo); 121 | } 122 | 123 | void UpHeapSample() { 124 | } 125 | 126 | int 127 | main(int argc, char *argv[]) { 128 | string cmd; 129 | cmd = "-l"; 130 | if (!cmd.compare(argv[1])) { 131 | TIC::Build2TICFromFile(argv[2]); 132 | int bound1 = 100, bound2 = 10; 133 | sscanf(argv[3], "%d", &bound1); 134 | sscanf(argv[4], "%d", &bound2); 135 | List(1.0/bound1, 1.0/bound2, argv[5]); 136 | } 137 | 138 | cmd = "-ls"; 139 | if (!cmd.compare(argv[1])) { 140 | TIM::LoadTIC(argv[2]); 141 | TIM::InitGreedy(argv[3]); 142 | int bound1 = 1000, bound2=10, k = 1000; 143 | sscanf(argv[4], "%d", &bound1); 144 | sscanf(argv[5], "%d", &bound2); 145 | sscanf(argv[6], "%d", &k); 146 | TIM::theta_ = 1.0/bound1; 147 | TIM::theta2_ = 1.0/bound2; 148 | LowSample(k, argv[7], argv[8]); 149 | } 150 | 151 | cmd = "-us"; 152 | if (!cmd.compare(argv[1])) { 153 | TIM::LoadTIC(argv[2]); 154 | TIM::InitGreedy(argv[3]); 155 | int bound1 = 1000, bound2=10, k = 1000; 156 | sscanf(argv[4], "%d", &bound1); 157 | sscanf(argv[5], "%d", &bound2); 158 | sscanf(argv[6], "%d", &k); 159 | TIM::theta_ = 1.0/bound1; 160 | TIM::theta2_ = 1.0/bound2; 161 | UpSample(k, argv[7], argv[8]); 162 | } 163 | 164 | cmd = "-uhs"; 165 | if (!cmd.compare(argv[1])) { 166 | UpHeapSample(); 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /Location-Aware-IM/graph.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | int Graph::n = 0; 12 | int Graph::m = 0; 13 | bool Graph::edgesSorted = false; 14 | vector Graph::index; 15 | vector Graph::degree; 16 | vector Graph::edges; 17 | 18 | void Graph::qsort_edges(int h, int t) 19 | { 20 | edgesSorted = true; 21 | if (hmid.u)||((edges[j].u==mid.u)&&(edges[j].v>mid.v)))) 30 | j--; 31 | if (i" << edges[i].v << ": " << exp(-edges[i].w1) << endl; 100 | // } 101 | } 102 | 103 | void Graph::IndexNodesOnEdges() { 104 | // index nodes on edges vector 105 | // edges with same source nodes are aggregated together 106 | // 107 | // must sort edges first 108 | if (!edgesSorted) 109 | qsort_edges(0, 2*m-1); 110 | 111 | index.resize(n, 0); 112 | for (int i=0; imaxdegree) maxdegree=degree[i]; 181 | // tdegree+=degree[i]; 182 | // //if (degree[i]%2) printf("%d\n", i); 183 | // } 184 | // printf("average degree:\t%lg\n",tdegree/n); 185 | // printf("maximal degree:\t%d\n",maxdegree); 186 | // int maxcmp=0,ncmp=0; 187 | // bool *used=new bool[n]; 188 | // memset(used,0,n); 189 | // while (1) 190 | // { 191 | // queue q; 192 | // for (i=0;imaxcmp) maxcmp=cmpsize; 214 | // } 215 | // printf("# of connected component:\t%d\n",ncmp); 216 | // printf("largest component size:\t%d\n",maxcmp); 217 | // printf("average component size:\t%lg\n",double(n)/ncmp); 218 | // } 219 | -------------------------------------------------------------------------------- /Location-Aware-IM/Quadtree.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Quadtree.h" 3 | 4 | // Quadtree::Quadtree(XY _center, XY _halfDimension) 5 | // : boundary(_center, _halfDimension), nodeCapacity(4) 6 | // { 7 | // NW = NE = SW = SE = NULL; 8 | // points.reserve(nodeCapacity); 9 | // } 10 | 11 | int Quadtree::count = 0; 12 | 13 | Quadtree::Quadtree(XY _center, XY _halfDimension, int _nodeCapacity) 14 | : boundary(_center, _halfDimension), nodeCapacity(_nodeCapacity) 15 | { 16 | id = count++; 17 | NW = NE = SW = SE = NULL; 18 | population = 0; 19 | ids.reserve(nodeCapacity); 20 | xs.reserve(nodeCapacity); 21 | ys.reserve(nodeCapacity); 22 | } 23 | 24 | bool Quadtree::insert(int id, float x, float y) { 25 | if (!boundary.containsPoint(x, y)) 26 | return false; 27 | 28 | if (ids.size() < nodeCapacity) { 29 | ids.push_back(id); 30 | xs.push_back(x); 31 | ys.push_back(y); 32 | population += 1; 33 | return true; 34 | } 35 | 36 | if (NW == NULL) subdivide(); 37 | 38 | if (NW->insert(id, x, y) || 39 | NE->insert(id, x, y) || 40 | SW->insert(id, x, y) || 41 | SE->insert(id, x, y)) { 42 | population += 1; 43 | return true; 44 | } 45 | 46 | assert(false); 47 | return false; // should never happen 48 | } 49 | 50 | void Quadtree::subdivide() { 51 | XY center = boundary.center; 52 | XY newDim(boundary.halfDimension.x / 2, boundary.halfDimension.y / 2); 53 | 54 | NW = new Quadtree(XY(center.x - newDim.x, center.y + newDim.y), newDim, nodeCapacity); 55 | NE = new Quadtree(XY(center.x + newDim.x, center.y + newDim.y), newDim, nodeCapacity); 56 | SW = new Quadtree(XY(center.x - newDim.x, center.y - newDim.y), newDim, nodeCapacity); 57 | SE = new Quadtree(XY(center.x + newDim.x, center.y - newDim.y), newDim, nodeCapacity); 58 | } 59 | 60 | void Quadtree::queryRange(std::vector & list, AABB range) { 61 | if (!boundary.intersectsAABB(range)) return ; // list is empty 62 | 63 | for (int i = 0; i < ids.size(); ++i) 64 | if (range.containsPoint(xs[i], ys[i])) { 65 | list.push_back(ids[i]); 66 | } 67 | 68 | if (NW == NULL) return ; 69 | NW->queryRange(list, range); 70 | NE->queryRange(list, range); 71 | SW->queryRange(list, range); 72 | SE->queryRange(list, range); 73 | } 74 | 75 | void Quadtree::queryRangeLocations(std::vector & list, vector& nativesX, vector& nativesY, AABB range) { 76 | if (!boundary.intersectsAABB(range)) return ; // list is empty 77 | 78 | for (int i = 0; i < ids.size(); ++i) 79 | if (range.containsPoint(xs[i], ys[i])) { 80 | list.push_back(ids[i]); 81 | nativesX.push_back(xs[i]); 82 | nativesY.push_back(ys[i]); 83 | } 84 | 85 | if (NW == NULL) return ; 86 | NW->queryRangeLocations(list, nativesX, nativesY, range); 87 | NE->queryRangeLocations(list, nativesX, nativesY, range); 88 | SW->queryRangeLocations(list, nativesX, nativesY, range); 89 | SE->queryRangeLocations(list, nativesX, nativesY, range); 90 | } 91 | 92 | void Quadtree::queryRangeRegion(std::vector & list, std::vector & boundaries, AABB range) 93 | { 94 | // printf("XY:(%f %f), halfDimension:(%f %f)\n", boundary.center.x, boundary.center.y, boundary.halfDimension.x, boundary.halfDimension.y); 95 | // for (int i = 0; i < ids.size(); i++) { 96 | // printf("%d \n", ids[i]); 97 | // } 98 | if (!boundary.intersectsAABB(range)) return; 99 | // if (population > MAX_POPULATION) { 100 | // // too large, ask subregions directly. 101 | // if (NW != NULL) { 102 | // NW->queryRangeRegion(list, boundaries, populations, range); 103 | // NE->queryRangeRegion(list, boundaries, populations, range); 104 | // SW->queryRangeRegion(list, boundaries, populations, range); 105 | // SE->queryRangeRegion(list, boundaries, populations, range); 106 | // } 107 | // } 108 | else { // moderate region, have intersection with query range 109 | if (range.containsAABB(boundary)) { // totally covered by query range 110 | list.push_back(id); 111 | boundaries.push_back(boundary); 112 | // printf("XY:(%f %f), halfDimension:(%f %f)\n", boundary.center.x, boundary.center.y, boundary.halfDimension.x, boundary.halfDimension.y); 113 | } 114 | else if (NW != NULL) { 115 | // not covered by query range, but it is a intermediate region. 116 | NW->queryRangeRegion(list, boundaries, range); 117 | NE->queryRangeRegion(list, boundaries, range); 118 | SW->queryRangeRegion(list, boundaries, range); 119 | SE->queryRangeRegion(list, boundaries, range); 120 | } 121 | } 122 | } 123 | 124 | void Quadtree::queryRangeFO(std::vector &list, std::vector &others, vector boundaries, AABB range) 125 | { 126 | if (!boundary.intersectsAABB(range)) return ; // list is empty 127 | 128 | int numOfRegions = boundaries.size(); 129 | for (int i = 0; i < ids.size(); ++i) 130 | if (range.containsPoint(xs[i], ys[i])) { 131 | list.push_back(ids[i]); 132 | int j = 0; 133 | for (; j < numOfRegions; j++) 134 | if (boundaries[j].containsPoint(xs[i], ys[i])) 135 | break; 136 | if (j == numOfRegions) 137 | others.push_back(ids[i]); 138 | } 139 | 140 | if (NW == NULL) return ; 141 | NW->queryRange(list, range); 142 | NE->queryRange(list, range); 143 | SW->queryRange(list, range); 144 | SE->queryRange(list, range); 145 | } 146 | 147 | void Quadtree::overall(std::vector & list) 148 | { 149 | for (int i = 0; i < ids.size(); ++i) { 150 | list.push_back(ids[i]); 151 | } 152 | if (NW == NULL) return ; 153 | NW->overall(list); 154 | NE->overall(list); 155 | SW->overall(list); 156 | SE->overall(list); 157 | } 158 | 159 | void Quadtree::print() 160 | { 161 | printf("XY:(%f %f), halfDimension:(%f %f)\n", boundary.center.x, boundary.center.y, boundary.halfDimension.x, boundary.halfDimension.y); 162 | for (int i = 0; i < ids.size(); ++i) { 163 | printf("%d ", ids[i]); 164 | } 165 | printf("\n"); 166 | if (NW == NULL) return ; 167 | NW->print(); 168 | NE->print(); 169 | SW->print(); 170 | SE->print(); 171 | } 172 | 173 | // scan the tree and remove all node/Item* 174 | void Quadtree::clear() { 175 | count = 0; 176 | if (this == NULL) return ; 177 | ids.clear(); 178 | ys.clear(); 179 | xs.clear(); 180 | 181 | NW->clear(); 182 | delete NW; 183 | NW = NULL; 184 | NE->clear(); 185 | delete NE; 186 | NE = NULL; 187 | SW->clear(); 188 | delete SW; 189 | SW = NULL; 190 | SE->clear(); 191 | delete SE; 192 | SE = NULL; 193 | } 194 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/main.cpp: -------------------------------------------------------------------------------- 1 | #include "limit.h" 2 | #include "graph.h" 3 | 4 | #include "random.h" 5 | #include "degree.h" 6 | #include "greedy.h" 7 | #include "degreediscount_ic.h" 8 | #include "weighteddegree.h" 9 | 10 | #include "SPM_gc.h" 11 | #include "SP1M_gc.h" 12 | #include "pmia.h" 13 | #include "pagerank.h" 14 | #include "general_cascade.h" 15 | #include "mia.h" 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | using namespace std; 23 | 24 | FILE* timetmpfile; 25 | double timer; 26 | clock_t start, ended; 27 | 28 | void toSimulate(char *file, int (*GetNode)(int i), double (*Run)(int num_iter, int size, int set[])) 29 | { 30 | FILE *out = fopen(file, "w"); 31 | int set[MAX_NODE]; 32 | for (int t=0; t=3) sscanf(argv[2],"%d",&bound1); 184 | if (argc>=4) sscanf(argv[3],"%d",&bound2); 185 | char SPTfilename[]="PMIA_control.txt"; 186 | FILE *out = fopen(SPTfilename, "w"); 187 | char timefilename[]="time_PMIA_0000.txt"; 188 | char SPT_new_WC[]="GC_PMIA_0000.txt"; 189 | for (int bound=bound1;bound=3) sscanf(argv[2],"%d",&bound1); 225 | if (argc>=4) sscanf(argv[3],"%d",&bound2); 226 | char SPTfilename[]="MIA_control.txt"; 227 | FILE *out = fopen(SPTfilename, "w"); 228 | char timefilename[]="time_MIA_0000.txt"; 229 | char SPT_new_WC[]="GC_MIA_0000.txt"; 230 | for (int bound=bound1;bound 2 | #include 3 | #include 4 | #include /* assert */ 5 | #include // std::make_heap, std::pop_heap, std::push_heap, std::sort_heap 6 | #include 7 | #include 8 | #include 9 | 10 | #include "tic.h" 11 | 12 | using namespace std; 13 | 14 | int TIC::n_ = 0; 15 | int TIC::m_ = 0; 16 | int TIC::Z_ = 0; 17 | //vector TIC::indegree_; 18 | //vector TIC::outdegree_; 19 | vector TIC::inindex_; 20 | vector TIC::outindex_; 21 | vector TIC::inedges_; 22 | vector TIC::outedges_; 23 | vector TIC::incache_; 24 | vector TIC::outcache_; 25 | vector TIC::outcflag_; // is cached ? 26 | vector TIC::incflag_; 27 | map TIC::cvt_; 28 | 29 | typedef std::pair di; 30 | 31 | int TIC::GetN() { 32 | return n_; 33 | } 34 | 35 | int TIC::GetM() { 36 | return m_; 37 | } 38 | 39 | int TIC::GetZ() { 40 | return Z_; 41 | } 42 | 43 | void TIC::resetCache() { 44 | for (int i = 0; i < m_; i++) { 45 | outcflag_[i] = false; 46 | incflag_[i] = false; 47 | } 48 | } 49 | 50 | void TIC::init() { 51 | n_ = m_ = Z_ = 0; 52 | cvt_.clear(); 53 | inindex_.clear(); 54 | outindex_.clear(); 55 | inedges_.clear(); 56 | outedges_.clear(); 57 | outcache_.clear(); 58 | outcflag_.clear(); 59 | incache_.clear(); 60 | incflag_.clear(); 61 | } 62 | 63 | void TIC::Build2TICFromFile(char *filename) { 64 | #ifdef VERBOSE 65 | printf("building TIC model...\n"); 66 | #endif 67 | init(); 68 | 69 | FILE* f = fopen(filename, "r"); 70 | fscanf(f, "%d %d", &m_, &Z_); 71 | inedges_.resize(m_); 72 | outedges_.resize(m_); 73 | 74 | int u, v; double r; 75 | for (int i = 0; i < m_; i++) { 76 | fscanf(f, "%d\t%d", &u, &v); 77 | if (cvt_.count(u) == 0) cvt_[u] = n_++; 78 | if (cvt_.count(v) == 0) cvt_[v] = n_++; 79 | 80 | outedges_[i].u = inedges_[i].u = cvt_.at(u); 81 | outedges_[i].v = inedges_[i].v = cvt_.at(v); 82 | 83 | inedges_[i].w.resize(Z_); 84 | outedges_[i].w.resize(Z_); 85 | for (int z = 0; z < Z_; z++) { 86 | fscanf(f, "%lg", &r); 87 | inedges_[i].w[z] = outedges_[i].w[z] = r; 88 | } 89 | } 90 | 91 | qsort_inedges(0, m_-1); // sort out edges 92 | qsort_outedges(0, m_-1); // sort in edges 93 | 94 | RemoveMultiPaths(); 95 | 96 | IndexNodesOnEdges(); 97 | 98 | incache_.resize(m_); 99 | outcache_.resize(m_); 100 | outcflag_.resize(m_, false); 101 | incflag_.resize(m_, false); 102 | 103 | fclose(f); 104 | 105 | Stats(); 106 | } 107 | 108 | void TIC::qsort_outedges(int h, int t) { 109 | if (hmid.u)||((outedges_[j].u==mid.u)&&(outedges_[j].v>mid.v)))) 118 | j--; 119 | if (imid.v)||((inedges_[j].v==mid.v)&&(inedges_[j].u>mid.u)))) 147 | j--; 148 | if (i::iterator it = cvt_.begin(); it != cvt_.end(); it++) { 208 | fprintf(f, "%d\t%d\n", it->first, it->second); 209 | } 210 | fclose(f); 211 | } 212 | 213 | int TIC::GetOutNeighbor(int vertex) { 214 | if (vertex == 0) 215 | return outindex_[vertex]+1; 216 | else 217 | return outindex_[vertex]-outindex_[vertex-1]; 218 | } 219 | 220 | int TIC::GetInNeighbor(int vertex) { 221 | if (vertex == 0) 222 | return inindex_[vertex]+1; 223 | else 224 | return inindex_[vertex]-inindex_[vertex-1]; 225 | } 226 | 227 | Edge TIC::GetOutEdge(int vertex, int idx) 228 | { 229 | if (vertex == 0) 230 | return outedges_[idx]; 231 | else 232 | return outedges_[outindex_[vertex-1]+1+idx]; 233 | } 234 | 235 | Edge TIC::GetInEdge(int vertex, int idx) 236 | { 237 | if (vertex == 0) 238 | return inedges_[idx]; 239 | else 240 | return inedges_[inindex_[vertex-1]+1+idx]; 241 | } 242 | 243 | void TIC::Stats() { 244 | printf("n: %d\n", n_); 245 | printf("m: %d\n", m_); 246 | printf("Z: %d\n", Z_); 247 | double mw = 0, maxw = 0; 248 | for (int i = 0; i < m_; i++) { 249 | mw = 0; 250 | for (int z = 0; z < Z_; z++) { 251 | mw = mw > inedges_[i].w[z] ? mw : inedges_[i].w[z]; 252 | } 253 | maxw += mw; 254 | } 255 | printf("average maxium z weight(affects non-topic spread): %lg\n", maxw/m_); 256 | } 257 | 258 | void TIC::Print() { 259 | printf("==================in========================\n"); 260 | for (unsigned int i = 0; i < inedges_.size(); i++) { 261 | printf("%d\t%d", inedges_[i].u, inedges_[i].v); 262 | for (int z = 0; z < Z_; z++) { 263 | printf("\t%lg", inedges_[i].w[z]); 264 | } 265 | printf("\n"); 266 | } 267 | printf("==================out========================\n"); 268 | for (unsigned int i = 0; i < outedges_.size(); i++) { 269 | printf("%d\t%d", outedges_[i].u, outedges_[i].v); 270 | for (int z = 0; z < Z_; z++) { 271 | printf("\t%lg", outedges_[i].w[z]); 272 | } 273 | printf("\n"); 274 | } 275 | } 276 | 277 | double TIC::PProb(const vector& v1, const vector& v2) { 278 | double rst = 0; 279 | for (unsigned int i = 0; i < v1.size(); i++) { 280 | rst += v1[i]*v2[i]; 281 | } 282 | rst = rst > 1 ? 1 : rst; 283 | return rst; 284 | } 285 | 286 | double TIC::MaxPProb(vector& v) { 287 | double rst = 0; 288 | for (unsigned int i = 0; i < v.size(); i++) { 289 | if (rst < v[i]) rst = v[i]; 290 | } 291 | return rst; 292 | } 293 | 294 | bool min_heap_cmp(const di&a, const di&b) { 295 | return a.first > b.first; 296 | } 297 | 298 | double TIC::GetOutEdgeWeight(int vertex, int idx, const vector& item) { 299 | int index; 300 | if (vertex == 0) 301 | index = idx; 302 | else 303 | index = outindex_[vertex-1]+1+idx; 304 | 305 | if (outcflag_[index] == false) { 306 | outcflag_[index] = true; 307 | Edge e = outedges_[index]; 308 | // printf("vertex %d, e.u %d\n", vertex, e.u); 309 | outcache_[index] = PProb(e.w, item); 310 | } 311 | return outcache_[index]; 312 | } 313 | 314 | double TIC::GetInEdgeWeight(int vertex, int idx, const vector& item) { 315 | int index; 316 | if (vertex == 0) 317 | index = idx; 318 | else 319 | index = inindex_[vertex-1]+1+idx; 320 | 321 | if (incflag_[index] == false) { 322 | incflag_[index] = true; 323 | Edge e = inedges_[index]; 324 | incache_[index] = PProb(e.w, item); 325 | } 326 | return incache_[index]; 327 | } 328 | 329 | vector TIC::DijkstraWithStopIds(int u, const double max, const set& stops) { 330 | vector rst; 331 | vector seen; // distance heap 332 | map dist; 333 | dist[u] = 0; 334 | seen.push_back(di(0, u)); 335 | make_heap(seen.begin(), seen.end(), min_heap_cmp); 336 | 337 | // variables used in the while loop. 338 | di top; 339 | double v_dist, w_dist; int v, w; 340 | vector neighbors; 341 | 342 | while (!seen.empty()) { 343 | top = seen.front(); 344 | pop_heap(seen.begin(),seen.end(), min_heap_cmp); seen.pop_back(); 345 | v_dist = top.first; v = top.second; 346 | 347 | if (v_dist > max) { 348 | break; 349 | } 350 | 351 | if (stops.count(v) == 1) continue; 352 | 353 | // dist must contain v already 354 | assert (dist.count(v) != 0); 355 | 356 | if (dist.at(v) < v_dist) { 357 | // this is an old value selected bofore. 358 | continue; 359 | } 360 | 361 | // shortest distance vertex for sure. 362 | rst.push_back(di(exp(-v_dist), v)); 363 | 364 | for (unsigned int i = 0; i < GetOutNeighbor(v); i++) { 365 | Edge e = GetOutEdge(v, i); 366 | w_dist = -log(MaxPProb(e.w)); 367 | w = e.v; 368 | if (dist.count(w) == 0 || w_dist + v_dist < dist.at(w)) { 369 | dist[w] = w_dist + v_dist; 370 | seen.push_back(di(w_dist+v_dist, w)); push_heap(seen.begin(), seen.end(), min_heap_cmp); 371 | } 372 | } 373 | } 374 | // printf("Dijkstra size :%d\n", rst.size()); 375 | return rst; 376 | } 377 | 378 | vector TIC::Dijkstra(int u, const double max) { 379 | set empty; 380 | return DijkstraWithStopIds(u, max, empty); 381 | } 382 | 383 | double TIC::Spread(vector seeds, vector item) { 384 | srand (time(NULL)); 385 | int n_times = 1000; 386 | 387 | int h, t, k_top = seeds.size(); 388 | vector list; 389 | set active; 390 | int resultSize = 0; 391 | for (int it=0; it < n_times; it++) { 392 | list.clear(); 393 | active.clear(); 394 | for (int i = 0; i < k_top; i++) 395 | { 396 | list.push_back(seeds[i]); 397 | active.insert(seeds[i]); 398 | } 399 | resultSize += k_top; 400 | 401 | h = 0; 402 | t = k_top; 403 | 404 | while (h item, char *filename) { 423 | FILE *f = fopen(filename, "w"); 424 | fprintf(f, "%d %d\n", n_, m_); 425 | map, double> m; 426 | int u, v; 427 | for (int i = 0; i < m_; i++) { 428 | u = outedges_[i].u; 429 | v = outedges_[i].v; 430 | m[make_pair(u, v)] = PProb(outedges_[i].w, item); 431 | } 432 | for (int i = 0; i < m_; i++) { 433 | u = outedges_[i].u; 434 | v = outedges_[i].v; 435 | pairuv = make_pair(u, v); 436 | pairvu = make_pair(v, u); 437 | fprintf(f, "%d %d %lg %lg\n", u, v, 438 | m.count(uv) == 0 ? 0 : m[uv], 439 | m.count(vu) == 0 ? 0 : m[vu]); 440 | fprintf(f, "%d %d %lg %lg\n", v, u, 441 | m.count(vu) == 0 ? 0 : m[vu], 442 | m.count(uv) == 0 ? 0 : m[uv]); 443 | } 444 | fclose(f); 445 | } 446 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/mia.cpp: -------------------------------------------------------------------------------- 1 | #include "MIA.h" 2 | #include "graph.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | int MIA::n = 0; 12 | int MIA::top = 0; 13 | double MIA::d[MAX_K]; 14 | int MIA::list[MAX_K]; 15 | char MIA::file[] = "MIA_0000.txt"; 16 | 17 | int MIA::k=1; 18 | vector MIA::dd(MAX_NODE,0); 19 | double MIA::longest = log(100.0); 20 | vector MIA::dp(MAX_NODE,1.0); 21 | vector MIA::used(MAX_NODE); 22 | vectorMIA::self(MAX_NODE); 23 | vector MIA::lastupdate(MAX_NODE,-1); 24 | vectorMIA::delta(MAX_NODE); 25 | vectorMIA::children(MAX_NODE,NULL); 26 | vectorMIA::path(MAX_NODE,NULL); 27 | 28 | int *MIA::S; 29 | double *MIA::distance, *MIA::b; 30 | int *MIA::numchild; 31 | int *MIA::queue; 32 | int *MIA::heap; 33 | int *MIA::childlist, *MIA::oldchildlist, *MIA::parent; 34 | bool *MIA::validlist[MAX_K]={NULL}; 35 | vector *MIA::childnum; 36 | vector *MIA::allb; 37 | //double ratio=0.01; 38 | 39 | int MIA::GetMax(int round) 40 | { 41 | double max = -1000000.0; 42 | int mp = -1; 43 | for (int j=0; jmax) 48 | { 49 | max = tmp; 50 | mp = j; 51 | } 52 | } 53 | return mp; 54 | 55 | 56 | } 57 | 58 | int MIA::GetMax0(int round) 59 | { 60 | double max = -1000000.0; 61 | int mp = -1; 62 | return mp; 63 | 64 | 65 | } 66 | 67 | int MIA::generateMIAfrom(int round, int node){ 68 | int top=0, bottom=0; 69 | distance[node]=0; 70 | heap[0]=node; 71 | top++; 72 | while (true){ 73 | //pop out of heap 74 | if (distance[heap[0]]distance[heap[0]]+e.w1+EPS) { 81 | if (S[e.v]>=n){ 82 | distance[e.v]=distance[heap[0]]+e.w1; 83 | heap[top]=e.v; 84 | int j=top++, x=(j-1)/2; 85 | double temp=distance[heap[j]]; 86 | while (j>0) { 87 | if (distance[heap[x]]>temp){ 88 | heap[j]=heap[x]; 89 | if (S[heap[j]]0) { 103 | if (distance[heap[x]]>temp){ 104 | heap[j]=heap[x]; 105 | if (S[heap[j]]0) { 146 | for (int j=0;jdistance[heap[0]]+e.w2+EPS) { 178 | parent[e.v]=heap[0]; 179 | b[e.v]=exp(-e.w2); 180 | if (S[e.v]>=n){ 181 | distance[e.v]=distance[heap[0]]+e.w2; 182 | heap[top]=e.v; 183 | int j=top++, x=(j-1)/2; 184 | double temp=distance[heap[j]]; 185 | while (j>0) { 186 | if (distance[heap[x]]>temp){ 187 | heap[j]=heap[x]; 188 | if (S[heap[j]]0) { 202 | if (distance[heap[x]]>temp){ 203 | heap[j]=heap[x]; 204 | if (S[heap[j]]=0;head--) { 275 | x=queue[head], u=path[node][x]; 276 | delta[node][x]=(1-self[node][u])/(1-self[node][x]*b[childlist[x]])*b[childlist[x]]*delta[node][u]; 277 | dp[childlist[x]]+=delta[node][x]*(1-self[node][x]); 278 | //if (delta[node][x]*(1-self[node][x])>1) printf(">1 %d\n", node); 279 | } 280 | 281 | return bottom; 282 | } 283 | 284 | int MIA::generateMIAto0(int node){ 285 | int top=0, bottom=0; 286 | distance[node]=0; 287 | heap[0]=node; 288 | top++; 289 | bottom=dd[node]; 290 | int head=0, tail=0; 291 | for (int i=0;i=0;head--) { 322 | x=queue[head], u=path[node][x]; 323 | delta[node][x]=(1-self[node][u])/(1-self[node][x]*b[x])*b[x]*delta[node][u]; 324 | dp[childlist[x]]+=delta[node][x]*(1-self[node][x]); 325 | } 326 | 327 | return bottom; 328 | } 329 | int MIA::count(int node){ 330 | int top=0, bottom=0; 331 | distance[node]=0; 332 | heap[0]=node; 333 | top++; 334 | parent[node]=node; 335 | b[node]=1; 336 | int count=0; 337 | while (true){ 338 | //stack out of heap 339 | if (distance[heap[0]]0) return count; 345 | for (int i=0;idistance[heap[0]]+e.w2+EPS) { 349 | parent[e.v]=heap[0]; 350 | b[e.v]=exp(-e.w2); 351 | if (S[e.v]>=n){ 352 | distance[e.v]=distance[heap[0]]+e.w2; 353 | heap[top]=e.v; 354 | int j=top++, x=(j-1)/2; 355 | double temp=distance[heap[j]]; 356 | while (j>0) { 357 | if (distance[heap[x]]>temp){ 358 | heap[j]=heap[x]; 359 | if (S[heap[j]]0) { 373 | if (distance[heap[x]]>temp){ 374 | heap[j]=heap[x]; 375 | if (S[heap[j]]=0;head--) { 446 | x=queue[head], u=path[node][x]; 447 | delta[node][x]=(1-self[node][u])/(1-self[node][x]*b[childlist[x]])*b[childlist[x]]*delta[node][u]; 448 | dp[childlist[x]]+=delta[node][x]*(1-self[node][x]); 449 | } 450 | 451 | return bottom; 452 | } 453 | 454 | double MIA::Build(int num, int bound) 455 | { 456 | clock_t start, end; 457 | start = clock(); 458 | n = Graph::GetN(); 459 | longest=log(double(bound)); 460 | top = num; 461 | double treesize=0; 462 | S = new int[n]; 463 | distance = new double[n]; 464 | b = new double[n]; 465 | heap = new int[n]; 466 | childlist = new int[n]; 467 | oldchildlist = new int[n]; 468 | parent = new int[n]; 469 | numchild = new int[n]; 470 | queue = new int[n]; 471 | childnum=new vector[n]; 472 | allb=new vector[n]; 473 | 474 | used.resize(n); 475 | lastupdate.resize(n); 476 | children.resize(n); 477 | dp.resize(n); 478 | self.resize(n); 479 | dd.resize(n); 480 | delta.resize(n); 481 | path.resize(n); 482 | int set[SET_SIZE]; 483 | 484 | double old = 0.0; 485 | 486 | int i=0; 487 | for (i=0; i max) { 522 | max=improve; 523 | mp=x; 524 | } 525 | } 526 | used[mp] = true; 527 | set[i] = mp; 528 | list[i] = mp; 529 | d[i] = max; 530 | old+=d[i]; 531 | generateMIAfrom(i, mp); 532 | 533 | for (i=1; i max) { 541 | max=improve; 542 | mp=x; 543 | } 544 | used[mp] = true; 545 | set[i] = mp; 546 | list[i] = mp; 547 | d[i] = max; 548 | old+=d[i]; 549 | generateMIAfrom(i, mp); 550 | } 551 | int ct=0; 552 | delete[] childlist; 553 | delete[] oldchildlist; 554 | delete[] distance; 555 | delete[] S; 556 | delete[] heap; 557 | delete[] b; 558 | delete[] parent; 559 | delete[] numchild; 560 | delete[] queue; 561 | 562 | for (i=0;i max) { 632 | max=improve; 633 | mp=x; 634 | } 635 | } 636 | used[mp] = true; 637 | set[i] = mp; 638 | list[i] = mp; 639 | d[i] = max; 640 | old+=d[i]; 641 | generateMIAfrom(i, mp); 642 | 643 | for (i=1; itop? Run(NUM_ITER/100, i+1, set) - old : RunFast(NUM_ITER/100, i+1, set) - old; 651 | if (improve > max) { 652 | max=improve; 653 | mp=x; 654 | } 655 | } 656 | used[mp] = true; 657 | set[i] = mp; 658 | list[i] = mp; 659 | d[i] = max; 660 | old+=d[i]; 661 | generateMIAfrom(i, mp); 662 | } 663 | delete[] childlist; 664 | delete[] oldchildlist; 665 | delete[] distance; 666 | delete[] S; 667 | delete[] heap; 668 | delete[] b; 669 | delete[] parent; 670 | 671 | for (i=0;i=top) 706 | return -1; 707 | return list[i]; 708 | } 709 | 710 | 711 | char* MIA::filename(int bound) 712 | { 713 | sprintf(file,"MIA_%04d.txt", bound); 714 | return file; 715 | } 716 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/Code/graph.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | #include /* srand, rand */ 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | using namespace std; 10 | 11 | bool Graph::built = false; 12 | int Graph::n = 0; 13 | int Graph::m = 0; 14 | vector Graph::index; 15 | vector Graph::degree(MAX_NODE,0); 16 | vector Graph::edges; 17 | 18 | void Graph::qsort_edges(int h, int t) 19 | { 20 | if (hmid.u)||((edges[j].u==mid.u)&&(edges[j].v>mid.v)))) 29 | j--; 30 | if (iedges[i].w2) 362 | { 363 | edges[i].w1=-log(prob1); 364 | edges[i].w2=-log(prob2); 365 | } else { 366 | edges[i].w1=-log(prob2); 367 | edges[i].w2=-log(prob1); 368 | } 369 | //edges[i+m].u = edges[i].v; 370 | //edges[i+m].v = edges[i].u; 371 | edges[i].c = 1; 372 | //edges[i+m].c = 1; 373 | degree[edges[i].u]++; 374 | //degree[edges[i].v]++; 375 | } 376 | 377 | qsort_edges(0, 2*m-1); 378 | 379 | int m1 = 0; 380 | //printf("%d %d\n",n,m); 381 | for (int i=1; i<2*m; i++) 382 | { 383 | if ((edges[i].u != edges[m1].u) || (edges[i].v != edges[m1].v)) 384 | { 385 | m1++; 386 | edges[m1] = edges[i]; 387 | } 388 | else 389 | { 390 | edges[m1].c++; 391 | } 392 | } 393 | if (m!=0) 394 | m = m1+1; 395 | 396 | index.resize(n); 397 | for (int i=0; i > pa; 419 | for (int i=0; iedges[i].w2) 426 | if (pa.find(edges[i].u)!=pa.end() && pa[edges[i].u].find(edges[i].v)!=pa[edges[i].u].end()) 427 | { 428 | edges[i].w1=-log(prob1); 429 | edges[i].w2=-log(prob2); 430 | //else { 431 | edges[i+m].u = edges[i].v; 432 | edges[i+m].v = edges[i].u; 433 | edges[i+m].w1=-log(prob2); 434 | edges[i+m].w2=-log(prob1); 435 | edges[i].c = 1; 436 | edges[i+m].c = 1; 437 | degree[edges[i].u]++; 438 | degree[edges[i].v]++; 439 | continue; 440 | } 441 | if (pa.find(edges[i].v)!=pa.end() && pa[edges[i].v].find(edges[i].u)!=pa[edges[i].v].end()) 442 | { 443 | //printf("%d %d\n", edges[i].u, edges[i].v); 444 | edges[i].w1=-log(prob2); 445 | edges[i].w2=-log(prob1); 446 | edges[i+m].u = edges[i].v; 447 | edges[i+m].v = edges[i].u; 448 | edges[i+m].w1=-log(prob1); 449 | edges[i+m].w2=-log(prob2); 450 | edges[i].c = 1; 451 | edges[i+m].c = 1; 452 | degree[edges[i].u]++; 453 | degree[edges[i].v]++; 454 | continue; 455 | } 456 | if (rand()<0.5*RAND_MAX) 457 | { 458 | pa[edges[i].u][edges[i].v]=true; 459 | edges[i].w1=-log(prob1); 460 | edges[i].w2=-log(prob2); 461 | //else { 462 | edges[i+m].u = edges[i].v; 463 | edges[i+m].v = edges[i].u; 464 | edges[i+m].w1=-log(prob2); 465 | edges[i+m].w2=-log(prob1); 466 | // } 467 | } 468 | else 469 | { 470 | pa[edges[i].v][edges[i].u]=true; 471 | edges[i].w1=-log(prob2); 472 | edges[i].w2=-log(prob1); 473 | //else { 474 | edges[i+m].u = edges[i].v; 475 | edges[i+m].v = edges[i].u; 476 | edges[i+m].w1=-log(prob1); 477 | edges[i+m].w2=-log(prob2); 478 | } 479 | edges[i].c = 1; 480 | edges[i+m].c = 1; 481 | degree[edges[i].u]++; 482 | degree[edges[i].v]++; 483 | } 484 | 485 | qsort_edges(0, 2*m-1); 486 | 487 | int m1 = 0; 488 | //printf("%d %d\n",n,m); 489 | for (int i=1; i<2*m; i++) 490 | { 491 | if ((edges[i].u != edges[m1].u) || (edges[i].v != edges[m1].v)) 492 | { 493 | edges[m1].w1=-log(1-pow(1-exp(-edges[m1].w1),edges[m1].c)); 494 | edges[m1].w2=-log(1-pow(1-exp(-edges[m1].w2),edges[m1].c)); 495 | m1++; 496 | edges[m1] = edges[i]; 497 | } 498 | else 499 | { 500 | edges[m1].c++; 501 | } 502 | } 503 | if (m!=0) 504 | m = m1+1; 505 | 506 | index.resize(n); 507 | for (int i=0; i > pa; 529 | for (int i=0; i<2*m; i++) 530 | { 531 | double x1,x2; 532 | scanf("%ld %ld %lg %lg\n", &edges[i].u, &edges[i].v, &x1,&x2); 533 | //printf("%d %d %lg %lg\n",edges[i].u,edges[i].v,edges[i].w1,edges[i].w2); 534 | edges[i].u--; 535 | edges[i].v--; 536 | //if (edges[i].w1>edges[i].w2) 537 | // if (pa.find(edges[i].u)!=pa.end() && pa[edges[i].u].find(edges[i].v)!=pa[edges[i].u].end()) 538 | // { 539 | //// edges[i].w1=-log(prob1); 540 | //// edges[i].w2=-log(prob2); 541 | //////else { 542 | //// edges[i+m].u = edges[i].v; 543 | //// edges[i+m].v = edges[i].u; 544 | //// edges[i+m].w1=-log(prob2); 545 | //// edges[i+m].w2=-log(prob1); 546 | //// edges[i].c = 1; 547 | //// edges[i+m].c = 1; 548 | //// degree[edges[i].u]++; 549 | //// degree[edges[i].v]++; 550 | // continue; 551 | // } 552 | if (i%2) 553 | { 554 | ////printf("%d %d\n", edges[i].u, edges[i].v); 555 | //edges[i].w1=-log(prob2); 556 | //edges[i].w2=-log(prob1); 557 | //edges[i+m].u = edges[i].v; 558 | //edges[i+m].v = edges[i].u; 559 | //edges[i+m].w1=-log(prob1); 560 | //edges[i+m].w2=-log(prob2); 561 | //edges[i].c = 1; 562 | //edges[i+m].c = 1; 563 | //degree[edges[i].u]++; 564 | //degree[edges[i].v]++; 565 | edges[i].w1=edges[i-1].w2; 566 | edges[i].w2=edges[i-1].w1; 567 | edges[i].c=1; 568 | continue; 569 | } 570 | //pa[edges[i].u][edges[i].v]=true; 571 | int x=rand(); 572 | if (x*3 > pa; 653 | for (int i=0; i > pa; 788 | for (int i=0; imaxdegree) maxdegree=degree[i]; 884 | tdegree+=degree[i]; 885 | //if (degree[i]%2) printf("%d\n", i); 886 | } 887 | printf("average degree:\t%lg\n",tdegree/n); 888 | printf("maximal degree:\t%d\n",maxdegree); 889 | int maxcmp=0,ncmp=0; 890 | bool *used=new bool[n]; 891 | memset(used,0,n); 892 | while (1) 893 | { 894 | queue q; 895 | for (i=0;imaxcmp) maxcmp=cmpsize; 917 | } 918 | printf("# of connected component:\t%d\n",ncmp); 919 | printf("largest component size:\t%d\n",maxcmp); 920 | printf("average component size:\t%lg\n",double(n)/ncmp); 921 | } 922 | -------------------------------------------------------------------------------- /Topic-Aware-IM/src/lastfm.list: -------------------------------------------------------------------------------- 1 | 1372 2 | 117 290.206 3 | 312 261.724 4 | 449 255.841 5 | 17 247.353 6 | 51 239.111 7 | 242 238.397 8 | 605 235.433 9 | 264 230.013 10 | 610 226.81 11 | 189 219.444 12 | 170 212.8 13 | 915 208.514 14 | 382 205.631 15 | 622 205.456 16 | 637 205.12 17 | 293 203.953 18 | 25 203.95 19 | 297 203.95 20 | 3 202.806 21 | 828 201.925 22 | 244 200.915 23 | 7 198.819 24 | 252 198.819 25 | 302 198.806 26 | 208 198.781 27 | 298 197.685 28 | 1233 196.938 29 | 1032 195.532 30 | 144 192.39 31 | 1108 191.838 32 | 613 191.193 33 | 36 189.636 34 | 147 189.236 35 | 39 186.974 36 | 154 186.876 37 | 365 186.818 38 | 190 186.183 39 | 554 186.183 40 | 967 184.518 41 | 1141 183.959 42 | 223 183.892 43 | 1069 183.704 44 | 299 182.989 45 | 204 182.548 46 | 197 182.082 47 | 753 180.291 48 | 26 180.158 49 | 587 179.854 50 | 21 179.713 51 | 250 178.281 52 | 102 177.355 53 | 321 175.233 54 | 272 173.818 55 | 727 173.612 56 | 315 170.072 57 | 1029 169.894 58 | 896 165.207 59 | 84 163.063 60 | 149 161.967 61 | 61 159.08 62 | 411 158.496 63 | 652 156.499 64 | 265 156.064 65 | 135 155.251 66 | 155 153.202 67 | 823 152.001 68 | 464 149.671 69 | 1252 149.517 70 | 535 148.517 71 | 60 148.254 72 | 472 147.1 73 | 1191 145.557 74 | 243 145.131 75 | 215 145.002 76 | 185 143.755 77 | 491 143.755 78 | 294 143.073 79 | 186 142.568 80 | 127 141.51 81 | 468 140.94 82 | 52 140.256 83 | 758 140.06 84 | 368 139.673 85 | 345 138.26 86 | 139 138.056 87 | 279 136.64 88 | 171 136.065 89 | 383 135.282 90 | 196 132.869 91 | 970 132.484 92 | 1094 132.092 93 | 176 131.888 94 | 379 128.233 95 | 567 128.214 96 | 576 126.9 97 | 28 126.282 98 | 647 125.967 99 | 229 125.482 100 | 200 125.177 101 | 41 124.822 102 | 1 124.804 103 | 16 124.257 104 | 420 122.508 105 | 13 122.325 106 | 775 122.315 107 | 936 121.667 108 | 161 121.449 109 | 744 120.371 110 | 532 119.85 111 | 599 119.624 112 | 46 116.957 113 | 564 116.777 114 | 742 116.084 115 | 199 114.792 116 | 217 114.485 117 | 471 114.435 118 | 22 114.068 119 | 369 114.033 120 | 75 113.494 121 | 20 112.362 122 | 568 111.669 123 | 827 111.152 124 | 130 111.151 125 | 672 110.214 126 | 18 110.166 127 | 105 110.162 128 | 306 109.951 129 | 633 109.483 130 | 248 109.095 131 | 426 108.576 132 | 456 108.02 133 | 695 107.917 134 | 2 107.727 135 | 150 107.63 136 | 112 106.228 137 | 663 106.156 138 | 504 105.642 139 | 413 104.956 140 | 920 104.955 141 | 205 104.596 142 | 609 104.55 143 | 578 104.469 144 | 198 103.271 145 | 218 103.224 146 | 134 102.475 147 | 441 101.961 148 | 335 101.863 149 | 558 101.437 150 | 697 100.568 151 | 660 100.324 152 | 865 99.9375 153 | 620 99.6251 154 | 591 99.0264 155 | 157 98.4329 156 | 27 97.866 157 | 478 97.7246 158 | 640 96.3969 159 | 137 94.5795 160 | 83 93.6653 161 | 1046 93.6448 162 | 351 93.4849 163 | 536 93.3647 164 | 232 93.2291 165 | 615 93.2273 166 | 129 92.9932 167 | 153 92.513 168 | 100 92.2353 169 | 523 91.8784 170 | 704 91.6928 171 | 846 91.3817 172 | 342 91.2123 173 | 745 91.136 174 | 1215 91.1001 175 | 816 90.7182 176 | 894 90.657 177 | 98 90.6002 178 | 798 90.4665 179 | 66 90.2186 180 | 1096 90.0936 181 | 367 90.0654 182 | 169 89.654 183 | 359 88.4619 184 | 583 87.9377 185 | 626 87.9187 186 | 483 87.8288 187 | 113 87.7857 188 | 278 87.7187 189 | 500 86.7792 190 | 133 86.2825 191 | 174 85.8998 192 | 694 85.7032 193 | 589 85.6643 194 | 156 85.3339 195 | 679 85.0549 196 | 386 85.042 197 | 389 84.861 198 | 629 84.5093 199 | 1219 84.2332 200 | 619 84.1687 201 | 285 84.1375 202 | 666 83.5838 203 | 617 83.4435 204 | 329 83.378 205 | 510 83.0265 206 | 1115 82.4896 207 | 195 82.4631 208 | 475 82.3057 209 | 690 81.6713 210 | 825 81.4298 211 | 1214 79.9051 212 | 925 79.5951 213 | 59 79.3918 214 | 442 79.238 215 | 47 78.9054 216 | 565 78.7637 217 | 422 78.5317 218 | 29 78.144 219 | 392 77.9083 220 | 1151 77.8087 221 | 809 77.4783 222 | 507 77.3863 223 | 339 77.1617 224 | 62 76.951 225 | 353 76.3802 226 | 763 76.2459 227 | 384 75.425 228 | 584 75.2998 229 | 1005 75.2182 230 | 116 75.1546 231 | 207 74.7673 232 | 477 74.6242 233 | 72 74.4933 234 | 893 74.2363 235 | 601 74.0956 236 | 1171 73.7872 237 | 417 73.6037 238 | 773 73.4792 239 | 338 73.0716 240 | 115 72.9424 241 | 348 72.899 242 | 240 72.8706 243 | 178 72.7306 244 | 516 72.3017 245 | 1231 72.1944 246 | 43 71.3221 247 | 216 70.3351 248 | 785 70.0873 249 | 513 69.9346 250 | 774 69.2378 251 | 614 69.2285 252 | 64 68.8069 253 | 784 68.6132 254 | 820 68.343 255 | 236 68.0886 256 | 70 67.78 257 | 228 67.1461 258 | 394 66.9617 259 | 731 66.8061 260 | 37 66.7578 261 | 707 66.6642 262 | 136 66.6447 263 | 362 66.5403 264 | 497 66.4127 265 | 484 66.358 266 | 1111 66.2674 267 | 800 66.2638 268 | 1259 66.0923 269 | 708 66.0335 270 | 569 65.8493 271 | 103 65.5598 272 | 973 65.4299 273 | 261 65.2113 274 | 358 65.0971 275 | 97 64.91 276 | 53 64.77 277 | 108 64.4845 278 | 0 64.4337 279 | 819 64.1284 280 | 287 63.9626 281 | 448 63.7711 282 | 866 63.649 283 | 346 63.612 284 | 164 63.5132 285 | 551 63.185 286 | 502 63.1574 287 | 99 63.0044 288 | 282 62.8281 289 | 56 62.8168 290 | 501 62.4707 291 | 118 62.3971 292 | 684 62.3579 293 | 1234 61.6421 294 | 160 61.4185 295 | 423 61.2538 296 | 586 61.2059 297 | 432 60.608 298 | 1006 60.5512 299 | 124 60.3638 300 | 90 60.3396 301 | 1038 60.1899 302 | 120 60.1745 303 | 431 60.001 304 | 1244 59.7672 305 | 380 59.6453 306 | 787 59.5487 307 | 378 59.5163 308 | 754 59.3775 309 | 755 59.1756 310 | 494 58.1992 311 | 692 57.8632 312 | 812 57.7703 313 | 428 57.7703 314 | 485 57.7698 315 | 1087 57.7128 316 | 325 57.607 317 | 815 57.071 318 | 797 56.9003 319 | 191 56.7858 320 | 291 56.6681 321 | 1188 56.5742 322 | 391 56.445 323 | 595 56.2976 324 | 539 56.1509 325 | 562 55.9461 326 | 1080 55.6677 327 | 625 55.6637 328 | 424 55.6101 329 | 148 55.57 330 | 673 55.5487 331 | 79 55.5106 332 | 385 55.2601 333 | 14 55.1944 334 | 611 55.1115 335 | 947 54.9317 336 | 1254 54.8363 337 | 616 54.8311 338 | 159 54.8275 339 | 992 54.6677 340 | 434 54.5712 341 | 1300 54.2809 342 | 963 54.1588 343 | 33 54.1117 344 | 341 53.9953 345 | 123 53.9456 346 | 548 53.3757 347 | 395 53.0142 348 | 840 52.9109 349 | 467 52.5767 350 | 1147 52.4605 351 | 399 52.1574 352 | 732 51.7275 353 | 152 51.7247 354 | 1040 51.3085 355 | 433 51.1816 356 | 273 51.109 357 | 580 51.0643 358 | 187 51.0473 359 | 650 50.9982 360 | 193 50.694 361 | 806 50.4841 362 | 506 50.4504 363 | 180 50.3645 364 | 533 50.2932 365 | 1056 50.0781 366 | 670 49.6141 367 | 284 49.5597 368 | 991 49.513 369 | 612 49.497 370 | 910 49.4891 371 | 1346 49.2879 372 | 122 49.2403 373 | 238 49.2334 374 | 1267 48.9327 375 | 225 48.699 376 | 1021 48.5608 377 | 269 48.4879 378 | 503 48.4527 379 | 780 48.4064 380 | 167 48.2757 381 | 438 48.1911 382 | 377 48.0789 383 | 682 48.0753 384 | 1261 48.0389 385 | 528 47.9979 386 | 114 47.9497 387 | 719 47.5254 388 | 88 47.4602 389 | 714 47.307 390 | 709 47.2438 391 | 555 47.2438 392 | 268 47.2264 393 | 835 47.2245 394 | 473 47.0555 395 | 311 46.9827 396 | 352 46.9219 397 | 1142 46.7701 398 | 451 46.7674 399 | 125 46.7293 400 | 585 46.3887 401 | 419 46.3789 402 | 57 46.3679 403 | 1230 46.3617 404 | 1052 46.172 405 | 739 45.9692 406 | 260 45.958 407 | 725 45.8313 408 | 577 45.8152 409 | 1177 45.733 410 | 733 45.5149 411 | 687 45.5133 412 | 295 45.4519 413 | 445 45.4296 414 | 985 45.3804 415 | 1324 44.9415 416 | 184 44.8986 417 | 849 44.8671 418 | 736 44.8407 419 | 322 44.5469 420 | 12 44.5378 421 | 303 44.27 422 | 310 44.2493 423 | 1036 44.0792 424 | 668 43.8894 425 | 665 43.8515 426 | 508 43.6007 427 | 31 43.4963 428 | 1162 43.4068 429 | 87 43.3935 430 | 74 43.3162 431 | 788 43.1887 432 | 752 42.9805 433 | 95 42.8386 434 | 876 42.8124 435 | 764 42.7724 436 | 304 42.7367 437 | 245 42.5488 438 | 826 42.5071 439 | 1039 42.4823 440 | 210 42.45 441 | 851 42.4375 442 | 799 42.264 443 | 476 42.2413 444 | 430 42.1616 445 | 659 42.0674 446 | 259 41.9305 447 | 905 41.8631 448 | 1232 41.7998 449 | 1078 41.7213 450 | 213 41.6284 451 | 375 41.5838 452 | 878 41.5408 453 | 961 41.4593 454 | 65 41.4026 455 | 15 41.3829 456 | 717 41.1985 457 | 221 41.1152 458 | 425 41.0922 459 | 607 41.0748 460 | 1245 40.9278 461 | 833 40.9115 462 | 1125 40.8735 463 | 81 40.7119 464 | 328 40.6447 465 | 1063 40.5573 466 | 950 40.0408 467 | 1100 39.9633 468 | 641 39.8821 469 | 1026 39.7131 470 | 110 39.5937 471 | 1297 39.5023 472 | 512 39.4948 473 | 406 39.458 474 | 791 39.4208 475 | 604 39.2104 476 | 624 39.047 477 | 249 38.8631 478 | 274 38.676 479 | 772 38.47 480 | 928 38.3465 481 | 214 38.3147 482 | 437 38.3051 483 | 606 38.2757 484 | 262 38.2469 485 | 45 38.093 486 | 547 38.0564 487 | 80 38.011 488 | 247 37.7759 489 | 875 37.5286 490 | 1313 37.4392 491 | 848 37.313 492 | 246 37.2823 493 | 590 37.276 494 | 874 37.2007 495 | 534 37.0982 496 | 333 36.9872 497 | 1333 36.9216 498 | 267 36.9178 499 | 750 36.7308 500 | 940 36.6479 501 | 541 36.4375 502 | 313 36.373 503 | 897 36.3517 504 | 892 36.3294 505 | 649 36.3015 506 | 630 36.2968 507 | 360 36.2254 508 | 361 36.2135 509 | 327 36.0733 510 | 524 36.0394 511 | 1124 35.9458 512 | 908 35.8903 513 | 1028 35.8415 514 | 270 35.8186 515 | 355 35.8036 516 | 396 35.7934 517 | 1132 35.779 518 | 557 35.7732 519 | 49 35.5939 520 | 179 35.5853 521 | 465 35.5127 522 | 128 35.4995 523 | 241 35.4946 524 | 517 35.4574 525 | 803 35.4129 526 | 354 35.412 527 | 720 35.3481 528 | 138 35.3188 529 | 1279 35.2578 530 | 459 35.2009 531 | 106 35.1775 532 | 487 35.0365 533 | 654 34.9637 534 | 655 34.9297 535 | 978 34.9192 536 | 275 34.8593 537 | 201 34.823 538 | 1361 34.6285 539 | 518 34.5989 540 | 588 34.5546 541 | 370 34.4713 542 | 1175 34.3515 543 | 837 34.2238 544 | 667 34.2182 545 | 1268 34.0912 546 | 901 34.0535 547 | 543 33.7274 548 | 496 33.6379 549 | 255 33.6278 550 | 1020 33.4414 551 | 1236 33.4059 552 | 316 33.3295 553 | 737 33.3166 554 | 9 33.0757 555 | 363 32.8526 556 | 869 32.8372 557 | 1241 32.8153 558 | 1072 32.8074 559 | 710 32.5795 560 | 92 32.5483 561 | 1322 32.5258 562 | 23 32.4476 563 | 836 32.4252 564 | 913 32.4066 565 | 151 32.3691 566 | 738 32.3292 567 | 280 32.1347 568 | 525 31.9512 569 | 805 31.8742 570 | 146 31.8739 571 | 703 31.7935 572 | 393 31.6905 573 | 461 31.5587 574 | 862 31.4492 575 | 381 31.363 576 | 891 31.3145 577 | 1136 31.247 578 | 78 31.2057 579 | 716 30.939 580 | 227 30.8779 581 | 808 30.7173 582 | 843 30.3269 583 | 919 30.3132 584 | 982 30.3049 585 | 1248 30.2333 586 | 1263 30.1688 587 | 944 30.1449 588 | 32 30.0337 589 | 308 29.8951 590 | 440 29.7734 591 | 24 29.7725 592 | 877 29.7088 593 | 1033 29.6546 594 | 749 29.5365 595 | 1199 29.4642 596 | 922 29.3989 597 | 751 29.3668 598 | 301 29.3336 599 | 511 29.2437 600 | 202 29.1557 601 | 676 29.0903 602 | 220 29.0177 603 | 481 28.9641 604 | 336 28.8871 605 | 1249 28.8739 606 | 1172 28.8518 607 | 1044 28.7845 608 | 271 28.7181 609 | 1055 28.5579 610 | 296 28.4437 611 | 980 28.433 612 | 718 28.4008 613 | 1071 28.2902 614 | 309 28.2683 615 | 628 28.2548 616 | 777 28.248 617 | 618 28.2008 618 | 701 28.1994 619 | 5 28.1551 620 | 933 28.0814 621 | 443 27.861 622 | 444 27.5095 623 | 1034 27.4207 624 | 863 27.2902 625 | 757 27.2212 626 | 211 27.2016 627 | 921 27.1408 628 | 1240 26.9347 629 | 696 26.9086 630 | 1301 26.802 631 | 685 26.7536 632 | 82 26.732 633 | 1229 26.6856 634 | 768 26.6512 635 | 188 26.5947 636 | 1061 26.1749 637 | 549 26.1356 638 | 168 26.0875 639 | 356 26.0095 640 | 938 25.9769 641 | 1050 25.9711 642 | 740 25.9337 643 | 789 25.9011 644 | 632 25.7208 645 | 415 25.6828 646 | 977 25.6179 647 | 371 25.5398 648 | 885 25.5283 649 | 324 25.4928 650 | 515 25.3972 651 | 101 25.3956 652 | 288 25.3657 653 | 86 25.3361 654 | 317 25.2834 655 | 58 25.2077 656 | 177 25.1947 657 | 680 25.0891 658 | 400 25.0441 659 | 398 24.9478 660 | 756 24.6886 661 | 1303 24.5915 662 | 734 24.5016 663 | 574 24.4469 664 | 40 24.4407 665 | 781 24.4162 666 | 206 24.3587 667 | 256 24.3322 668 | 452 24.2936 669 | 387 24.0516 670 | 38 23.9992 671 | 638 23.7948 672 | 1310 23.7851 673 | 834 23.7236 674 | 747 23.6643 675 | 898 23.6573 676 | 786 23.6287 677 | 705 23.5043 678 | 817 23.4357 679 | 1051 23.4326 680 | 1122 23.3792 681 | 691 23.3513 682 | 219 23.2622 683 | 1286 23.0341 684 | 71 23.0273 685 | 357 22.7766 686 | 924 22.7605 687 | 183 22.6554 688 | 1222 22.6389 689 | 1024 22.6115 690 | 173 22.53 691 | 104 22.3607 692 | 999 22.3399 693 | 807 22.3279 694 | 1155 22.2807 695 | 19 22.0688 696 | 405 21.9517 697 | 1185 21.8752 698 | 527 21.8279 699 | 1008 21.8145 700 | 163 21.728 701 | 969 21.6988 702 | 941 21.6565 703 | 917 21.5337 704 | 44 21.446 705 | 636 21.3722 706 | 762 21.3515 707 | 845 21.3507 708 | 1015 21.3251 709 | 1275 21.3245 710 | 237 21.3174 711 | 495 21.1977 712 | 1010 21.1228 713 | 332 21.0169 714 | 1068 20.985 715 | 674 20.9725 716 | 651 20.9002 717 | 598 20.8261 718 | 986 20.764 719 | 254 20.4916 720 | 793 20.4831 721 | 979 20.3437 722 | 1320 20.3313 723 | 388 20.258 724 | 4 19.847 725 | 1004 19.8296 726 | 895 19.816 727 | 439 19.7621 728 | 1030 19.704 729 | 239 19.5386 730 | 337 19.4575 731 | 596 19.4378 732 | 8 19.0927 733 | 1114 19.0631 734 | 407 19.004 735 | 162 18.9928 736 | 664 18.9664 737 | 96 18.8789 738 | 813 18.8 739 | 300 18.765 740 | 1025 18.6156 741 | 343 18.571 742 | 251 18.4791 743 | 1070 18.4558 744 | 457 18.4197 745 | 479 18.3512 746 | 1210 18.3085 747 | 683 18.2958 748 | 526 18.2217 749 | 1327 18.1612 750 | 767 18.141 751 | 1216 18.0888 752 | 1160 17.6898 753 | 1049 17.669 754 | 1053 17.6426 755 | 277 17.6302 756 | 686 17.6122 757 | 995 17.5518 758 | 126 17.5306 759 | 1102 17.4959 760 | 661 17.3812 761 | 1258 17.2663 762 | 1332 17.255 763 | 145 17.2016 764 | 1041 17.1682 765 | 861 17.0675 766 | 172 17.0397 767 | 1204 16.7858 768 | 1101 16.7736 769 | 1206 16.7555 770 | 723 16.5146 771 | 1370 16.4361 772 | 334 16.331 773 | 581 16.3284 774 | 859 16.3226 775 | 404 16.2563 776 | 143 16.2288 777 | 779 16.0814 778 | 1247 16.0209 779 | 519 15.978 780 | 801 15.9279 781 | 766 15.8728 782 | 458 15.8631 783 | 556 15.8335 784 | 856 15.7917 785 | 63 15.7498 786 | 926 15.7368 787 | 290 15.7271 788 | 1085 15.6074 789 | 89 15.569 790 | 460 15.5654 791 | 1202 15.4605 792 | 412 15.4034 793 | 233 15.3666 794 | 560 15.2621 795 | 881 15.1258 796 | 514 15.082 797 | 1081 14.929 798 | 1326 14.8812 799 | 1205 14.7702 800 | 902 14.7256 801 | 937 14.6797 802 | 372 14.6618 803 | 540 14.5757 804 | 1065 14.5525 805 | 698 14.4042 806 | 132 14.3828 807 | 693 14.3744 808 | 1019 14.2898 809 | 330 14.2845 810 | 681 14.2694 811 | 796 14.1814 812 | 923 13.9655 813 | 759 13.9249 814 | 824 13.8815 815 | 994 13.8165 816 | 1371 13.771 817 | 748 13.7701 818 | 209 13.7247 819 | 873 13.6456 820 | 728 13.6427 821 | 1148 13.5608 822 | 1134 13.5442 823 | 575 13.3033 824 | 276 13.1814 825 | 480 13.1136 826 | 109 13.0891 827 | 253 13.0599 828 | 131 12.7587 829 | 418 12.7391 830 | 436 12.6776 831 | 1225 12.6452 832 | 582 12.5405 833 | 956 12.4286 834 | 669 12.4265 835 | 226 12.3967 836 | 1037 12.3282 837 | 1257 12.2995 838 | 1031 12.297 839 | 73 12.2814 840 | 552 12.27 841 | 258 12.2571 842 | 10 12.1754 843 | 85 12.1631 844 | 414 12.1124 845 | 111 12.0102 846 | 832 11.9956 847 | 1304 11.9711 848 | 952 11.9416 849 | 1221 11.9262 850 | 1016 11.8164 851 | 374 11.7538 852 | 1298 11.7462 853 | 1340 11.6716 854 | 1176 11.6448 855 | 946 11.6404 856 | 1045 11.5935 857 | 858 11.5559 858 | 1287 11.5477 859 | 182 11.5422 860 | 421 11.4922 861 | 1088 11.4425 862 | 1123 11.3763 863 | 505 11.3684 864 | 553 11.2832 865 | 761 11.2171 866 | 983 11.1791 867 | 1099 11.1479 868 | 867 11.1304 869 | 402 11.0725 870 | 990 11.0066 871 | 403 10.9585 872 | 1195 10.9538 873 | 1097 10.9269 874 | 722 10.8402 875 | 1285 10.7898 876 | 603 10.7684 877 | 1075 10.7171 878 | 656 10.713 879 | 573 10.6626 880 | 318 10.6596 881 | 981 10.6232 882 | 410 10.5923 883 | 760 10.4551 884 | 69 10.3786 885 | 918 10.307 886 | 634 10.3035 887 | 1042 10.2059 888 | 559 10.1948 889 | 490 10.1232 890 | 42 10.1216 891 | 320 10.071 892 | 520 10.0652 893 | 1018 10.0543 894 | 1367 9.89825 895 | 474 9.89479 896 | 1182 9.88384 897 | 376 9.88175 898 | 1120 9.86622 899 | 1000 9.84058 900 | 305 9.61354 901 | 545 9.50501 902 | 935 9.44933 903 | 962 9.39208 904 | 1090 9.34888 905 | 790 9.28249 906 | 593 9.18299 907 | 1048 9.13465 908 | 765 9.13326 909 | 597 8.99279 910 | 602 8.92117 911 | 222 8.84985 912 | 48 8.82414 913 | 860 8.78171 914 | 1262 8.72634 915 | 1270 8.69674 916 | 1067 8.63195 917 | 550 8.61123 918 | 289 8.57405 919 | 482 8.53624 920 | 1002 8.50067 921 | 141 8.302 922 | 1187 8.19937 923 | 571 8.08958 924 | 955 8.07605 925 | 292 8.03169 926 | 857 7.99249 927 | 769 7.90983 928 | 1127 7.85801 929 | 1274 7.80263 930 | 1043 7.77969 931 | 1331 7.76978 932 | 77 7.76909 933 | 314 7.64627 934 | 1121 7.6198 935 | 1368 7.57213 936 | 1082 7.54404 937 | 281 7.4429 938 | 931 7.38901 939 | 1076 7.38771 940 | 140 7.302 941 | 1212 7.29193 942 | 621 7.26628 943 | 1109 7.20266 944 | 642 7.19943 945 | 1126 7.18607 946 | 1180 7.18389 947 | 107 7.15829 948 | 1266 7.13944 949 | 1135 7.06718 950 | 469 7.0462 951 | 366 7.02504 952 | 911 7.02245 953 | 960 6.97129 954 | 1017 6.84587 955 | 1338 6.75817 956 | 257 6.74351 957 | 1354 6.72961 958 | 700 6.59908 959 | 888 6.56536 960 | 1066 6.54385 961 | 158 6.43721 962 | 35 6.25452 963 | 224 6.23658 964 | 283 6.20033 965 | 1027 6.19833 966 | 1179 6.18389 967 | 390 6.1772 968 | 883 6.08512 969 | 93 6.07969 970 | 627 6.05415 971 | 499 6.03076 972 | 194 5.99939 973 | 572 5.99669 974 | 741 5.96061 975 | 1193 5.94214 976 | 1235 5.91903 977 | 899 5.83374 978 | 331 5.78136 979 | 631 5.74953 980 | 822 5.72907 981 | 1251 5.70848 982 | 984 5.69332 983 | 1223 5.64914 984 | 1168 5.63344 985 | 364 5.53871 986 | 844 5.47456 987 | 1352 5.40716 988 | 909 5.38485 989 | 1226 5.31068 990 | 266 5.28669 991 | 932 5.28073 992 | 743 5.27835 993 | 987 5.2674 994 | 498 5.24969 995 | 657 5.18412 996 | 579 5.17209 997 | 1144 5.13328 998 | 1196 5.07962 999 | 119 5.06471 1000 | 1203 5.06086 1001 | 409 5.05106 1002 | 966 5.03929 1003 | 1139 5.00253 1004 | 646 4.98047 1005 | 1022 4.97883 1006 | 1207 4.87926 1007 | 887 4.83016 1008 | 489 4.78725 1009 | 1328 4.73427 1010 | 1170 4.69625 1011 | 319 4.67033 1012 | 67 4.66438 1013 | 794 4.63417 1014 | 678 4.63067 1015 | 450 4.61954 1016 | 1167 4.60672 1017 | 307 4.5704 1018 | 1023 4.54376 1019 | 1316 4.53603 1020 | 1184 4.53445 1021 | 165 4.49217 1022 | 1190 4.44449 1023 | 1201 4.43799 1024 | 1335 4.43037 1025 | 1104 4.41522 1026 | 181 4.38904 1027 | 373 4.29115 1028 | 1189 4.18275 1029 | 234 4.18134 1030 | 608 4.1584 1031 | 675 4.15135 1032 | 1357 4.12827 1033 | 643 4.12234 1034 | 839 4.1155 1035 | 945 4.09328 1036 | 30 4.01891 1037 | 1334 3.94898 1038 | 50 3.9077 1039 | 1131 3.90228 1040 | 231 3.83947 1041 | 1339 3.79876 1042 | 1319 3.795 1043 | 546 3.79095 1044 | 1347 3.759 1045 | 453 3.7515 1046 | 853 3.74426 1047 | 230 3.74048 1048 | 488 3.63307 1049 | 927 3.61835 1050 | 1145 3.58726 1051 | 671 3.57828 1052 | 1112 3.57216 1053 | 1250 3.57038 1054 | 462 3.54043 1055 | 1343 3.51401 1056 | 1227 3.50495 1057 | 953 3.49394 1058 | 1107 3.44299 1059 | 286 3.36776 1060 | 879 3.32522 1061 | 968 3.28261 1062 | 1183 3.27276 1063 | 713 3.26442 1064 | 1278 3.23047 1065 | 446 3.18314 1066 | 648 3.18156 1067 | 1237 3.17202 1068 | 347 3.11844 1069 | 323 3.04241 1070 | 1321 3.00037 1071 | 852 2.98976 1072 | 639 2.85535 1073 | 689 2.82613 1074 | 1242 2.8232 1075 | 814 2.81846 1076 | 76 2.81053 1077 | 644 2.7912 1078 | 1200 2.77697 1079 | 1290 2.77361 1080 | 677 2.77104 1081 | 344 2.76531 1082 | 166 2.76381 1083 | 470 2.76046 1084 | 934 2.75935 1085 | 939 2.70628 1086 | 1003 2.69047 1087 | 592 2.66201 1088 | 1325 2.61886 1089 | 1163 2.60876 1090 | 121 2.58902 1091 | 544 2.55549 1092 | 542 2.50681 1093 | 943 2.48851 1094 | 900 2.48076 1095 | 957 2.45151 1096 | 263 2.44754 1097 | 1260 2.44696 1098 | 1007 2.42024 1099 | 1161 2.41395 1100 | 880 2.3826 1101 | 724 2.36663 1102 | 855 2.36189 1103 | 942 2.35286 1104 | 34 2.34318 1105 | 1256 2.33617 1106 | 730 2.33293 1107 | 871 2.32131 1108 | 1291 2.27997 1109 | 1110 2.22916 1110 | 594 2.20174 1111 | 416 2.19222 1112 | 1103 2.1744 1113 | 792 2.13288 1114 | 959 2.10273 1115 | 1198 2.07655 1116 | 1341 2.07015 1117 | 989 2 1118 | 811 2 1119 | 1092 2 1120 | 1345 1.99999 1121 | 1294 1.99426 1122 | 699 1.99064 1123 | 1013 1.98508 1124 | 212 1.9799 1125 | 1079 1.97446 1126 | 912 1.9665 1127 | 795 1.96433 1128 | 776 1.95812 1129 | 1369 1.94671 1130 | 1098 1.92145 1131 | 974 1.9038 1132 | 1166 1.89742 1133 | 1062 1.89647 1134 | 1309 1.89027 1135 | 1178 1.87481 1136 | 509 1.86928 1137 | 1047 1.85656 1138 | 6 1.84849 1139 | 1288 1.84171 1140 | 1330 1.83713 1141 | 1035 1.82853 1142 | 1118 1.80704 1143 | 68 1.80157 1144 | 842 1.8004 1145 | 1154 1.79917 1146 | 1308 1.79498 1147 | 1302 1.79215 1148 | 735 1.7912 1149 | 447 1.77291 1150 | 492 1.7719 1151 | 522 1.76389 1152 | 493 1.76079 1153 | 408 1.75935 1154 | 1280 1.75584 1155 | 1146 1.72889 1156 | 1165 1.72415 1157 | 1093 1.66599 1158 | 1217 1.65183 1159 | 1317 1.64654 1160 | 948 1.63616 1161 | 1116 1.63074 1162 | 726 1.6098 1163 | 340 1.59346 1164 | 326 1.58866 1165 | 916 1.58633 1166 | 729 1.58427 1167 | 1253 1.57341 1168 | 1355 1.56286 1169 | 1169 1.56248 1170 | 882 1.56215 1171 | 1318 1.55211 1172 | 929 1.54762 1173 | 1150 1.53666 1174 | 1012 1.53358 1175 | 566 1.4955 1176 | 1014 1.48903 1177 | 1011 1.48781 1178 | 1273 1.48545 1179 | 951 1.48157 1180 | 1089 1.4741 1181 | 906 1.46453 1182 | 1272 1.45993 1183 | 1213 1.45447 1184 | 538 1.4402 1185 | 1149 1.43951 1186 | 1059 1.43059 1187 | 1353 1.42269 1188 | 463 1.42092 1189 | 1073 1.41064 1190 | 1181 1.39828 1191 | 958 1.39082 1192 | 1159 1.38219 1193 | 1156 1.37834 1194 | 1057 1.37269 1195 | 841 1.37261 1196 | 1054 1.37024 1197 | 662 1.36806 1198 | 1060 1.35452 1199 | 454 1.34391 1200 | 1243 1.33364 1201 | 1129 1.33229 1202 | 1152 1.33228 1203 | 429 1.32888 1204 | 996 1.32525 1205 | 1255 1.31844 1206 | 1323 1.31467 1207 | 1130 1.31129 1208 | 1164 1.3094 1209 | 1311 1.30539 1210 | 350 1.30493 1211 | 600 1.30334 1212 | 1001 1.2708 1213 | 1282 1.27049 1214 | 1138 1.26318 1215 | 1208 1.26235 1216 | 1140 1.25454 1217 | 1074 1.21945 1218 | 521 1.21506 1219 | 746 1.21482 1220 | 175 1.20583 1221 | 1128 1.20454 1222 | 1197 1.20125 1223 | 1315 1.18817 1224 | 1336 1.18334 1225 | 349 1.16811 1226 | 1157 1.1649 1227 | 783 1.15544 1228 | 653 1.14559 1229 | 770 1.13646 1230 | 864 1.13426 1231 | 1158 1.11682 1232 | 1105 1.1154 1233 | 401 1.11203 1234 | 854 1.10912 1235 | 1269 1.10862 1236 | 1277 1.10369 1237 | 1299 1.1031 1238 | 782 1.10097 1239 | 1192 1.09285 1240 | 997 1.09001 1241 | 804 1.08607 1242 | 993 1.07933 1243 | 1289 1.07933 1244 | 831 1.07897 1245 | 903 1.07822 1246 | 537 1.07614 1247 | 1281 1.07046 1248 | 1296 1.06948 1249 | 1337 1.06776 1250 | 1153 1.05829 1251 | 1083 1.05609 1252 | 1220 1.05344 1253 | 1095 1.05315 1254 | 884 1.05018 1255 | 1174 1.04984 1256 | 1360 1.04845 1257 | 702 1.04468 1258 | 623 1.04076 1259 | 721 1.03953 1260 | 1362 1.0372 1261 | 1077 1.03347 1262 | 1283 1.03183 1263 | 1312 1.02787 1264 | 1117 1.0272 1265 | 658 1 1266 | 1264 1 1267 | 1265 1 1268 | 847 1 1269 | 561 1 1270 | 975 1 1271 | 563 1 1272 | 1064 1 1273 | 1271 1 1274 | 850 1 1275 | 954 1 1276 | 570 1 1277 | 1194 1 1278 | 1276 1 1279 | 1209 1 1280 | 1211 1 1281 | 838 1 1282 | 949 1 1283 | 972 1 1284 | 1186 1 1285 | 971 1 1286 | 1284 1 1287 | 1218 1 1288 | 976 1 1289 | 778 1 1290 | 868 1 1291 | 91 1 1292 | 435 1 1293 | 870 1 1294 | 1292 1 1295 | 1293 1 1296 | 192 1 1297 | 1295 1 1298 | 645 1 1299 | 872 1 1300 | 830 1 1301 | 94 1 1302 | 55 1 1303 | 54 1 1304 | 1173 1 1305 | 427 1 1306 | 203 1 1307 | 1305 1 1308 | 1306 1 1309 | 1307 1 1310 | 466 1 1311 | 802 1 1312 | 688 1 1313 | 1084 1 1314 | 965 1 1315 | 771 1 1316 | 1314 1 1317 | 1086 1 1318 | 988 1 1319 | 930 1 1320 | 1091 1 1321 | 1246 1 1322 | 829 1 1323 | 1224 1 1324 | 964 1 1325 | 886 1 1326 | 1143 1 1327 | 397 1 1328 | 635 1 1329 | 889 1 1330 | 821 1 1331 | 1329 1 1332 | 1137 1 1333 | 706 1 1334 | 711 1 1335 | 11 1 1336 | 1239 1 1337 | 998 1 1338 | 890 1 1339 | 142 1 1340 | 712 1 1341 | 531 1 1342 | 530 1 1343 | 1133 1 1344 | 1342 1 1345 | 455 1 1346 | 1344 1 1347 | 486 1 1348 | 715 1 1349 | 529 1 1350 | 1348 1 1351 | 1349 1 1352 | 1350 1 1353 | 1351 1 1354 | 810 1 1355 | 235 1 1356 | 1058 1 1357 | 904 1 1358 | 1356 1 1359 | 1119 1 1360 | 1358 1 1361 | 1359 1 1362 | 1009 1 1363 | 1228 1 1364 | 818 1 1365 | 1363 1 1366 | 1364 1 1367 | 1365 1 1368 | 1366 1 1369 | 907 1 1370 | 1113 1 1371 | 914 1 1372 | 1106 1 1373 | 1238 1 1374 | -------------------------------------------------------------------------------- /Topic-Aware-IM/PMIA/dm.inf.loc: -------------------------------------------------------------------------------- 1 | 1, 30.2359, -97.7951 2 | 2, 48.8634, 2.3333 3 | 3, 34.0430, -118.2672 4 | 5, 37.7826, -122.4076 5 | 6, 40.7612, -73.9869 6 | 8, 30.2691, -97.7494 7 | 9, 37.7794, -122.4235 8 | 10, 38.9119, -94.7664 9 | 11, 38.8964, -94.7545 10 | 12, 26.2847, -80.2096 11 | 13, -25.4372, -49.2671 12 | 14, 49.2781, -123.1284 13 | 15, 42.3470, -71.0874 14 | 16, 40.7588, -73.9852 15 | 17, 39.7369, -104.9887 16 | 18, 35.1184, -89.9449 17 | 19, 33.1376, -117.1891 18 | 20, 30.3227, -97.7396 19 | 21, 32.8003, -96.6341 20 | 22, 33.8097, -117.9227 21 | 23, 40.7559, -73.9824 22 | 24, 42.0321, -76.0173 23 | 25, 37.3317, -121.9959 24 | 26, 37.7486, -122.3867 25 | 27, 36.9740, -122.0260 26 | 28, 30.2811, -97.7452 27 | 29, 38.8847, -94.6432 28 | 30, 30.2017, -97.8775 29 | 31, 30.4722, -97.7994 30 | 32, 30.2691, -97.7494 31 | 33, 30.2371, -97.7949 32 | 35, 40.7545, -73.9772 33 | 36, 33.0795, -96.8231 34 | 37, 40.7805, -73.9668 35 | 38, 39.7639, -86.1555 36 | 40, 37.6164, -122.3862 37 | 41, 45.3310, -121.7113 38 | 42, 30.3048, -97.7424 39 | 43, 37.8266, -122.2520 40 | 44, 34.0486, -118.4359 41 | 45, 30.4237, -97.7021 42 | 48, 35.5972, -82.5536 43 | 49, 33.7596, -84.3318 44 | 50, 38.9690, -94.6082 45 | 51, 41.9118, -87.6771 46 | 52, 44.9864, -93.1695 47 | 53, 30.2016, -97.6671 48 | 54, 37.7007, -122.4837 49 | 55, 30.3381, -97.7190 50 | 56, 40.0168, -105.2808 51 | 57, 45.5227, -122.6734 52 | 58, 49.3732, -123.2924 53 | 59, 37.4536, -122.1151 54 | 60, 35.9809, -79.0531 55 | 61, 35.4793, -97.5214 56 | 62, 41.1430, -81.3571 57 | 63, 37.7851, -122.4326 58 | 64, 36.0849, -115.1491 59 | 65, 39.2854, -94.9069 60 | 66, 38.9581, -95.2506 61 | 67, 30.2679, -97.7493 62 | 68, 48.9941, 8.4003 63 | 69, 33.4633, -86.7952 64 | 70, 28.3872, -81.4924 65 | 71, 37.4481, -122.1595 66 | 72, 36.0809, -115.1468 67 | 73, 51.5032, -0.1188 68 | 74, 37.4252, -122.1459 69 | 75, 30.2329, -97.8649 70 | 76, 38.9903, -94.6088 71 | 77, 37.3946, -122.0809 72 | 78, 30.2576, -97.8069 73 | 79, 37.4631, -122.4311 74 | 80, 30.2355, -97.7716 75 | 81, 30.3170, -97.7496 76 | 82, 42.1984, -122.7155 77 | 83, 37.7908, -122.3892 78 | 84, -34.1024, 18.4800 79 | 85, 37.4320, -122.2016 80 | 86, 36.8599, -121.8154 81 | 87, 37.5636, -122.3245 82 | 88, 38.4024, -122.3619 83 | 89, 30.2679, -97.7493 84 | 90, 32.9546, -96.7630 85 | 91, 37.6529, -97.4290 86 | 92, 30.2663, -97.7712 87 | 93, 38.2607, -122.0548 88 | 94, 37.7613, -122.4307 89 | 95, 32.9664, -97.0380 90 | 96, 39.9123, -105.0528 91 | 97, 37.4224, -122.0880 92 | 98, 32.9815, -97.1601 93 | 99, 30.2296, -97.8370 94 | 100, 51.5204, -0.0917 95 | 101, 51.5442, -0.2008 96 | 102, 37.7957, -122.3937 97 | 103, 30.2016, -97.6671 98 | 104, 48.5812, 7.7485 99 | 105, 37.4320, -122.2016 100 | 107, 37.4266, -122.1728 101 | 108, 39.0529, -94.5914 102 | 109, 37.4448, -122.1610 103 | 110, 30.2650, -97.7462 104 | 111, 38.9558, -94.6861 105 | 112, 37.8098, -122.2645 106 | 113, 30.3892, -97.7528 107 | 114, 30.2654, -97.7402 108 | 115, 47.5634, -122.6269 109 | 116, 39.1798, -76.6710 110 | 117, 30.2580, -97.8073 111 | 120, 26.1915, -80.1387 112 | 121, 50.6234, 3.0352 113 | 122, 30.2952, -97.7843 114 | 123, 32.7962, -96.7951 115 | 124, 37.4575, -122.1319 116 | 125, 37.4179, -122.0255 117 | 126, 32.8443, -96.7861 118 | 127, 25.9579, -80.2389 119 | 128, 33.9435, -118.4072 120 | 129, 39.1918, -120.2483 121 | 130, 37.5661, -122.3241 122 | 131, 37.3284, -122.0061 123 | 132, 30.1887, -97.7688 124 | 134, 37.7840, -122.3946 125 | 135, 34.7138, -92.3992 126 | 136, 37.7840, -122.3946 127 | 137, 39.8773, -75.2417 128 | 139, 30.2679, -97.7493 129 | 140, 38.8510, -94.8174 130 | 141, 38.9510, -104.8036 131 | 142, 30.2594, -97.7384 132 | 143, 27.9315, -82.4828 133 | 144, 40.7381, -73.9906 134 | 145, 41.8282, -71.4095 135 | 147, 39.6385, -86.0828 136 | 148, 39.7127, -86.2997 137 | 149, 30.2618, -97.7618 138 | 151, 38.6830, -90.4800 139 | 152, 39.1918, -120.2483 140 | 153, 59.9128, 10.7560 141 | 154, 30.4078, -97.7267 142 | 155, 30.2811, -97.7452 143 | 157, 37.7513, -122.4319 144 | 158, 30.2691, -97.7494 145 | 159, 37.6363, -122.4010 146 | 160, 37.7847, -122.3952 147 | 161, 41.8965, -87.6388 148 | 162, 37.7648, -122.4223 149 | 163, 29.3044, -94.7927 150 | 164, 30.2494, -97.7495 151 | 165, 49.4597, 11.0730 152 | 167, 30.2529, -97.7006 153 | 168, 31.6316, -7.9942 154 | 170, 33.5580, -117.6696 155 | 171, 33.6511, -117.7462 156 | 172, 30.2827, -97.7382 157 | 173, 30.2679, -97.7493 158 | 175, 48.8939, 2.3868 159 | 176, 59.3301, 18.0769 160 | 177, 37.6164, -122.3862 161 | 178, 40.5892, -105.0629 162 | 179, 29.9616, -95.5922 163 | 180, 37.8198, -122.3733 164 | 181, 30.2602, -97.7510 165 | 182, 37.7786, -122.3937 166 | 183, 30.2620, -97.7417 167 | 184, 61.2078, -149.8383 168 | 185, 37.8001, -122.4421 169 | 186, 41.0740, -111.9796 170 | 189, 47.6503, -122.3496 171 | 190, 40.1392, -105.1221 172 | 191, 40.1403, -105.1170 173 | 192, 37.7784, -122.3910 174 | 193, 38.8945, -94.6702 175 | 194, 38.8979, -94.7426 176 | 195, 39.2974, -94.7161 177 | 196, 39.0622, -94.5906 178 | 197, 48.1199, 16.5609 179 | 198, 33.9254, -116.9015 180 | 199, 51.9115, 4.4578 181 | 201, 37.7896, -122.3977 182 | 202, 37.7806, -122.3963 183 | 203, 30.2159, -97.8308 184 | 204, 29.7078, -98.1311 185 | 205, 40.0169, -105.2774 186 | 206, 41.9092, 12.4573 187 | 207, 36.0745, -95.8846 188 | 209, 30.2081, -97.7212 189 | 210, 30.2039, -97.7177 190 | 211, 30.2693, -97.7476 191 | 212, 30.3127, -97.7387 192 | 213, 30.2691, -97.7422 193 | 214, 41.2486, -76.9663 194 | 215, 30.2602, -97.7510 195 | 216, 51.0402, -114.0811 196 | 217, 36.1007, -115.2801 197 | 218, 37.4158, -122.1526 198 | 219, 35.6120, -97.5667 199 | 220, 35.3609, -97.5476 200 | 221, 30.2582, -97.8077 201 | 222, 37.4258, -122.1430 202 | 223, 42.0908, -87.7653 203 | 224, 40.6439, -73.7828 204 | 225, 29.5433, -95.1378 205 | 226, 30.2420, -97.7680 206 | 227, 32.7783, -96.7601 207 | 228, 39.9501, -75.1503 208 | 229, 39.0078, -94.5786 209 | 230, 47.6502, -122.3498 210 | 232, 37.7950, -122.4227 211 | 233, 37.7425, -97.2822 212 | 234, 30.2980, -97.7475 213 | 235, 37.7865, -122.4036 214 | 236, 37.7406, -122.4345 215 | 237, 32.7842, -96.7844 216 | 238, 41.5830, -93.6185 217 | 239, 41.9132, -87.6542 218 | 240, 40.0193, -105.2746 219 | 241, 37.7710, -122.4689 220 | 242, 47.9800, -122.2047 221 | 243, 30.3322, -97.7403 222 | 244, 41.0835, -74.0586 223 | 245, 33.9125, -117.8673 224 | 246, 37.7649, -122.4226 225 | 247, 37.3231, -121.9528 226 | 248, 49.2251, -122.9901 227 | 249, 39.1021, -94.5817 228 | 250, 37.4693, -122.2119 229 | 251, -27.5240, 153.2683 230 | 252, 37.4861, -122.2291 231 | 253, 30.2016, -97.6671 232 | 254, 37.7982, -122.4072 233 | 255, 51.4950, -0.1466 234 | 256, 37.3102, -121.9145 235 | 257, 39.0896, -94.5863 236 | 258, 39.0419, -94.5935 237 | 259, 35.8774, -78.7931 238 | 260, 39.0922, -94.5836 239 | 261, 30.2647, -97.7308 240 | 262, 30.2016, -97.6671 241 | 264, 38.9560, -95.2502 242 | 265, 38.6349, -90.2239 243 | 267, 30.2654, -97.7559 244 | 268, 30.2691, -97.7494 245 | 269, 41.8246, -71.4044 246 | 270, 36.1074, -86.8149 247 | 271, 38.9853, -94.6085 248 | 272, 30.3079, -97.7506 249 | 273, 48.0761, -122.1802 250 | 274, 39.1854, -94.3705 251 | 275, 35.5017, -97.5220 252 | 276, 34.1559, -118.3461 253 | 277, 38.4065, -122.3667 254 | 278, -36.8515, 174.7639 255 | 279, 30.4017, -97.7153 256 | 281, 37.7826, -122.4076 257 | 282, 25.7765, -80.1962 258 | 283, 32.9334, -96.8172 259 | 284, 32.9104, -96.8058 260 | 285, 37.7985, -122.4495 261 | 286, 37.8074, -122.4344 262 | 287, 38.9661, -94.7797 263 | 288, 42.3555, -71.0493 264 | 289, 37.7981, -122.4037 265 | 290, 38.9696, -95.2361 266 | 291, 37.4900, -122.2284 267 | 292, 28.0186, -82.7656 268 | 293, 36.1023, -115.1712 269 | 295, 36.1103, -115.1545 270 | 296, 37.7552, -122.4234 271 | 297, 39.0622, -94.5906 272 | 298, 45.5238, -122.6809 273 | 299, 40.7377, -73.9838 274 | 300, 39.1068, -94.8353 275 | 301, 38.8725, -94.6703 276 | 302, 61.5062, 23.9293 277 | 303, 32.8975, -97.0403 278 | 304, 37.7602, -122.4100 279 | 305, 37.7777, -122.3889 280 | 307, 38.9670, -95.2610 281 | 308, 27.4085, -82.4506 282 | 309, 37.7893, -122.4015 283 | 310, 47.5880, -122.3340 284 | 311, 38.9106, -94.3632 285 | 313, 37.4021, -122.0315 286 | 314, 37.7792, -122.3979 287 | 315, 33.7995, -84.3240 288 | 316, 36.6430, -93.2667 289 | 317, 32.6022, -85.4891 290 | 318, 42.3642, -71.0540 291 | 319, 37.6209, -122.3899 292 | 320, 45.5243, -122.6808 293 | 321, 49.2624, -123.2452 294 | 322, 45.5119, -122.6147 295 | 323, 41.8741, -87.6251 296 | 324, 30.3017, -97.7449 297 | 325, 43.4243, -80.4421 298 | 326, 51.5159, -0.1642 299 | 327, 30.1025, -98.0132 300 | 328, 30.2679, -97.7493 301 | 329, 30.4821, -97.8330 302 | 330, 39.1600, -75.5555 303 | 331, 37.7724, -122.4060 304 | 332, 37.7894, -122.4052 305 | 333, 38.4801, 22.5825 306 | 334, 37.4479, -122.1598 307 | 335, 30.3079, -97.7506 308 | 336, 30.2679, -97.7493 309 | 337, 40.7287, -73.9950 310 | 338, 34.6230, -98.4426 311 | 339, 38.8939, -77.0651 312 | 340, 38.9715, -95.2353 313 | 341, 50.3757, -4.1928 314 | 342, 40.2387, -77.0469 315 | 343, 30.2691, -97.7494 316 | 344, 8.9964, 38.7874 317 | 345, 30.2491, -97.7500 318 | 346, 40.7058, -74.0096 319 | 347, 47.6626, -122.2978 320 | 348, 37.7683, -122.4216 321 | 350, 36.1059, -96.0763 322 | 351, 30.2679, -97.7493 323 | 352, 39.0898, -94.5860 324 | 354, 30.2618, -97.7618 325 | 355, 37.7794, -122.3949 326 | 356, 37.7647, -122.4036 327 | 357, 36.0851, -79.8317 328 | 359, 33.8325, -116.5469 329 | 360, 50.0510, 8.5855 330 | 361, 40.2338, -111.6602 331 | 362, 53.7319, -0.5715 332 | 363, 35.5082, -97.5249 333 | 364, 37.8038, -122.4153 334 | 365, 30.3408, -97.3465 335 | 366, 37.8005, -122.4378 336 | 367, 30.2454, -97.7804 337 | 368, 37.7826, -122.3930 338 | 369, 39.0029, -94.3345 339 | 370, 45.5022, -122.5777 340 | 371, 29.9840, -90.2578 341 | 373, 40.1079, -75.1161 342 | 374, 39.3594, -74.4316 343 | 375, 38.9229, -94.6271 344 | 376, 30.4195, -95.9345 345 | 377, 37.7624, -122.3974 346 | 378, 35.2401, -80.9183 347 | 379, 40.7392, -73.9946 348 | 380, 59.3420, 17.9674 349 | 382, 30.1721, -95.4749 350 | 383, 53.0556, -0.7836 351 | 384, 39.8745, -75.2436 352 | 385, 41.8803, -87.6275 353 | 387, 29.9475, -90.0691 354 | 388, 30.2743, -97.7405 355 | 389, 30.2505, -97.7491 356 | 391, 37.3665, -121.9263 357 | 392, 39.0183, -94.7379 358 | 393, 38.9652, -92.3455 359 | 394, 39.2895, -76.6165 360 | 395, 37.5534, -122.3004 361 | 396, 43.7224, -79.2370 362 | 397, 45.5308, -122.6847 363 | 398, 36.1110, -79.1037 364 | 399, 34.1012, -118.3234 365 | 400, 37.3067, -121.9776 366 | 401, 38.9394, -94.2467 367 | 402, 30.4608, -97.7920 368 | 403, 35.4985, -97.7390 369 | 405, 32.7905, -96.7976 370 | 406, 37.7865, -122.4036 371 | 407, 39.0411, -94.5947 372 | 408, 36.1109, -86.7471 373 | 409, 28.5422, -81.3777 374 | 411, 37.3331, -122.0295 375 | 412, 39.7254, -104.9865 376 | 413, 45.4737, -122.6480 377 | 414, 37.8703, -122.2726 378 | 415, 35.6725, -105.9492 379 | 416, -34.0381, -53.5430 380 | 417, 37.7758, -122.4227 381 | 418, 40.7738, -73.9809 382 | 419, 37.6934, -97.2976 383 | 420, 30.2179, -97.7964 384 | 421, 39.0034, -94.4640 385 | 422, 30.2742, -97.7405 386 | 424, 39.0425, -94.5946 387 | 425, 37.8085, -122.4402 388 | 426, 35.9958, -78.9001 389 | 427, 37.7736, -122.4215 390 | 428, 37.7949, -122.3927 391 | 429, 42.4869, -83.1439 392 | 430, 33.7745, -84.3713 393 | 431, 45.5225, -122.6781 394 | 432, 41.8845, -87.6258 395 | 435, 30.2690, -97.7432 396 | 436, 64.1467, -21.9336 397 | 437, 30.3074, -97.7399 398 | 438, 30.2315, -97.7971 399 | 439, 30.3379, -97.8071 400 | 440, 26.2437, -80.2541 401 | 441, 37.7827, -122.4063 402 | 443, 40.0837, -75.1880 403 | 444, 39.0426, -94.5931 404 | 445, 38.8938, -77.4288 405 | 446, 35.1652, -84.8763 406 | 447, 37.4165, -121.8980 407 | 448, 39.1004, -94.5814 408 | 449, 38.9712, -90.9636 409 | 450, 45.4295, -75.6975 410 | 451, 44.8812, -93.2141 411 | 452, 34.2109, -118.8442 412 | 453, 30.3551, -97.7339 413 | 455, 36.0361, -86.7875 414 | 457, 30.2679, -97.7493 415 | 458, 37.7812, -122.3914 416 | 459, 45.5026, -122.8595 417 | 460, 40.7692, -73.9816 418 | 461, 35.7779, -78.6776 419 | 462, 40.3952, -105.0123 420 | 463, 27.3825, -82.4422 421 | 464, 39.1918, -120.2483 422 | 465, 37.7865, -122.4036 423 | 466, 37.7859, -122.4050 424 | 467, 19.0923, 72.8567 425 | 468, 37.7599, -122.4291 426 | 469, 30.2180, -97.7522 427 | 470, 36.0182, -115.1013 428 | 471, 37.7881, -122.3983 429 | 472, 30.2602, -97.7510 430 | 473, 37.7847, -122.3952 431 | 474, 37.7719, -122.4301 432 | 476, 32.9283, -97.0864 433 | 477, 37.7498, -122.4204 434 | 478, 37.7764, -122.4266 435 | 479, 37.7784, -122.3894 436 | 480, 39.2818, -76.5912 437 | 481, 38.9712, -95.2351 438 | 482, 36.0849, -115.1491 439 | 483, 38.9399, -94.6096 440 | 484, 29.5627, -98.5931 441 | 485, 35.6944, 139.7599 442 | 486, 39.0914, -94.5867 443 | 487, 32.8656, -96.9314 444 | 488, 40.7283, -73.9995 445 | 489, 38.9622, -94.6686 446 | 490, 37.7976, -122.4064 447 | 491, 30.4590, -97.7494 448 | 492, 32.8816, -97.5765 449 | 493, 40.9503, -72.1991 450 | 494, 29.4858, -98.6661 451 | 495, 37.7814, -122.3915 452 | 496, 30.2667, -97.7455 453 | 497, 35.6149, -97.5672 454 | 498, 37.7817, -122.3942 455 | 499, 30.2618, -97.7618 456 | 500, 40.0169, -105.2774 457 | 501, 39.0880, -94.5838 458 | 502, 37.7403, -122.4665 459 | 503, 46.2098, -119.2207 460 | 504, 30.2671, -97.7444 461 | 505, 37.7870, -122.4103 462 | 507, 37.3665, -121.9263 463 | 508, 35.7791, -78.6356 464 | 509, 30.2685, -97.7362 465 | 511, 37.8102, -122.2659 466 | 512, 37.7933, -122.3946 467 | 513, 38.9257, -94.5850 468 | 514, 44.9750, -93.2529 469 | 515, 38.9257, -94.5850 470 | 516, 30.2691, -97.7494 471 | 519, 37.4451, -122.1626 472 | 520, 30.2691, -97.7494 473 | 521, 41.8424, -88.0022 474 | 522, 51.1555, 4.4139 475 | 523, 40.7244, -73.9924 476 | 524, 17.1232, -89.1006 477 | 525, 30.2701, -97.7504 478 | 526, 41.6395, -71.0259 479 | 527, 40.7715, -73.9561 480 | 528, 37.6164, -122.3862 481 | 529, 40.8022, -77.8634 482 | 532, 34.0858, -118.3441 483 | 533, 47.6702, 11.8545 484 | 534, 32.7944, -96.8000 485 | 535, 38.9150, -94.6380 486 | 536, 30.2679, -97.7493 487 | 537, 33.0101, -96.7149 488 | 538, 30.2778, -97.7513 489 | 539, 37.7633, -122.4154 490 | 540, 30.3079, -97.7506 491 | 541, 35.8697, -78.5825 492 | 542, 29.6141, -98.4840 493 | 543, 39.0248, -94.6888 494 | 544, 39.0471, -95.7252 495 | 545, 39.0898, -94.5864 496 | 546, 30.2576, -97.7596 497 | 547, 39.2899, -84.4677 498 | 548, 30.4671, -97.9521 499 | 549, 36.1141, -115.1986 500 | 550, 39.0513, -94.4808 501 | 551, 38.4113, -122.8405 502 | 552, 32.6719, -97.3759 503 | 553, 51.5010, -0.1250 504 | 554, 47.6253, -122.3434 505 | 555, 39.7392, -104.9910 506 | 556, 41.8979, -73.9738 507 | 557, 45.5243, -122.6808 508 | 558, 30.2618, -97.7618 509 | 559, 39.0389, -94.5868 510 | 560, 30.2602, -97.7510 511 | 561, 32.7516, -97.0830 512 | 562, 40.5842, -105.0774 513 | 563, 32.1906, -100.0111 514 | 564, 33.6052, -7.6205 515 | 565, 39.7418, -105.5165 516 | 566, 36.1392, -86.8006 517 | 567, 36.1416, -86.8593 518 | 568, 33.6337, -117.9172 519 | 569, 30.1625, -97.8436 520 | 570, 36.9878, -121.9720 521 | 571, 39.0976, -94.5833 522 | 572, 30.2676, -97.7409 523 | 574, 30.2691, -97.7494 524 | 575, 30.3177, -97.7218 525 | 576, 33.7446, -116.3030 526 | 577, 39.0442, -94.6207 527 | 578, 28.4311, -81.3076 528 | 579, 40.7508, -73.9676 529 | 580, 43.5932, -79.5174 530 | 582, 30.4641, -97.7704 531 | 583, 30.3781, -97.6862 532 | 584, 58.5164, -117.1429 533 | 585, 35.4796, -97.5216 534 | 586, 37.7597, -122.4272 535 | 587, 37.7898, -122.4000 536 | 588, 30.3280, -97.7115 537 | 589, 30.2511, -97.7542 538 | 590, 36.1314, -86.6693 539 | 591, 40.7299, -73.9974 540 | 592, 37.3904, -94.7043 541 | 593, 32.8587, -96.7697 542 | 594, 37.8703, -122.2726 543 | 595, 37.7858, -122.4203 544 | 596, 38.8976, -77.0366 545 | 597, 39.0211, -77.1868 546 | 599, 34.1961, -118.3539 547 | 600, 37.3879, -122.0827 548 | 601, 37.7625, -122.4192 549 | 602, 40.7439, -73.9838 550 | 603, 30.2557, -97.7634 551 | 604, 39.1040, -94.5886 552 | 605, 40.8148, -74.2190 553 | 606, 32.8004, -96.7778 554 | 607, 40.0169, -105.2627 555 | 608, 40.7764, -73.9477 556 | 610, 37.7870, -122.4330 557 | 611, 30.2843, -97.7410 558 | 612, 37.7725, -122.5095 559 | 613, 39.0514, -94.4805 560 | 615, 35.4752, -97.5196 561 | 616, 30.2016, -97.6671 562 | 617, 29.5611, -98.5204 563 | 618, 45.4452, 10.9871 564 | 619, 35.6303, 139.7444 565 | 620, 35.6808, 139.7672 566 | 621, 35.6710, 139.7328 567 | 622, 51.3180, 6.0249 568 | 623, 44.9806, -93.2701 569 | 624, 49.0047, 2.5666 570 | 625, 38.5743, -121.4030 571 | 626, 42.7107, -71.4531 572 | 627, 32.7743, -97.0811 573 | 629, 52.4872, 13.4213 574 | 630, 35.6898, 139.6986 575 | 631, 21.5949, 39.1442 576 | 632, 25.7969, -80.3369 577 | 633, 17.4249, 78.4597 578 | 634, 40.7002, -111.8948 579 | 635, 37.7954, -122.4032 580 | 636, 32.8975, -97.0403 581 | 637, 19.7106, -155.0761 582 | 638, 25.1955, 55.2772 583 | 639, 30.2855, -97.7420 584 | 640, 24.7165, 46.6449 585 | 641, 21.7051, 39.2340 586 | 643, 48.7590, -122.4646 587 | 644, 21.5604, 39.1851 588 | 645, 41.5369, -87.4765 589 | 646, 53.5148, 10.0988 590 | 647, 42.9175, -78.8770 591 | 649, 40.4885, -86.1591 592 | 650, 29.6141, -98.4774 593 | 651, 10.7779, 106.6977 594 | 652, 37.8006, -122.4407 595 | 653, 37.5883, -122.0662 596 | 654, 37.1556, -121.6564 597 | 655, 30.4821, -97.6573 598 | 657, 48.4753, 2.4943 599 | 658, 36.1265, -115.1669 600 | 659, 37.5005, -121.9737 601 | 660, -6.2097, 106.8285 602 | 661, -6.9904, 110.4240 603 | 662, 51.5133, -0.1028 604 | 663, 40.3647, -74.6534 605 | 666, 36.0603, -115.1538 606 | 667, 33.5600, -117.7288 607 | 668, 32.4259, -106.5980 608 | 669, 34.1426, -118.2335 609 | 670, 36.0161, -114.7371 610 | 672, 37.9107, -121.5907 611 | 674, 37.2937, -121.9122 612 | 675, 32.6721, -97.1342 613 | 676, 51.4114, -0.3048 614 | 677, 39.1343, -84.5186 615 | 678, -33.9300, 18.4111 616 | 679, 33.8595, -116.5588 617 | 680, 52.0545, 1.1684 618 | 681, 21.2885, -157.8465 619 | 683, 40.7415, -73.9939 620 | 686, 1.2991, 103.8476 621 | 687, 34.0816, -117.6581 622 | 688, 41.7994, -73.1314 623 | 689, 41.8117, -72.8510 624 | 690, 37.4295, -122.1226 625 | 692, 40.6848, -80.1012 626 | 693, 40.5883, -80.2248 627 | 694, 42.3017, -71.3838 628 | 695, 34.1794, -118.3205 629 | 696, 39.6558, -104.9896 630 | 697, 33.9168, -118.3952 631 | 698, 47.6127, -122.3345 632 | 699, 59.2899, 17.9864 633 | 700, 34.0429, -118.2083 634 | 701, 52.3777, 9.7415 635 | 702, 33.7905, -84.3066 636 | 703, 36.0261, -115.1194 637 | 704, 30.4161, -97.6720 638 | 705, 41.1531, -74.1897 639 | 708, 34.2740, -118.5569 640 | 709, 59.4040, 17.6648 641 | 711, 37.2070, -93.2907 642 | 712, 52.3121, 4.9447 643 | 713, 18.7901, 99.0042 644 | 714, 46.2030, 6.1679 645 | 715, 54.9749, -1.6106 646 | 716, 34.0429, -118.2555 647 | 717, 30.3967, -97.7495 648 | 719, 40.7639, -73.9729 649 | 720, 38.9914, -76.3717 650 | 721, 10.5777, -66.9976 651 | 722, 47.6139, -122.3167 652 | 723, 40.6950, -73.9952 653 | 724, 30.2714, -97.7221 654 | 725, 51.9132, 4.4601 655 | 726, 37.3782, -121.9014 656 | 727, 51.4338, 0.4903 657 | 728, 28.4602, -16.3050 658 | 729, 41.1184, -81.5505 659 | 730, 33.1687, -96.6337 660 | 731, 30.2016, -97.6671 661 | 732, 22.0249, -85.4657 662 | 733, 38.6421, -77.2974 663 | 735, -33.9791, 18.4732 664 | 736, 36.0113, -83.9759 665 | 737, 40.7680, -73.9895 666 | 738, 25.7743, -80.1952 667 | 739, 42.1227, -71.6601 668 | 740, 35.0357, -85.3059 669 | 741, 30.4845, -97.6708 670 | 742, 42.3882, -71.1196 671 | 743, 34.0613, -118.3084 672 | 744, 32.2358, -110.9326 673 | 745, 45.5077, 9.0996 674 | 746, 37.4339, -122.0998 675 | 747, 47.6126, -122.1942 676 | 749, 32.7957, -117.0777 677 | 750, 39.3563, -74.4381 678 | 751, 30.2607, -97.7378 679 | 752, 30.3925, -97.6721 680 | 753, 46.7391, -117.1717 681 | 754, 37.6092, -122.0814 682 | 756, 39.0437, -77.1721 683 | 757, 51.5151, -0.0840 684 | 760, 53.4591, -2.2275 685 | 761, 36.8294, -119.7810 686 | 764, 38.6519, -77.2947 687 | 766, 39.5347, -119.7153 688 | 767, -3.1312, -60.0229 689 | 768, 41.8904, -87.6239 690 | 770, 45.5173, -122.6250 691 | 771, 40.7993, -74.4822 692 | 772, 54.9688, -1.6060 693 | 773, 38.3001, -77.5133 694 | 774, 32.6782, -97.4653 695 | 775, 33.9023, -84.4884 696 | 776, 30.4728, -97.7740 697 | 777, 43.6500, -79.3894 698 | 778, 34.0484, -118.2477 699 | 779, 45.4749, 9.2062 700 | 780, 39.9990, -105.1672 701 | 781, 34.9373, -82.2793 702 | 782, 39.9860, -86.0303 703 | 783, 33.6996, -117.8689 704 | 784, 42.9177, -89.3734 705 | 785, 60.6408, 17.3936 706 | 787, 42.3399, -71.1665 707 | 788, 38.6984, -77.5788 708 | 789, 42.4871, -83.1440 709 | 790, 53.2297, -1.2958 710 | 791, 45.6285, -122.6405 711 | 792, 48.8957, 9.1928 712 | 793, 36.4892, -4.9603 713 | 794, 36.3356, -94.1763 714 | 795, 34.4755, -117.3432 715 | 797, 53.4804, -2.2378 716 | 798, 50.8765, 4.7540 717 | 799, 34.1994, -118.4797 718 | 800, 30.2480, -97.7619 719 | 801, 51.9747, 7.6231 720 | 802, 51.4953, -0.1444 721 | 803, 40.6271, 16.8019 722 | 805, 37.5609, -122.2725 723 | 807, 59.9153, 10.7536 724 | 808, 37.7844, -122.4074 725 | 809, 47.2540, -122.4535 726 | 810, 40.0234, -76.7428 727 | 812, 34.0674, -117.8413 728 | 813, 48.0613, -0.7925 729 | 815, 42.3103, -71.3820 730 | 816, 53.5532, 10.0076 731 | 817, 38.9012, -121.0745 732 | 818, 45.5261, -73.5998 733 | 819, 13.9175, 100.5552 734 | 820, 30.2483, -97.7619 735 | 821, 35.1940, -111.6552 736 | 822, 51.5055, -0.0869 737 | 823, 41.4175, -81.7713 738 | 824, 33.5267, -81.9523 739 | 826, 29.9702, -95.6937 740 | 827, 33.7351, -84.3414 741 | 828, 51.5373, -0.0613 742 | 830, 38.0381, -78.4908 743 | 831, 25.0787, 121.2343 744 | 832, 33.9129, -117.4581 745 | 833, 33.8865, -118.4003 746 | 834, 37.6659, -122.4528 747 | 835, 26.1619, -97.6582 748 | 837, 36.1128, -115.1739 749 | 838, 35.6619, 139.5431 750 | 839, 33.7350, -84.3898 751 | 841, 48.8599, 2.3467 752 | 842, 18.4253, -66.0630 753 | 843, 30.2672, -97.7463 754 | 845, 36.2818, -115.2642 755 | 846, 32.8537, -97.3340 756 | 848, 42.3661, -87.9312 757 | 850, 37.9642, -122.5233 758 | 851, 38.2331, -122.6435 759 | 852, 33.4522, -111.7096 760 | 853, 40.3897, -74.7605 761 | 854, 40.7172, -73.9985 762 | 855, 33.2321, -97.1690 763 | 856, 30.2636, -97.7396 764 | 857, 30.1983, -92.0777 765 | 860, 33.3749, -112.3104 766 | 861, 40.2445, -76.9957 767 | 862, 35.6042, -97.5667 768 | 863, 36.1049, -95.8337 769 | 864, 44.8676, -93.1373 770 | 865, 30.5215, -97.8295 771 | 866, 34.0288, -118.4117 772 | 867, 31.2070, 121.4551 773 | 868, 42.3740, -71.2460 774 | 869, 40.7264, -74.0043 775 | 870, 44.9087, -93.2194 776 | 871, 37.6164, -122.3862 777 | 872, 43.0663, -88.9247 778 | 873, 40.7432, -89.5743 779 | 874, 35.9701, -84.1306 780 | 875, 39.8689, -76.1133 781 | 876, 30.5162, -97.7879 782 | 877, 33.6861, -117.6272 783 | 878, 33.0265, -96.7900 784 | 879, 30.2295, -97.8331 785 | 880, -6.1861, 106.8239 786 | 881, 59.8400, 17.5998 787 | 883, 48.8542, 2.3064 788 | 884, 41.3700, -72.0614 789 | 885, 56.1552, 10.1363 790 | 888, 22.2817, 114.1526 791 | 889, 0.3382, 6.7380 792 | 891, 42.0319, -91.6819 793 | 892, 13.5115, 144.8064 794 | 893, 1.3689, 103.8752 795 | 894, 41.9104, -87.6502 796 | 895, 21.6023, 39.1426 797 | 896, 43.1592, -79.2425 798 | 898, 50.0850, 14.4450 799 | 899, 37.2870, -121.9496 800 | 900, 32.7843, -96.8087 801 | 901, 33.9086, -84.2254 802 | 904, 25.9636, -80.1378 803 | 905, 27.8965, -82.3398 804 | 906, 50.0422, 8.8838 805 | 907, 50.0422, 8.8838 806 | 909, 39.9915, -104.9832 807 | 910, 33.1074, -96.8064 808 | 911, 35.0550, -80.8472 809 | 912, 41.6263, -87.7556 810 | 913, 33.1018, -96.6686 811 | 915, 45.5079, -73.5713 812 | 917, 35.6709, 139.7469 813 | 919, 55.9457, -3.1834 814 | 920, 40.6912, -74.1795 815 | 921, 39.8558, -86.1954 816 | 922, 35.6367, 139.5875 817 | 924, 30.2680, -82.1246 818 | 925, 51.5284, -0.1335 819 | 926, 35.6950, 139.6883 820 | 927, 47.7023, -122.3273 821 | 928, 43.0476, -87.9655 822 | 929, 45.5151, -122.6791 823 | 930, 31.5455, -97.1176 824 | 931, 35.4823, -97.5035 825 | 932, 36.6434, -86.5691 826 | 933, 35.7331, -81.5375 827 | 934, 50.8978, 4.4829 828 | 938, 28.3107, -81.6684 829 | 940, 62.4408, 17.3416 830 | 942, 42.5379, -72.5374 831 | 943, 42.3445, -71.1034 832 | 944, 36.0718, -115.1339 833 | 945, 38.5623, -121.4944 834 | 946, 38.6482, -90.3077 835 | 947, 41.6019, -93.7725 836 | 948, 32.7516, -97.0830 837 | 949, 42.5244, -88.9851 838 | 952, 51.5150, -0.1625 839 | 953, 37.7047, -121.9336 840 | 954, 41.2405, -75.9014 841 | 955, 21.5460, 39.1753 842 | 957, 30.4889, -97.6799 843 | 958, 45.5083, -122.8312 844 | 960, 40.8047, -73.9667 845 | 961, 33.6567, -111.9571 846 | 962, 39.9141, -86.0674 847 | 963, 37.5005, 127.0353 848 | 964, 35.1485, -101.8762 849 | 965, 35.9247, -84.0461 850 | 967, 51.9510, -0.2758 851 | 968, 39.9544, -82.8091 852 | 969, 39.2505, -119.9494 853 | 970, 51.8883, -0.5033 854 | 971, 35.6959, 139.7000 855 | 972, 30.1611, -95.4738 856 | 974, 35.0533, -80.8523 857 | 975, 40.7632, -73.9836 858 | 976, 42.6074, -87.8835 859 | 977, 43.0783, -88.9038 860 | 978, 41.4837, -81.7101 861 | 979, 34.8263, -92.3883 862 | 980, -33.8743, 151.1040 863 | 981, -6.1836, 106.8257 864 | 982, 49.0232, 14.5002 865 | 983, 28.3717, -81.3389 866 | 984, 37.8311, -122.2920 867 | 985, 51.5127, -0.0850 868 | 986, 40.0043, -104.7272 869 | 987, 30.2593, -97.7540 870 | 990, 30.6315, -96.3249 871 | 991, 32.7288, -117.1297 872 | 992, 40.7202, -74.0049 873 | 993, 40.7318, -74.0420 874 | 994, 35.9638, -83.1822 875 | 996, 42.3356, -71.1705 876 | 997, -6.2988, 106.6728 877 | 998, 40.8395, -74.2075 878 | 999, 37.4515, 127.1488 879 | 1000, 41.8912, -87.6343 880 | --------------------------------------------------------------------------------