From 7294ca258d4b2beee4bc9b2460f1297a6e76ddd7 Mon Sep 17 00:00:00 2001 From: Wizard-F Date: Wed, 13 Apr 2022 09:30:22 +0800 Subject: [PATCH 1/2] Fix param mismatch in comment for value in GraphOptions --- src/Randomize.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Randomize.ts b/src/Randomize.ts index e131107..740a374 100644 --- a/src/Randomize.ts +++ b/src/Randomize.ts @@ -155,8 +155,8 @@ namespace Randomize { /** * The function to generate the weight of each edge. * - * @param source The id of the node where the edge starts. - * @param target The id of the node where the edge ends. + * @param i The id of the node where the edge starts. + * @param j The id of the node where the edge ends. */ value?: (i: number, j: number) => any; From 18c83867f2f7970269b44140e7087b1907bd436e Mon Sep 17 00:00:00 2001 From: Wizard-F Date: Wed, 13 Apr 2022 10:17:53 +0800 Subject: [PATCH 2/2] Switch to source and target instead of i and j --- src/Randomize.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Randomize.ts b/src/Randomize.ts index 740a374..207fa98 100644 --- a/src/Randomize.ts +++ b/src/Randomize.ts @@ -155,10 +155,10 @@ namespace Randomize { /** * The function to generate the weight of each edge. * - * @param i The id of the node where the edge starts. - * @param j The id of the node where the edge ends. + * @param source The id of the node where the edge starts. + * @param target The id of the node where the edge ends. */ - value?: (i: number, j: number) => any; + value?: (source: number, target: number) => any; /** * Whether to make the graph directed.