Skip to content

Limitation on cost 0 #17

@atanarro

Description

@atanarro

Looking at the function isValidNode I see that a cost of 0 is forbidden.

function isValidNode(val) {
  const cost = Number(val);

  if (isNaN(cost) || cost <= 0) {
    return false;
  }

  return true;
}

I think a cost of 0 is a valid situation meaning that there is a connection between 2 nodes while it is costless.

Is there any reason for this limitation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions