[Rsiena-commits] r18 - pkg/RSiena/src/model/tables

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Oct 31 23:56:42 CET 2009


Author: ripleyrm
Date: 2009-10-31 23:56:42 +0100 (Sat, 31 Oct 2009)
New Revision: 18

Added:
   pkg/RSiena/src/model/tables/BetweennessTable.cpp
   pkg/RSiena/src/model/tables/BetweennessTable.h
   pkg/RSiena/src/model/tables/Cache.cpp
   pkg/RSiena/src/model/tables/Cache.h
   pkg/RSiena/src/model/tables/EgocentricConfigurationTable.cpp
   pkg/RSiena/src/model/tables/EgocentricConfigurationTable.h
   pkg/RSiena/src/model/tables/NetworkCache.cpp
   pkg/RSiena/src/model/tables/NetworkCache.h
Log:
few missing files

Added: pkg/RSiena/src/model/tables/BetweennessTable.cpp
===================================================================
--- pkg/RSiena/src/model/tables/BetweennessTable.cpp	                        (rev 0)
+++ pkg/RSiena/src/model/tables/BetweennessTable.cpp	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: BetweennessTable.cpp
+ *
+ * Description: This file contains the implementation of the BetweennessTable
+ * class.
+ *****************************************************************************/
+
+#include "BetweennessTable.h"
+#include "network/Network.h"
+#include "network/IncidentTieIterator.h"
+
+namespace siena
+{
+
+// ----------------------------------------------------------------------------
+// Section: Initialization
+// ----------------------------------------------------------------------------
+
+/**
+ * Constructor.
+ */
+BetweennessTable::BetweennessTable(NetworkCache * pOwner) :
+	ConfigurationTable(pOwner)
+{
+}
+
+
+// ----------------------------------------------------------------------------
+// Section: ConfigurationTable implementation
+// ----------------------------------------------------------------------------
+
+/**
+ * Calculates the betweenness counts for all actors.
+ */
+void BetweennessTable::calculate()
+{
+	// Reset the counters to zeroes
+	this->reset();
+
+	// One-mode network is assumed
+
+	const Network * pNetwork = this->pNetwork();
+	int n = pNetwork->n();
+
+	// Helper array
+	int * mark = new int[n];
+
+	for (int i = 0; i < n; i++)
+	{
+		mark[i] = -1;
+	}
+
+	for (int i = 0; i < n; i++)
+	{
+		// Mark the out-neighbors of actor i
+
+		for (IncidentTieIterator iter = pNetwork->outTies(i);
+			iter.valid();
+			iter.next())
+		{
+			mark[iter.actor()] = i;
+		}
+
+		// Consider each two-path starting at i
+
+		for (IncidentTieIterator iterI = pNetwork->outTies(i);
+			iterI.valid();
+			iterI.next())
+		{
+			int j = iterI.actor();
+
+			for (IncidentTieIterator iterJ = pNetwork->outTies(j);
+				iterJ.valid();
+				iterJ.next())
+			{
+				int h = iterJ.actor();
+
+				if (i != h && mark[h] != i)
+				{
+					// We have found a two-path i -> j -> h with no tie
+					// from i to h, so we increase the betweenness of j.
+
+					this->ltable[j]++;
+				}
+			}
+		}
+	}
+
+	delete[] mark;
+}
+
+}

Added: pkg/RSiena/src/model/tables/BetweennessTable.h
===================================================================
--- pkg/RSiena/src/model/tables/BetweennessTable.h	                        (rev 0)
+++ pkg/RSiena/src/model/tables/BetweennessTable.h	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: BetweennessTable.h
+ *
+ * Description: This file defines the class BetweennessTable.
+ *****************************************************************************/
+
+#ifndef BETWEENNESSTABLE_H_
+#define BETWEENNESSTABLE_H_
+
+#include "ConfigurationTable.h"
+#include "network/NetworkUtils.h"
+
+namespace siena
+{
+
+/**
+ * This class defines a table of betweenness values. The betweenness of an
+ * actor i is the number of ordered actor pairs (j,h) such that there are
+ * ties (j,i) and (i,h), but no tie (j,h).
+ */
+class BetweennessTable : public ConfigurationTable
+{
+public:
+	BetweennessTable(NetworkCache * pOwner);
+
+protected:
+	virtual void calculate();
+};
+
+}
+
+#endif /*BETWEENNESSTABLE_H_*/

