Constructor
new MinimumVertexCover(data)
Constructor, construct the class from the data file selected
Parameters:
Name | Type | Description |
---|---|---|
data |
string | instance of a problem coded as string |
- Source:
Methods
(static) isInvalidInstance(instanceContent) → {boolean}
Returns instance invalidity
Parameters:
Name | Type | Description |
---|---|---|
instanceContent |
string | content of the instance |
- Source:
Returns:
is instance invalid
- Type
- boolean
(static) resolveInstanceParams(instanceContent) → {object}
Returns parameters of the instance
Parameters:
Name | Type | Description |
---|---|---|
instanceContent |
string | content of the instance |
- Source:
Returns:
instance parameters
- Type
- object
evaluateMaximizationCost(bitArrayConfig) → {int}
Returns fitness of selected configuration(BitArray)
Parameters:
Name | Type | Description |
---|---|---|
bitArrayConfig |
class | BitArray of which fitness we want |
- Source:
Returns:
calculated fitness of the configuration
- Type
- int
getConfiguration(random) → {class}
Returns random, or all 0, configuration of knapsack problem(BitArray configuration)
Parameters:
Name | Type | Description |
---|---|---|
random |
bool | random or all 0 |
- Source:
Returns:
new BitArray class
- Type
- class
getResult(bitArrayConfig) → {Array}
Returns the result of the config, in this case the config array
Parameters:
Name | Type | Description |
---|---|---|
bitArrayConfig |
class | the configuration of which result we want |
- Source:
Returns:
the bit array of the configuration
- Type
- Array
getType() → {enum}
Returns what type of configuration is this problem using
- Source:
Returns:
type of the problem(configuration type)
- Type
- enum