package org.dgpf.gp.regression.base;
/**
* This class provides the internal network simulation used for distributed
* regression.
*
* @author Thomas Weise
*/
public abstract class NetworkImpl
{
/**
* The aggregation context internally used.
*/
private final AggregationContext m_context ;
/**
* Create a network implementation.
* @param p_context The hosting context.
*/
public NetworkImpl (final AggregationContext p_context)
{
super();
this.m_context = p_context;
this.set_features(p_context.get_node_count(),
(int)(p_context.get_steps_per_simulation()));
}
/**
* Obtain the aggregation context hosting this network implementation.
* @return The aggregation context hosting this network implementation.
*/
public final AggregationContext get_context()
{
return this.m_context;
}
/**
* Set the most vital features of a network simulation, the node count and
* the simulation count.
* @param p_node_count The new count of nodes participating in this
* aggregation function regression.
* @param p_steps_per_simulation The new count of steps per simulation.
*/
protected void set_features (final int p_node_count,
final int p_steps_per_simulation)
{
}
/**
* Perform the exchange of variables.
* @param p_source_variable The identifier of the source variable.
* @param p_dest_variable The identifier of the destination variable.
* @param p_step The current simulation step.
*/
protected abstract void deliver (final int p_source_variable,
final int p_dest_variable,
final int p_step);
}