Added: pkg/RSiena/src/model/tables/Cache.cpp
===================================================================
--- pkg/RSiena/src/model/tables/Cache.cpp	                        (rev 0)
+++ pkg/RSiena/src/model/tables/Cache.cpp	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: Cache.cpp
+ *
+ * Description: This file contains the implementation of the class Cache.
+ *****************************************************************************/
+
+#include "Cache.h"
+#include "utils/Utils.h"
+#include "network/Network.h"
+#include "model/tables/NetworkCache.h"
+
+
+namespace siena
+{
+
+Cache::Cache()
+{
+	this->lego = -1;
+}
+
+
+Cache::~Cache()
+{
+	clearMap(this->lnetworkCaches, false, true);
+}
+
+
+NetworkCache * Cache::pNetworkCache(const Network * pNetwork)
+{
+	NetworkCache * pNetworkCache = 0;
+	map<const Network *, NetworkCache *>::iterator iter =
+		this->lnetworkCaches.find(pNetwork);
+
+	if (iter != this->lnetworkCaches.end())
+	{
+		pNetworkCache = iter->second;
+	}
+	else
+	{
+		pNetworkCache = new NetworkCache(pNetwork);
+		pNetworkCache->initialize(this->lego);
+		this->lnetworkCaches[pNetwork] = pNetworkCache;
+	}
+
+	return pNetworkCache;
+}
+
+
+void Cache::initialize(int ego)
+{
+	this->lego = ego;
+
+	for (map<const Network *, NetworkCache *>::iterator iter =
+			this->lnetworkCaches.begin();
+		iter != this->lnetworkCaches.end();
+		iter++)
+	{
+		NetworkCache * pNetworkCache = iter->second;
+		pNetworkCache->initialize(ego);
+	}
+}
+
+}

Added: pkg/RSiena/src/model/tables/Cache.h
===================================================================
--- pkg/RSiena/src/model/tables/Cache.h	                        (rev 0)
+++ pkg/RSiena/src/model/tables/Cache.h	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: Cache.h
+ *
+ * Description: This file contains the definition of the Cache class.
+ *****************************************************************************/
+
+#ifndef CACHE_H_
+#define CACHE_H_
+
+#include <map>
+
+using namespace std;
+
+namespace siena
+{
+
+class NetworkCache;
+class Network;
+
+
+class Cache
+{
+public:
+	Cache();
+	virtual ~Cache();
+
+	NetworkCache * pNetworkCache(const Network * pNetwork);
+	void initialize(int ego);
+
+private:
+	map<const Network *, NetworkCache *> lnetworkCaches;
+	int lego;
+};
+
+}
+
+#endif /* CACHE_H_ */

Added: pkg/RSiena/src/model/tables/EgocentricConfigurationTable.cpp
===================================================================
--- pkg/RSiena/src/model/tables/EgocentricConfigurationTable.cpp	                        (rev 0)
+++ pkg/RSiena/src/model/tables/EgocentricConfigurationTable.cpp	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,57 @@
+#include "EgocentricConfigurationTable.h"
+
+namespace siena
+{
+
+EgocentricConfigurationTable::EgocentricConfigurationTable(
+	NetworkCache * pOwner) : ConfigurationTable(pOwner)
+{
+	// The table has not been calculated for any ego yet.
+
+	this->lego = -1;
+	this->lupdated = false;
+}
+
+
+EgocentricConfigurationTable::~EgocentricConfigurationTable()
+{
+}
+
+
+/**
+ * Initializes the table for the given ego.
+ */
+void EgocentricConfigurationTable::initialize(int ego)
+{
+	// Store the ego
+	this->lego = ego;
+
+	// Make sure the table is recalculated in the next call to get(...)
+	this->lupdated = false;
+}
+
+
+/**
+ * Returns the number of configurations corresponding to the given actor.
+ */
+int EgocentricConfigurationTable::get(int i)
+{
+	if (!this->lupdated)
+	{
+		this->calculate();
+		this->lupdated = true;
+	}
+
+	return this->ltable[i];
+}
+
+
+/**
+ * Returns the current ego of this configuration table.
+ */
+int EgocentricConfigurationTable::ego() const
+{
+	return this->lego;
+}
+
+}

