Bug 492 - printDist() gives larger size than the array returned from calShortestDist()
Summary: printDist() gives larger size than the array returned from calShortestDist()
Status: RESOLVED FIXED
Alias: None
Product: Group 13 Dating App System (vibing.com)
Classification: Unclassified
Component: FloydWarshall (show other bugs)
Version: 1
Hardware: PC Windows
: --- normal
Deadline: 2020-10-31
Assignee: Phudis Dawieang
URL:
Depends on:
Blocks:
 
Reported: 2020-11-27 14:39 HKT by Varun
Modified: 2020-11-27 14:56 HKT (History)
1 user (show)

See Also:


Attachments
how clearArray is added (341 bytes, text/plain)
2020-11-27 14:50 HKT, Phudis Dawieang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Varun 2020-11-27 14:39:16 HKT
After testing on the calShortestDist(), the array returned from the calShortestDist() function returns array correctly with correct dimensions. However, when printDist() is called, the array sometimes return with twice dimensions. Problem may occurred with double-counting.
Comment 1 Phudis Dawieang 2020-11-27 14:50:31 HKT
Created attachment 56 [details]
how clearArray is added
Comment 2 Phudis Dawieang 2020-11-27 14:53:04 HKT
Thank you for the bug report. The problem caused by the static array male and female declared and not cleared at the beginning of the program. The clearArray is added in mapInitialize() so that every program startup will clear the array.
Comment 3 Phudis Dawieang 2020-11-27 14:54:48 HKT
(In reply to Phudis Dawieang from comment #2)
> Thank you for the bug report. The problem caused by the static array male
> and female declared and not cleared at the beginning of the program. The
> clearArray is added in mapInitialize() so that every program startup will
> clear the array.