14b1ae350b
This commit introduces chinese_whispers method without any "helpers" on PHP side. Users needs to take care of everything (building edges from 128D face chip vector, for example), but this is exposed for people that need low-level call and want to calculate distances and build edges in PHP directly.
14 lines
362 B
PHP
14 lines
362 B
PHP
--TEST--
|
|
Edge given in edges array for chinese_whispers functions is associative array
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("pdlib")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
dlib_chinese_whispers([[0,0], ["foo"=>0, "bar"=>1]]);
|
|
} catch (Exception $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
--EXPECT--
|
|
string(46) "Edge should be numeric array with integer keys"
|