Added: pkg/RSiena/src/model/tables/EgocentricConfigurationTable.h
===================================================================
--- pkg/RSiena/src/model/tables/EgocentricConfigurationTable.h	                        (rev 0)
+++ pkg/RSiena/src/model/tables/EgocentricConfigurationTable.h	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,44 @@
+#ifndef EGOCENTRICCONFIGURATIONTABLE_H_
+#define EGOCENTRICCONFIGURATIONTABLE_H_
+
+#include "ConfigurationTable.h"
+
+namespace siena
+{
+
+/**
+ * This class defines a table storing a number of network configurations of
+ * certain type per actor.
+ *
+ * There can be various types of configurations (like the number of two-paths,
+ * etc.), each implemented in a derived class. Normally, the derived classes
+ * should implement only the purely virtual method vCalculate.
+ *
+ * The configuration tables are grouped in and owned by an instance of the
+ * NetworkCache class.
+ *
+ * The configuration tables are used to speedup the calculations involving
+ * effects.
+ */
+class EgocentricConfigurationTable: public ConfigurationTable
+{
+public:
+	EgocentricConfigurationTable(NetworkCache * pOwner);
+	virtual ~EgocentricConfigurationTable();
+
+	void initialize(int ego);
+	virtual int get(int i);
+
+protected:
+	int ego() const;
+
+private:
+	// Indicates the ego this table has been calculated for
+	int lego;
+
+	bool lupdated;
+};
+
+}
+
+#endif /* EGOCENTRICCONFIGURATIONTABLE_H_ */

