How to implement Combinations in angular 2+

末鹿安然 提交于 2019-12-13 03:26:10

问题


How to implement combinations of permutation & combination in angular 2+.

Eg. we have 5 nodes. Say a,b,c,d,e. And all are arrays. So the combination goes like - 5C2 = (5)! / (2)!*(3)! = 10.

Now how to make the looping for -

a->b
a->c
a->d
a->e

b ->c
b->d
b->e

c->d
c->e

d->e

where -

a = [claimRequest, claimBody]
b = [ claimBody, eventType]
c= [ claimRequest ]
d= [ headerRequest, claimRequest]
e = [eventType]

Now my query is where i have to input the two combinations are in place of value1 and value2

 RETURN algo.similarity.jaccard(<value1 >, <value2>) AS similarity

来源:https://stackoverflow.com/questions/53555563/how-to-implement-combinations-in-angular-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!