public class Sociogram
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private IndividualAgent[] |
agents
Vector of agents
|
private static int |
COLUMN_HEADER_LENGTH
Number of characters that is used for representing the column header
|
static int |
COLUMN_LENGTH
Number of characters that is used for representing each column
|
private static double |
CST_INC
Incremental Value each time an agent makes a social connection.
|
private double[][] |
matrix
Adyacency matrix with their relationship with values in the
interval [-1,+1], where negative values expresses rejection and positive
values represents selection
|
static java.text.DecimalFormat |
METRIC_FORMAT
Format of the double values printed in the text file for representing
the sociogrametric values, and it is also used from the GUI.
|
private static double |
REJECTION_THRESHOLD
Relationship Value from which it is considered to be a rejection.
|
private static java.text.DecimalFormat |
RELATION_FORMAT
Format of the double values printed in the text file for representing
the sociogram relations.
|
private static double |
SELECTION_THRESHOLD
Relationship Value from which it is considered to be a selection.
|
private int |
size
Number of Individuals
|
private double[][] |
trend
Trend matrix that represents the trend of each relatinship
with values in the interval [-1,+1], where negative values expresses
decrease of the reletaionship, and positive represents the increase
of the relationship,
|
Constructor and Description |
---|
Sociogram(java.util.List<IndividualAgent> list)
Constructor of the Class.
|
Modifier and Type | Method and Description |
---|---|
IndividualAgent[] |
getAgents() |
double[][] |
getMatrix() |
int |
getSize() |
double |
getTrend(IndividualAgent agentA,
IndividualAgent agentB)
Sets the the trend in a pair of agents
|
double |
measureIAg() |
double |
measureICg()
Measure the Coherence of the group with the sociometric ICg described in
(Barrasa & Gil, 2008).
|
double |
measureIDg()
Measure the Dissociation of the group with the sociometric IDg described in
(Barrasa & Gil, 2008).
|
double |
measureIIg()
Measure the Intensity of the Group with the sociometric IIg described
in (Barrasa & Gil, 2008).
|
int |
measureRe(int indexAgent)
Measure the Reciprocity of Selections: number of selections of an
agent that have been selected back with reciprocal selections.
|
int |
measureRr(int indexAgent)
Measure the Reciprocity of Rejections: number of rejections of an
agent that have been rejected back with reciprocal rejections.
|
int |
measureSe(int indexAgent)
Measure the selections receibed by subject.
|
int |
measureSr(int indexAgent)
Measure the rejections receibed by the subject.
|
void |
save(java.io.PrintStream out)
Saves the sociogram in a text field determined by the stream of the
parameter.
|
void |
setTrend(IndividualAgent agentA,
IndividualAgent agentB,
double trend)
Sets the the trend in a pair of agents
|
void |
updateConnection(IndividualAgent agentA,
IndividualAgent agentB,
double trend)
Update a social connection in the sociogram based on a trend
|
private int size
private double[][] matrix
private double[][] trend
private IndividualAgent[] agents
private static double CST_INC
private static java.text.DecimalFormat RELATION_FORMAT
public static java.text.DecimalFormat METRIC_FORMAT
private static int COLUMN_HEADER_LENGTH
public static int COLUMN_LENGTH
private static double SELECTION_THRESHOLD
private static double REJECTION_THRESHOLD
public Sociogram(java.util.List<IndividualAgent> list)
list
- The list of agents for building the sociogram.public void updateConnection(IndividualAgent agentA, IndividualAgent agentB, double trend)
agentA
- the first agent of the relationagentB
- the second agent of the relationtrend
- the trend of the relation in the interval [-1,1]public void setTrend(IndividualAgent agentA, IndividualAgent agentB, double trend)
agentA
- the first agent of the relationagentB
- the second agent of the relationtrend
- the trend of the relation in the interval [-1,1]public double getTrend(IndividualAgent agentA, IndividualAgent agentB)
agentA
- the first agent of the relationagentB
- the second agent of the relationpublic void save(java.io.PrintStream out)
out
- the stream where the sociagram content is printedpublic double measureIAg()
public double measureIDg()
public double measureICg()
public double measureIIg()
public int measureRe(int indexAgent)
indexAgent
- the index of the agent that is measuredpublic int measureRr(int indexAgent)
indexAgent
- the index of the agent that is measuredpublic int measureSe(int indexAgent)
indexAgent
- the index of the agent that is measuredpublic int measureSr(int indexAgent)
indexAgent
- the index of the agent that is measuredpublic int getSize()
public IndividualAgent[] getAgents()
public double[][] getMatrix()