Added: pkg/RSiena/src/model/tables/NetworkCache.cpp
===================================================================
--- pkg/RSiena/src/model/tables/NetworkCache.cpp	                        (rev 0)
+++ pkg/RSiena/src/model/tables/NetworkCache.cpp	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,177 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: NetworkCache.cpp
+ *
+ * Description: This file contains the implementation of the class
+ * NetworkCache.
+ *****************************************************************************/
+
+#include "NetworkCache.h"
+#include "network/Network.h"
+#include "network/OneModeNetwork.h"
+#include "network/IncidentTieIterator.h"
+#include "model/tables/TwoPathTable.h"
+#include "model/tables/CriticalInStarTable.h"
+#include "model/tables/BetweennessTable.h"
+
+namespace siena
+{
+
+/**
+ * Constructs a network cache for the given network.
+ */
+NetworkCache::NetworkCache(const Network * pNetwork)
+{
+	this->lpNetwork = pNetwork;
+
+	this->loutTieValues = new int[pNetwork->m()];
+
+	this->loneModeNetwork =
+		dynamic_cast<const OneModeNetwork *>(pNetwork) != 0;
+
+	// Many of the configurations can be seen
+	// as special cases of generalized two-paths, where one can specify
+	// the directions of the first and the second step. For instance, the
+	// number of in-stars between i and j equals the number of possible ways
+	// of reaching j, if we have to traverse one outgoing tie of actor i,
+	// say (i,h), followed by on incoming tie of actor h.
+
+	if (this->loneModeNetwork)
+	{
+		this->linTieValues = new int[pNetwork->n()];
+		this->lpTwoPathTable =
+			new TwoPathTable(this, FORWARD, FORWARD);
+		this->lpReverseTwoPathTable =
+			new TwoPathTable(this, BACKWARD, BACKWARD);
+		this->lpOutStarTable =
+			new TwoPathTable(this, BACKWARD, FORWARD);
+		this->lpCriticalInStarTable = new CriticalInStarTable(this);
+		this->lpRRTable =
+			new TwoPathTable(this, RECIPROCAL, RECIPROCAL);
+		this->lpRFTable =
+			new TwoPathTable(this, RECIPROCAL, FORWARD);
+		this->lpRBTable =
+			new TwoPathTable(this, RECIPROCAL, BACKWARD);
+		this->lpFRTable =
+			new TwoPathTable(this, FORWARD, RECIPROCAL);
+		this->lpBRTable =
+			new TwoPathTable(this, BACKWARD, RECIPROCAL);
+		this->lpBetweennessTable = new BetweennessTable(this);
+	}
+	else
+	{
+		this->linTieValues = 0;
+		this->lpTwoPathTable = 0;
+		this->lpReverseTwoPathTable = 0;
+		this->lpOutStarTable = 0;
+		this->lpCriticalInStarTable = 0;
+		this->lpRRTable = 0;
+		this->lpRFTable = 0;
+		this->lpRBTable = 0;
+		this->lpFRTable = 0;
+		this->lpBRTable = 0;
+		this->lpBetweennessTable = 0;
+	}
+
+	this->lpInStarTable = new TwoPathTable(this, FORWARD, BACKWARD);
+
+	this->initialize(-1);
+}
+
+
+/**
+ * Destroys this network cache object.
+ */
+NetworkCache::~NetworkCache()
+{
+	delete[] this->loutTieValues;
+	delete[] this->linTieValues;
+	delete this->lpTwoPathTable;
+	delete this->lpReverseTwoPathTable;
+	delete this->lpOutStarTable;
+	delete this->lpCriticalInStarTable;
+	delete this->lpRRTable;
+	delete this->lpRFTable;
+	delete this->lpRBTable;
+	delete this->lpFRTable;
+	delete this->lpBRTable;
+	delete this->lpBetweennessTable;
+	delete this->lpInStarTable;
+
+	this->loutTieValues = 0;
+	this->linTieValues = 0;
+	this->lpTwoPathTable = 0;
+	this->lpReverseTwoPathTable = 0;
+	this->lpOutStarTable = 0;
+	this->lpCriticalInStarTable = 0;
+	this->lpRRTable = 0;
+	this->lpRFTable = 0;
+	this->lpRBTable = 0;
+	this->lpFRTable = 0;
+	this->lpBRTable = 0;
+	this->lpBetweennessTable = 0;
+	this->lpInStarTable = 0;
+}
+
+
+void NetworkCache::initialize(int ego)
+{
+	// Out-tie indicators
+
+	for (int i = 0; i < this->lpNetwork->m(); i++)
+	{
+		this->loutTieValues[i] = 0;
+	}
+
+	if (ego >= 0 && ego < this->lpNetwork->n())
+	{
+		for (IncidentTieIterator iter = this->lpNetwork->outTies(ego);
+			iter.valid();
+			iter.next())
+		{
+			this->loutTieValues[iter.actor()] = iter.value();
+		}
+	}
+
+	// In-tie indicators
+
+	if (this->loneModeNetwork)
+	{
+		for (int i = 0; i < this->lpNetwork->n(); i++)
+		{
+			this->linTieValues[i] = 0;
+		}
+
+		if (ego >= 0 && ego < this->lpNetwork->n())
+		{
+			for (IncidentTieIterator iter = this->lpNetwork->inTies(ego);
+				iter.valid();
+				iter.next())
+			{
+				this->linTieValues[iter.actor()] = iter.value();
+			}
+		}
+	}
+
+	// Initialize all configuration tables
+
+	if (this->loneModeNetwork)
+	{
+		this->lpTwoPathTable->initialize(ego);
+		this->lpReverseTwoPathTable->initialize(ego);
+		this->lpOutStarTable->initialize(ego);
+		this->lpCriticalInStarTable->initialize(ego);
+		this->lpRRTable->initialize(ego);
+		this->lpRFTable->initialize(ego);
+		this->lpRBTable->initialize(ego);
+		this->lpFRTable->initialize(ego);
+		this->lpBRTable->initialize(ego);
+	}
+
+	this->lpInStarTable->initialize(ego);
+}
+
+}

