Skip to content

Commit

Permalink
[Temp]
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewquang512 committed Nov 26, 2023
1 parent 19d8cc5 commit 4645086
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/resolvers/Common/suggestUser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// /**
// * @typedef {string[]} Ids
// */
//
// /**
// *
// * @param {Ids} followingUsers
// followingUsers
// * @param {Ids} similarInterestUsers
// * @param {Ids} similarSkillUsers
// * @param {Ids} user
// */
// export const suggestUser = (followingUsers, similarInterestUsers, similarSkillUsers, user){
// const allUser = getUnion(getUnion(followingUsers, similarInterestUsers), similarSkillUsers))
// const following
// }
//
// /**
// * @see https://en.wikipedia.org/wiki/Jaccard_index
// * @param {Ids} dataset1
// * @param {Ids} dataset2
// */
// const getJaacardIndex = (dataset1, dataset2) => {
// const intersection = getIntersection(dataset1, dataset2)
// const union = getUnion(dataset1, dataset2)
//
// return intersection.length / union.length
// }
//
// /**
// * @param {Ids} dataset1
// * @param {Ids} dataset2
// */
// const getIntersection = (dataset1, dataset2) => {
// return dataset1.filter(value => dataset2.includes(value));
// }
//
//
// /**
// * @param {Ids} dataset1
// * @param {Ids} dataset2
// */
// const getUnion = (dataset1, dataset2) => {
// return [...new Set([...dataset1, ...dataset2])];
// }

0 comments on commit 4645086

Please sign in to comment.