Ejemplo n.º 1
0
        public void ComputeHashTest()
        {
            var perms          = new TestPermutations();
            var minHashService = new MinHashService(perms);

            byte[] hashed = minHashService.Hash(new TinyFingerprintSchema(10).SetTrueAt(2, 4, 6), perms.GetPermutations().Length);

            Assert.AreEqual(1, hashed[0]);
            Assert.AreEqual(0, hashed[1]);
            Assert.AreEqual(255, hashed[2]);
        }
Ejemplo n.º 2
0
        protected override dynamic ExecuteCore(Args input)
        {
            var res = TestPermutations.Permute(input.Array);

            return(new { NumberOfPermutations = res?.Count, Array = res });
        }