Class: Link

Link

Link class.

Constructor

The Link class.
Parameters:
Name Type Description
num number Zero-based number.
name string Name.
nounType NounType Noun Type.
Version:
  • 2017-03-27
Author:
Source:
Returns:
Link.
Type
Link

Members

f

Function that returns either negative or positive verb given two nouns of the link's noun type.
Source:

name

Name of the link.
Source:

nounType

Noun Type of the link.
Source:

num

Zero-based number of the link.
Source:

oneToOne

True if function is one-to-one (at most one positive verb per row). Set in the validate method.
Source:

Methods

canBeWith(verb) → {boolean}

Returns true if two nouns can be in the same slot for this link.
Parameters:
Name Type Description
verb Verb Verb.
Source:
Returns:
True if two nouns can be in the same slot, otherwise false.
Type
boolean

update()

TODO
Source:

(inner) inSameSlot(link, verb) → {boolean}

Returns true if A and B can be in the same slot given the link and verb. If false, we can quickly say A is not with B for a fact of type 2 or 4.
Parameters:
Name Type Description
link Link Link.
verb Verb Verb.
Source:
Returns:
True if two nouns can be in the same slot, otherwise false.
Type
boolean

(inner) isOneToOne(link) → {boolean}

Returns true if the link is one-to-one, otherwise false.
Parameters:
Name Type Description
link Link Link.
Source:
Returns:
True if the link is one-to-one, otherwise false.
Type
boolean