This commit is contained in:
砖吐筷筷 2024-11-26 04:49:06 +00:00 committed by GitHub
commit 8a5e001f5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 4 deletions

View file

@ -46,7 +46,8 @@ class GraphAdjList {
if ( if (
!this.adjList.has(vet1) || !this.adjList.has(vet1) ||
!this.adjList.has(vet2) || !this.adjList.has(vet2) ||
vet1 === vet2 vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) { ) {
throw new Error('Illegal Argument Exception'); throw new Error('Illegal Argument Exception');
} }

View file

@ -46,7 +46,8 @@ class GraphAdjList {
if ( if (
!this.adjList.has(vet1) || !this.adjList.has(vet1) ||
!this.adjList.has(vet2) || !this.adjList.has(vet2) ||
vet1 === vet2 vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) { ) {
throw new Error('Illegal Argument Exception'); throw new Error('Illegal Argument Exception');
} }

View file

@ -46,7 +46,8 @@ class GraphAdjList {
if ( if (
!this.adjList.has(vet1) || !this.adjList.has(vet1) ||
!this.adjList.has(vet2) || !this.adjList.has(vet2) ||
vet1 === vet2 vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) { ) {
throw new Error('Illegal Argument Exception'); throw new Error('Illegal Argument Exception');
} }

View file

@ -46,7 +46,8 @@ class GraphAdjList {
if ( if (
!this.adjList.has(vet1) || !this.adjList.has(vet1) ||
!this.adjList.has(vet2) || !this.adjList.has(vet2) ||
vet1 === vet2 vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) { ) {
throw new Error('Illegal Argument Exception'); throw new Error('Illegal Argument Exception');
} }