public SampleVcpc(IndependenceTest independenceTest){
  if (independenceTest == null) {
    throw new NullPointerException();
  }
  if (!(independenceTest instanceof IndTestFisherZ)) {
    throw new IllegalArgumentException("Need Fisher Z test to proceed with algorithm");
  }
  this.independenceTest=independenceTest;
  this.dataSet=(DataSet)independenceTest.getData();
  this.variables=dataSet.getVariables();
  this.covMatrix=new CovarianceMatrix(dataSet);
  List<Node> nodes=covMatrix.getVariables();
  this.indexMap=indexMap(variables);
  this.nameMap=mapNames(variables);
  this.nodesToVariables=new HashMap<>();
  this.variablesToNodes=new HashMap<>();
}

public SampleVcpc ( IndependenceTest independenceTest ) { if ( independenceTest == null ) { throw new NullPointerException ( ) ; } if ( ! ( independenceTest instanceof IndTestFisherZ ) ) { throw new IllegalArgumentException ( "Need Fisher Z test to proceed with algorithm" ) ; } this . independenceTest = independenceTest ; this . dataSet = ( DataSet ) independenceTest . getData ( ) ; this . variables = dataSet . getVariables ( ) ; this . covMatrix = new CovarianceMatrix ( dataSet ) ; List < Node > nodes = covMatrix . getVariables ( ) ; this . indexMap = indexMap ( variables ) ; this . nameMap = mapNames ( variables ) ; this . nodesToVariables = new HashMap < > ( ) ; this . variablesToNodes = new HashMap < > ( ) ; }
constructs a cpc algorithm that uses the given independence test as oracle . this does not make a copy of the independence test , for fear of duplicating the data set !