Added: pkg/RSiena/src/model/tables/NetworkCache.h
===================================================================
--- pkg/RSiena/src/model/tables/NetworkCache.h	                        (rev 0)
+++ pkg/RSiena/src/model/tables/NetworkCache.h	2009-10-31 22:56:42 UTC (rev 18)
@@ -0,0 +1,276 @@
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: NetworkCache.h
+ *
+ * Description: This file contains the definition of the
+ * NetworkCache class.
+ *****************************************************************************/
+
+
+#ifndef NETWORKCACHE_H_
+#define NETWORKCACHE_H_
+
+namespace siena
+{
+
+// ----------------------------------------------------------------------------
+// Section: Forward declarations
+// ----------------------------------------------------------------------------
+
+class ConfigurationTable;
+class EgocentricConfigurationTable;
+class Network;
+
+
+// ----------------------------------------------------------------------------
+// Section: NetworkCache definition
+// ----------------------------------------------------------------------------
+
+/**
+ * This class stores varied information regarding a specific ego in a network
+ * for repeated use.
+ */
+class NetworkCache
+{
+public:
+	NetworkCache(const Network * pNetwork);
+	virtual ~NetworkCache();
+
+	inline const Network * pNetwork() const;
+
+	void initialize(int ego);
+
+	inline bool outTieExists(int alter) const;
+	inline bool inTieExists(int alter) const;
+	inline int outTieValue(int alter) const;
+	inline int inTieValue(int alter) const;
+
+	inline EgocentricConfigurationTable * pTwoPathTable() const;
+	inline EgocentricConfigurationTable * pReverseTwoPathTable() const;
+	inline EgocentricConfigurationTable * pInStarTable() const;
+	inline EgocentricConfigurationTable * pOutStarTable() const;
+	inline EgocentricConfigurationTable * pCriticalInStarTable() const;
+	inline EgocentricConfigurationTable * pRRTable() const;
+	inline EgocentricConfigurationTable * pRFTable() const;
+	inline EgocentricConfigurationTable * pRBTable() const;
+	inline EgocentricConfigurationTable * pFRTable() const;
+	inline EgocentricConfigurationTable * pBRTable() const;
+	inline ConfigurationTable * pBetweennessTable() const;
+
+private:
+	// The network this cache object is associated with
+	const Network * lpNetwork;
+
+	bool loneModeNetwork;
+
+	// Stores the values of ties from ego to each of the alters.
+	int * loutTieValues;
+
+	// Stores the values of ties to ego from each of the alters.
+	int * linTieValues;
+
+	// The number of two-paths from the ego to each of the alters
+	EgocentricConfigurationTable * lpTwoPathTable;
+
+	// The number of two-paths from each of the alters to the ego
+	EgocentricConfigurationTable * lpReverseTwoPathTable;
+
+	// The number of in-stars between the ego and each of the alters.
+	EgocentricConfigurationTable * lpInStarTable;
+
+	// The number of out-stars between the ego and each of the alters.
+	EgocentricConfigurationTable * lpOutStarTable;
+
+	// The number of in-stars <(i,h), (j,h)> between the ego i and each
+	// of the alters j, such that there are no two paths i -> h' -> h for
+	// h' != j.
+
+	EgocentricConfigurationTable * lpCriticalInStarTable;
+
+	// The number of actors h with reciprocated ties to both i and j.
+	EgocentricConfigurationTable * lpRRTable;
+
+	// The number of actors h with a reciprocated tie to i and a tie to j.
+	EgocentricConfigurationTable * lpRFTable;
+
+	// The number of actors h with a reciprocated tie to i and a tie from j.
+	EgocentricConfigurationTable * lpRBTable;
+
+	// The number of actors h with a tie to i and a reciprocated tie to j.
+	EgocentricConfigurationTable * lpFRTable;
+
+	// The number of actors h with a tie from i and a reciprocated tie to j.
+	EgocentricConfigurationTable * lpBRTable;
+
+	// The number of non-transitive two-paths through each actor.
+	ConfigurationTable * lpBetweennessTable;
+};
+
+
+// ----------------------------------------------------------------------------
+// Section: Inline methods
+// ----------------------------------------------------------------------------
+
+/**
+ * Returns the network this cache instance is associated with.
+ */
+const Network * NetworkCache::pNetwork() const
+{
+	return this->lpNetwork;
+}
+
+
+/**
+ * Indicates if there is a tie from the ego to the given alter. This
+ * method runs in constant time.
+ */
+bool NetworkCache::outTieExists(int alter) const
+{
+	return this->loutTieValues[alter];
+}
+
+
+/**
+ * Indicates if there is a tie from the given alter to the ego. This
+ * method runs in constant time.
+ */
+bool NetworkCache::inTieExists(int alter) const
+{
+	return this->linTieValues[alter];
+}
+
+
+/**
+ * Returns the value of the tie from the ego to the given alter.
+ */
+int NetworkCache::outTieValue(int alter) const
+{
+	return this->loutTieValues[alter];
+}
+
+
+/**
+ * Returns the value of the tie from the given alter to the ego.
+ */
+int NetworkCache::inTieValue(int alter) const
+{
+	return this->linTieValues[alter];
+}
+
+
+/**
+ * Returns the table storing the number of two-paths from the ego to
+ * each of the alters.
+ */
+EgocentricConfigurationTable * NetworkCache::pTwoPathTable() const
+{
+	return this->lpTwoPathTable;
+}
+
+
+/**
+ * Returns the table storing the number of two-paths from each of the
+ * alters to the ego.
+ */
+EgocentricConfigurationTable * NetworkCache::pReverseTwoPathTable() const
+{
+	return this->lpReverseTwoPathTable;
+}
+
+
+/**
+ * Returns the table storing the number of in-stars between the ego and
+ * each of the alters.
+ */
+EgocentricConfigurationTable * NetworkCache::pInStarTable() const
+{
+	return this->lpInStarTable;
+}
+
+
+/**
+ * Returns the table storing the number of out-stars between the ego and
+ * each of the alters.
+ */
+EgocentricConfigurationTable * NetworkCache::pOutStarTable() const
+{
+	return this->lpOutStarTable;
+}
+
+
+/**
+ * Returns the table storing the number of critical in-stars between the
+ * ego and each of the alters. An in-star <(i,h), (j,h)> is critical if
+ * there are no two paths i -> h' -> h for h' != j.
+ */
+EgocentricConfigurationTable * NetworkCache::pCriticalInStarTable() const
+{
+	return this->lpCriticalInStarTable;
+}
+
+
+/**
+ * Returns the table storing the number of actors with reciprocated ties
+ * to both i and j.
+ */
+EgocentricConfigurationTable * NetworkCache::pRRTable() const
+{
+	return this->lpRRTable;
+}
+
+
+/**
+ * Returns the table storing the number of actors with a reciprocated tie
+ * to i and a tie to j.
+ */
+EgocentricConfigurationTable * NetworkCache::pRFTable() const
+{
+	return this->lpRFTable;
+}
+
+
+/**
+ * Returns the table storing the number of actors with a reciprocated tie
+ * to i and a tie from j.
+ */
+EgocentricConfigurationTable * NetworkCache::pRBTable() const
+{
+	return this->lpRBTable;
+}
+
+
+/**
+ * Returns the table storing the number of actors with a tie to i and a
+ * reciprocated tie to j.
+ */
+EgocentricConfigurationTable * NetworkCache::pFRTable() const
+{
+	return this->lpFRTable;
+}
+
+
+/**
+ * Returns the table storing the number of actors with a tie from i and a
+ * reciprocated tie to j.
+ */
+EgocentricConfigurationTable * NetworkCache::pBRTable() const
+{
+	return this->lpBRTable;
+}
+
+
+/**
+ * Returns the table storing the number of non-transitive two-paths
+ * through each actor.
+ */
+ConfigurationTable * NetworkCache::pBetweennessTable() const
+{
+	return this->lpBetweennessTable;
+}
+
+}
+
+#endif /* NETWORKCACHE_H_ */



More information about the Rsiena-commits mailing list