-
大小: 773KB文件類型: .rar金幣: 1下載: 0 次發布日期: 2021-01-04
- 語言: Matlab
- 標簽: product??quantization??ADC??ANN??
資源簡介
這是product quantization算法中基于ADC距離計算在Windows下的matlab實現源碼
代碼片段和文件信息
%?Read?a?set?of?vectors?stored?in?the?fvec?format?(int?+?n?*?float)
%?The?function?returns?a?set?of?output?vector?(one?vector?per?column)
%
%?Syntax:?
%???v?=?fvecs_read?(filename)?????->?read?all?vectors
%???v?=?fvecs_read?(filename?n)??->?read?n?vectors?
%???v?=?fvecs_read?(filename?[a?b])?->?read?the?vectors?from?a?to?b?(indices?starts?from?1)
function?v?=?fvecs_read?(filename?bounds)
%?open?the?file?and?count?the?number?of?descriptors
fid?=?fopen?(filename?‘rb‘);
?
if?fid?==?-1
??error?(‘I/O?error?:?Unable?to?open?the?file?%s\n‘?filename)
end
%?Read?the?vector?size
d?=?fread?(fid?1?‘int‘);
vecsizeof?=?1?*?4?+?d?*?4;
%?Get?the?number?of?vectrors
fseek?(fid?0?1);
a?=?1;
bmax?=?ftell?(fid);
if?bmax?==?0
??v?=?[];
??return;
end
bmax?=?floor(bmax?/?vecsizeof);
if?bmax?==?0
??v?=
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1457??2011-10-20?06:40??ADC\fvecs_read.m
?????文件???????1446??2011-04-08?06:16??ADC\ivecs_read.m
?????文件??????30720??2012-11-08?08:10??ADC\ndellipse.mexw64
?????文件????????759??2011-02-05?09:19??ADC\pq_assign.m
?????文件???????1629??2016-08-13?21:10??ADC\pq_new.m
?????文件???????1747??2011-02-05?09:19??ADC\pq_search.m
?????文件???????2101??2016-08-13?23:07??ADC\pq_test.m
?????文件???????1047??2016-08-13?22:27??ADC\pq_test_compute_stats.m
?????文件???????1950??2011-02-05?08:59??ADC\pq_test_load_vectors.m
?????文件??????11359??2016-08-14?22:35??ADC\QQ截圖20160814223538.png
?????文件????????131??2016-08-15?20:48??ADC\README
?????文件???????8795??2016-08-14?22:35??ADC\result.fig
?????文件????????578??2016-08-14?22:34??ADC\result.m
?????文件??????34816??2012-11-08?08:11??ADC\sample_mvgm.mexw64
?????文件???????1808??2010-06-02?23:55??ADC\sumidxtab.c
?????文件????????745??2010-06-02?23:55??ADC\sumidxtab.m
?????文件???????7680??2016-08-15?09:07??ADC\sumidxtab.mexw64
?????文件???????1708??2016-08-04?14:41??ADC\train.m
?????文件???????1069??2012-07-19?21:39??ADC\yael_kmeans.m
?????文件????4050432??2012-11-08?08:25??ADC\yael_kmeans.mexw64
?????文件???????1030??2016-08-13?21:30??ADC\yael_kmin.m
?????文件????????860??2012-02-11?07:35??ADC\yael_L2sqr.m
?????文件???????1908??2014-03-19?09:01??ADC\yael_nn.m
?????目錄??????????0??2016-08-15?20:46??ADC
-----------?---------??----------?-----??----
??????????????4165775????????????????????24
評論
共有 條評論