blackbox

## Class BBFunction

- java.lang.Object
- - agents.Agent
  - - blackbox.BlackBoxAgent
    - - blackbox.BBFunction

All Implemented Interfaces:
  java.io.Serializable

    public class BBFunction
    extends BlackBoxAgent
    implements java.io.Serializable

The Class BBFunction.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`BBFunction()` Instantiates a new BB function.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addInputAgent(Agent agent)` Adds the input agent.
`void` `computeAMessage(Message m)` Compute A message.
`int` `countFreeInputSlot()` Count free input slot.
`void` `fastPlay()` Fast play.
`Agent` `getAgentA()` Gets the agent A.
`Agent` `getAgentB()` Gets the agent B.
`MathFunction` `getFunc()` Gets the func.
`double` `getValue()` Gets the value.
`boolean` `isLoopingItself()` Checks if is looping itself.
`boolean` `ownSpecificInput(Agent a)` Own specific input.
`void` `play()` Play one agent step.
`void` `setAgentA(Agent agentA)` Sets the agent A.
`void` `setAgentB(Agent agentB)` Sets the agent B.
`void` `setFunc(MathFunction func)` Sets the func.

### Methods inherited from class blackbox.BlackBoxAgent

`addConstraint, computeCriticity, getConstraints, getCriticity, getTargets, getWorstConstraint, readMessage, setConstraints, setCriticity, setTargets`

### Methods inherited from class agents.Agent

`die, getID, getMessages, getMessagesBin, getName, isDying, sendExpressMessage, sendMessage, sendMessage, setDying, setID, setMessages, setMessagesBin, setName`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BBFunction

    public BBFunction()

Instantiates a new BB function.

### Method Detail

#### play

    public void play()

Description copied from class: `Agent`
Play one agent step.

Overrides:
  `play` in class `Agent`

#### fastPlay

    public void fastPlay()

Description copied from class: `BlackBoxAgent`
Fast play.

Specified by:
  `fastPlay` in class `BlackBoxAgent`

#### getFunc

    public MathFunction getFunc()

Gets the func.

Returns:
  the func

#### setFunc

    public void setFunc(MathFunction func)

Sets the func.

Parameters:
  `func` - the new func

#### computeAMessage

    public void computeAMessage(Message m)

Description copied from class: `Agent`
Compute A message.

Specified by:
  `computeAMessage` in class `BlackBoxAgent`
Parameters:
  `m` - the m

#### getAgentA

    public Agent getAgentA()

Gets the agent A.

Returns:
  the agent A

#### setAgentA

    public void setAgentA(Agent agentA)

Sets the agent A.

Parameters:
  `agentA` - the new agent A

#### getAgentB

    public Agent getAgentB()

Gets the agent B.

Returns:
  the agent B

#### setAgentB

    public void setAgentB(Agent agentB)

Sets the agent B.

Parameters:
  `agentB` - the new agent B

#### getValue

    public double getValue()

Description copied from class: `BlackBoxAgent`
Gets the value.

Specified by:
  `getValue` in class `BlackBoxAgent`
Returns:
  the value

#### addInputAgent

    public void addInputAgent(Agent agent)

Adds the input agent.

Parameters:
  `agent` - the agent

#### countFreeInputSlot

    public int countFreeInputSlot()

Count free input slot.

Returns:
  the int

#### ownSpecificInput

    public boolean ownSpecificInput(Agent a)

Own specific input.

Parameters:
  `a` - the a
Returns:
  true, if successful

#### isLoopingItself

    public boolean isLoopingItself()

Checks if is looping itself.

Returns:
  true, if is looping itself