{"id":173058,"date":"2020-03-03T09:29:42","date_gmt":"2020-03-03T01:29:42","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=173058"},"modified":"2020-02-24T09:30:09","modified_gmt":"2020-02-24T01:30:09","slug":"big-data-bitmap","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/big-data-bitmap.html","title":{"rendered":"\u5927\u6570\u636e\u4e0b\u7684Distinct Count\uff08\u4e8c\uff09\uff1aBitmap\u7bc7"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5927\u6570\u636e\uff08big data\uff09\uff0cIT\u884c\u4e1a\u672f\u8bed\uff0c\u662f\u6307\u65e0\u6cd5\u5728\u4e00\u5b9a\u65f6\u95f4\u8303\u56f4\u5185\u7528\u5e38\u89c4\u8f6f\u4ef6\u5de5\u5177\u8fdb\u884c\u6355\u6349\u3001\u7ba1\u7406\u548c\u5904\u7406\u7684\u6570\u636e\u96c6\u5408\uff0c\u662f\u9700\u8981\u65b0\u5904\u7406\u6a21\u5f0f\u624d\u80fd\u5177\u6709\u66f4\u5f3a\u7684\u51b3\u7b56\u529b\u3001\u6d1e\u5bdf\u53d1\u73b0\u529b\u548c\u6d41\u7a0b\u4f18\u5316\u80fd\u529b\u7684\u6d77\u91cf\u3001\u9ad8\u589e\u957f\u7387\u548c\u591a\u6837\u5316\u7684\u4fe1\u606f\u8d44\u4ea7\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n 1. Bitmap\u4ecb\u7ecd<\/strong><\/div>\n \u300a\u7f16\u7a0b\u73e0\u7391\u300b\u4e0a\u662f\u8fd9\u6837\u4ecb\u7ecdbitmap\u7684\uff1a<\/p>\n Bitmap\u662f\u4e00\u4e2a\u5341\u5206\u6709\u7528\u7684\u6570\u636e\u7ed3\u6784\u3002\u6240\u8c13\u7684Bitmap\u5c31\u662f\u7528\u4e00\u4e2abit\u4f4d\u6765\u6807\u8bb0\u67d0\u4e2a\u5143\u7d20\u5bf9\u5e94\u7684Value\uff0c\u800cKey\u5373\u662f\u8be5\u5143\u7d20\u3002\u7531\u4e8e\u91c7\u7528\u4e86Bit\u4e3a\u5355\u4f4d\u6765\u5b58\u50a8\u6570\u636e\uff0c\u56e0\u6b64\u5728\u5185\u5b58\u5360\u7528\u65b9\u9762\uff0c\u53ef\u4ee5\u5927\u5927\u8282\u7701\u3002<\/p>\n \u7b80\u800c\u8a00\u4e4b\u2014\u2014\u7528\u4e00\u4e2abit\uff080\u62161\uff09\u8868\u793a\u67d0\u5143\u7d20\u662f\u5426\u51fa\u73b0\u8fc7\uff0c\u5176\u5728bitmap\u7684\u4f4d\u7f6e\u5bf9\u5e94\u4e8e\u5176index\u3002\u300a\u7f16\u7a0b\u73e0\u7391\u300b\u7ed9\u51fa\u4e86\u4e00\u4e2a\u7528bitmap\u505a\u6392\u5e8f\u7684\u4f8b\u5b50\uff1a<\/p>\n \r\n\/* Copyright (C) 1999 Lucent Technologies *\/\r\n\/* From 'Programming Pearls' by Jon Bentley *\/\r\n\/* bitsort.c -- bitmap sort from Column 1\r\n* Sort distinct integers in the range [0..N-1]\r\n*\/\r\n#include |