diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractAlgorithmRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractAlgorithmRunner.java index 2610b8f52a..817bf7d4bc 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractAlgorithmRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractAlgorithmRunner.java @@ -493,6 +493,18 @@ private void transferVarNamesToParams(List names) { getParams().set("varNames", names); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -504,6 +516,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractMBSearchRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractMBSearchRunner.java index c33d5dbf8e..fab4781393 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractMBSearchRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/AbstractMBSearchRunner.java @@ -217,6 +217,18 @@ IndependenceTest getIndependenceTest() { throw new IllegalStateException("Cannot find Independence for Data source."); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -228,6 +240,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ApproximateUpdaterWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ApproximateUpdaterWrapper.java index df6837b0dc..c980c63252 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ApproximateUpdaterWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ApproximateUpdaterWrapper.java @@ -212,6 +212,18 @@ private DiscreteVariable discreteVariable(Evidence evidence, String nodeName) { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -224,6 +236,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesEstimatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesEstimatorWrapper.java index 788ccc3f44..3fb5d6ea73 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesEstimatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesEstimatorWrapper.java @@ -276,6 +276,18 @@ public void setModelIndex(int modelIndex) { //======================== Private Methods ======================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -287,6 +299,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapper.java index fe26a6535c..a2a23f043a 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapper.java @@ -368,6 +368,18 @@ private void setBayesIm(BayesPm bayesPm, BayesIm oldBayesIm, MlBayesIm.Initializ this.bayesIms.add(new MlBayesIm(bayesPm, oldBayesIm, initializationMethod)); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -379,6 +391,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapperObs.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapperObs.java index 9e18d1587b..73a6e0d793 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapperObs.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesImWrapperObs.java @@ -165,6 +165,14 @@ private void log(BayesIm im) { TetradLogger.getInstance().log(message); } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesPmWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesPmWrapper.java index a7545a1618..590f85b661 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesPmWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesPmWrapper.java @@ -511,6 +511,18 @@ private void setBayesPm(BayesPm b) { this.bayesPms.add(b); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -522,6 +534,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesUpdaterClassifierWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesUpdaterClassifierWrapper.java index 8387d3d676..0dda984b6e 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesUpdaterClassifierWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BayesUpdaterClassifierWrapper.java @@ -122,6 +122,18 @@ public ClassifierBayesUpdaterDiscrete getClassifier() { return this.classifier; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -133,6 +145,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BooleanGlassGeneIm.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BooleanGlassGeneIm.java index 2aaf946aca..d8e582c82a 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BooleanGlassGeneIm.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BooleanGlassGeneIm.java @@ -399,6 +399,12 @@ public Distribution getErrorDistribution(int factor) { return getBooleanGlassFunction().getErrorDistribution(factor); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -410,6 +416,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BootstrapSamplerWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BootstrapSamplerWrapper.java index aad9b8f771..0d5eccbc47 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BootstrapSamplerWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/BootstrapSamplerWrapper.java @@ -110,6 +110,18 @@ public DataSet getOutputDataset() { return this.outputDataSet; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -121,6 +133,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CPDAGFitModel.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CPDAGFitModel.java index 96a991a1c5..b1028bc9df 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CPDAGFitModel.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CPDAGFitModel.java @@ -260,6 +260,12 @@ public BayesIm getBayesIm(int i) { return this.bayesIms.get(i); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -271,6 +277,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CalculatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CalculatorWrapper.java index 47cb8e351c..bbb46a063a 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CalculatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CalculatorWrapper.java @@ -127,6 +127,12 @@ private static DataSet copy(DataSet data) { return copy; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -138,6 +144,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CheckKnowledgeModel.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CheckKnowledgeModel.java index 591334d384..29aabb1eb4 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CheckKnowledgeModel.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CheckKnowledgeModel.java @@ -139,6 +139,12 @@ public String getComparisonString() { return sb.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -150,6 +156,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CptInvariantUpdaterWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CptInvariantUpdaterWrapper.java index 5d76971e59..27386362ac 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CptInvariantUpdaterWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/CptInvariantUpdaterWrapper.java @@ -193,6 +193,12 @@ private DiscreteVariable discreteVariable(Evidence evidence, String nodeName) { return evidence.getVariable(nodeName); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -204,6 +210,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DagWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DagWrapper.java index e89dd97081..de61791eed 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DagWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DagWrapper.java @@ -292,6 +292,12 @@ private void log() { TetradLogger.getInstance().log(message); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -303,6 +309,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DataWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DataWrapper.java index ad8f57f407..496352c606 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DataWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DataWrapper.java @@ -489,6 +489,12 @@ public List getVariables() { return this.getSelectedDataModel().getVariables(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -500,6 +506,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletBayesImWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletBayesImWrapper.java index 3cce5c40bd..92c7048a77 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletBayesImWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletBayesImWrapper.java @@ -133,6 +133,12 @@ public DirichletBayesIm getDirichletBayesIm() { return this.dirichletBayesIm; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -144,6 +150,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletEstimatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletEstimatorWrapper.java index f2853211bc..1d59cc3ecc 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletEstimatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/DirichletEstimatorWrapper.java @@ -164,6 +164,12 @@ public DirichletBayesIm getEstimatedBayesIm() { return this.dirichletBayesIm; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -175,6 +181,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EdgewiseComparisonModel.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EdgewiseComparisonModel.java index 3b9fb2a6e6..5d74bbdac1 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EdgewiseComparisonModel.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EdgewiseComparisonModel.java @@ -179,6 +179,12 @@ public String getComparisonString() { targetName, this.targetGraph); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -190,6 +196,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EmBayesEstimatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EmBayesEstimatorWrapper.java index e9649b572f..7ea9204545 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EmBayesEstimatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/EmBayesEstimatorWrapper.java @@ -156,6 +156,12 @@ private void estimate(DataSet dataSet, BayesPm bayesPm, double thresh) { public DataSet getDataSet() { return this.dataSet; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -167,6 +173,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralAlgorithmRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralAlgorithmRunner.java index 3bf8a69663..17f4641f49 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralAlgorithmRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralAlgorithmRunner.java @@ -709,6 +709,12 @@ private void transferVarNamesToParams(List names) { getParameters().set("varNames", names); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -720,6 +726,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemEstimatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemEstimatorWrapper.java index c995c78119..9f38df41fb 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemEstimatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemEstimatorWrapper.java @@ -131,6 +131,12 @@ public GeneralizedSemIm getSemIm() { return this.estIm; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -142,6 +148,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemImWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemImWrapper.java index 09d2a3afea..7668f129ac 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemImWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemImWrapper.java @@ -146,6 +146,12 @@ public List getSemIms() { return this.semIms; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -157,6 +163,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemPmWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemPmWrapper.java index 3167c04cdb..6cada1ae41 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemPmWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GeneralizedSemPmWrapper.java @@ -393,6 +393,12 @@ public GeneralizedSemPm getSemPm() { return this.semPm; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -404,6 +410,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphComparisonParams.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphComparisonParams.java index 940a037a41..a2e85451cf 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphComparisonParams.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphComparisonParams.java @@ -225,6 +225,12 @@ public void setReferenceGraphName(String name) { this.referenceGraphName = name; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -236,6 +242,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphSelectionWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphSelectionWrapper.java index 0379c3ae8c..8fd3d40263 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphSelectionWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphSelectionWrapper.java @@ -981,6 +981,12 @@ private Set getEdgesFromPath(List path, Graph graph) { return edges; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -992,6 +998,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphWrapper.java index 1e7b616e4d..acc7f242eb 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GraphWrapper.java @@ -425,6 +425,12 @@ public Parameters getParameters() { // TetradLogger.getInstance().log("graph", "" + getGraph()); // } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -436,6 +442,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GridSearchModel.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GridSearchModel.java index f2077c7548..bad4c1b66e 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GridSearchModel.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/GridSearchModel.java @@ -1052,6 +1052,12 @@ public void setLastVerboseOutputText(String lastVerboseOutputText) { this.lastVerboseOutputText = lastVerboseOutputText; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1063,6 +1069,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IdentifiabilityWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IdentifiabilityWrapper.java index 342c37e5d5..52fa8c16e3 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IdentifiabilityWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IdentifiabilityWrapper.java @@ -176,6 +176,12 @@ private DiscreteVariable discreteVariable(Evidence evidence, String nodeName) { return evidence.getVariable(nodeName); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -187,6 +193,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IndependenceResultIndFacts.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IndependenceResultIndFacts.java index 286e899a7f..6988c5fb40 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IndependenceResultIndFacts.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/IndependenceResultIndFacts.java @@ -151,6 +151,12 @@ public enum Type { UNDETERMINED } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -162,6 +168,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/LogisticRegressionRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/LogisticRegressionRunner.java index bb00556825..ce583c77a0 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/LogisticRegressionRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/LogisticRegressionRunner.java @@ -407,6 +407,12 @@ public void setTargetName(String target) { this.targetName = target; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -418,6 +424,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MeasurementModelWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MeasurementModelWrapper.java index 063a12398e..9f08f2583b 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MeasurementModelWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MeasurementModelWrapper.java @@ -176,6 +176,12 @@ public void setName(String name) { this.name = name; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -187,6 +193,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/Misclassifications.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/Misclassifications.java index 9f6668195d..1173eeb0eb 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/Misclassifications.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/Misclassifications.java @@ -181,6 +181,12 @@ public String getComparisonString() { "\n\n\n" + table; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -192,6 +198,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MissingDataInjectorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MissingDataInjectorWrapper.java index 01a2218849..c1f2f501a7 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MissingDataInjectorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/MissingDataInjectorWrapper.java @@ -98,6 +98,12 @@ public DataSet getOutputDataset() { return this.outputDataSet; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -109,6 +115,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/PValueImproverWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/PValueImproverWrapper.java index bb94da8959..e6fb390b89 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/PValueImproverWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/PValueImproverWrapper.java @@ -530,6 +530,12 @@ public DataSet simulateDataCholesky(int sampleSize, Matrix covar, List var return DataTransforms.restrictToMeasured(fullDataSet); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -541,6 +547,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RegressionRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RegressionRunner.java index 1df8a5b776..a5c4a252dd 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RegressionRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RegressionRunner.java @@ -394,6 +394,12 @@ public void setTargetName(String target) { this.targetName = target; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -405,6 +411,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ReplaceMissingWithRandomWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ReplaceMissingWithRandomWrapper.java index c0fc8fa47c..1f0a9a87ac 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ReplaceMissingWithRandomWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ReplaceMissingWithRandomWrapper.java @@ -79,6 +79,12 @@ public static PcRunner serializableInstance() { //==========================PUBLIC METHODS============================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -90,6 +96,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RowSummingExactWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RowSummingExactWrapper.java index 258d160986..22aa121d64 100755 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RowSummingExactWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/RowSummingExactWrapper.java @@ -228,6 +228,12 @@ private DiscreteVariable discreteVariable(Evidence evidence, String nodeName) { return evidence.getVariable(nodeName); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -239,6 +245,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ScoredGraphsWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ScoredGraphsWrapper.java index 1220eadf02..cd2f93dbcd 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ScoredGraphsWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ScoredGraphsWrapper.java @@ -212,6 +212,12 @@ private void log() { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -223,6 +229,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemEstimatorWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemEstimatorWrapper.java index 1e41b6a6f5..33cb91e80a 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemEstimatorWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemEstimatorWrapper.java @@ -259,6 +259,12 @@ private void log() { TetradLogger.getInstance().log(message); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -270,6 +276,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemGraphWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemGraphWrapper.java index 8bc9300910..b46cb60c11 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemGraphWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemGraphWrapper.java @@ -377,6 +377,12 @@ private void log() { TetradLogger.getInstance().log(message); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -388,6 +394,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemImWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemImWrapper.java index 2f1b4a1789..99a183c3d8 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemImWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemImWrapper.java @@ -248,6 +248,12 @@ private void log(int i, SemIm pm) { TetradLogger.getInstance().log(message); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -259,6 +265,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemPmWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemPmWrapper.java index 524164db08..57b3a19dfe 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemPmWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemPmWrapper.java @@ -285,6 +285,12 @@ private void setSemPm(SemPm oldSemPm) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -296,6 +302,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemUpdaterWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemUpdaterWrapper.java index ef1da8581a..1c27615d73 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemUpdaterWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SemUpdaterWrapper.java @@ -100,6 +100,12 @@ public SemUpdater getSemUpdater() { return this.semUpdater; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -111,6 +117,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionNodeWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionNodeWrapper.java index 979e124a29..be52dfcd4c 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionNodeWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionNodeWrapper.java @@ -195,6 +195,12 @@ public String toString() { getSessionName() + ")"; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -206,6 +212,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionWrapper.java index 31bbbe9e3b..a07d348955 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/SessionWrapper.java @@ -737,6 +737,12 @@ public void setNewSession(boolean newSession) { this.session.setNewSession(newSession); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -748,6 +754,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StandardizedSemImWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StandardizedSemImWrapper.java index 188dab4b67..7ee60128b4 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StandardizedSemImWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StandardizedSemImWrapper.java @@ -156,6 +156,12 @@ public void setShowErrors(boolean showErrors) { //======================== Private methods =======================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -167,6 +173,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StructEmBayesSearchRunner.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StructEmBayesSearchRunner.java index 0a3273c1b5..a0c7d38781 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StructEmBayesSearchRunner.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/StructEmBayesSearchRunner.java @@ -222,6 +222,12 @@ public DataSet getDataSet() { return this.dataSet; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -233,6 +239,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TabularComparison.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TabularComparison.java index 90fc5a7fef..4ae775e94e 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TabularComparison.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TabularComparison.java @@ -227,6 +227,12 @@ public void setName(String name) { //============================PRIVATE METHODS=========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -238,6 +244,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TetradMetadata.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TetradMetadata.java index 28f8adfc78..a04a2b0f14 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TetradMetadata.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TetradMetadata.java @@ -107,6 +107,12 @@ public Date getDate() { //============================PRIVATE METHODS=======================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -118,6 +124,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TimeLagGraphWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TimeLagGraphWrapper.java index 4d3668ab8c..96f14cabdc 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TimeLagGraphWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/TimeLagGraphWrapper.java @@ -186,6 +186,12 @@ private void log() { TetradLogger.getInstance().log(this.graph + ""); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -197,6 +203,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DeterminismWraper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DeterminismWraper.java index 8f3c908afb..eb678376a5 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DeterminismWraper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DeterminismWraper.java @@ -65,6 +65,12 @@ public static PcRunner serializableInstance() { return PcRunner.serializableInstance(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -76,6 +82,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DiscretizationWrapper.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DiscretizationWrapper.java index bb63c74793..4eed9cb0f3 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DiscretizationWrapper.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/DiscretizationWrapper.java @@ -96,6 +96,12 @@ public static PcRunner serializableInstance() { return PcRunner.serializableInstance(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -107,6 +113,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/AbstractWorkbench.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/AbstractWorkbench.java index 7325f95a10..308e685c3b 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/AbstractWorkbench.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/AbstractWorkbench.java @@ -2985,6 +2985,12 @@ public void propertyChange(PropertyChangeEvent e) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -2996,6 +3002,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeError.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeError.java index 3c708cef35..fdc273507a 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeError.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeError.java @@ -155,6 +155,12 @@ else if (nodes != null) { return newName; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -166,6 +172,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLatent.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLatent.java index befd2d0d0b..9ff54f7b6c 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLatent.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLatent.java @@ -167,6 +167,12 @@ public void doDoubleClickAction() { doDoubleClickAction(new EdgeListGraph()); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -178,6 +184,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLocked.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLocked.java index aa345ab50f..e550cbb00e 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLocked.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeLocked.java @@ -166,6 +166,12 @@ public void doDoubleClickAction() { doDoubleClickAction(new EdgeListGraph()); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -177,6 +183,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeMeasured.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeMeasured.java index c0a80f4c5a..3975fa1ab1 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeMeasured.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeMeasured.java @@ -209,6 +209,12 @@ public void setEditExitingMeasuredVarsAllowed(boolean editExitingMeasuredVarsAll this.editExitingMeasuredVarsAllowed = editExitingMeasuredVarsAllowed; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -220,6 +226,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeRandomized.java b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeRandomized.java index 844f53992a..f49b2605ae 100644 --- a/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeRandomized.java +++ b/tetrad-gui/src/main/java/edu/cmu/tetradapp/workbench/GraphNodeRandomized.java @@ -166,6 +166,12 @@ public void doDoubleClickAction() { doDoubleClickAction(new EdgeListGraph()); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -177,6 +183,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/algorithm/Algorithms.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/algorithm/Algorithms.java index 3e8ddb7511..394c8b4182 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/algorithm/Algorithms.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/algorithm/Algorithms.java @@ -51,6 +51,12 @@ public List getAlgorithms() { return new ArrayList<>(this.algorithms); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -62,6 +68,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/simulation/Simulations.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/simulation/Simulations.java index 5a2794e05d..d2b117591c 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/simulation/Simulations.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/simulation/Simulations.java @@ -49,6 +49,12 @@ public List getSimulations() { return new ArrayList<>(this.simulations); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -60,6 +66,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphPrecision.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphPrecision.java index cdc2c3b57c..79df272a45 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphPrecision.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphPrecision.java @@ -4,17 +4,41 @@ import edu.cmu.tetrad.data.DataModel; import edu.cmu.tetrad.graph.Graph; +/** + * The LocalGraphPrecision class implements the Statistic interface and represents the Local Graph Precision statistic. + * It calculates the precision between the true graph and the estimated graph locally. + */ public class LocalGraphPrecision implements Statistic { + + /** + * This method returns the abbreviation for the statistic. + * + * @return The abbreviation for the statistic. + */ @Override public String getAbbreviation() { return "LGP"; } + /** + * Returns a short one-line description of this statistic. + * + * @return The description of the statistic. + */ @Override public String getDescription() { return "Local Graph Precision"; } + /** + * This method calculates the Local Graph Precision. + * It calculates the precision between the true graph and the estimated graph locally. + * + * @param trueGraph The true graph. + * @param estGraph The estimated graph. + * @param dataModel The data model. + * @return The local graph precision. + */ @Override public double getValue(Graph trueGraph, Graph estGraph, DataModel dataModel) { LocalGraphConfusion lgConfusion = new LocalGraphConfusion(trueGraph, estGraph); @@ -23,6 +47,12 @@ public double getValue(Graph trueGraph, Graph estGraph, DataModel dataModel) { return lgTp / (double) (lgTp + lgFp); } + /** + * This method returns the normalized value of a given statistic. + * + * @param value The value of the statistic. + * @return The normalized value of the statistic. + */ @Override public double getNormValue(double value) { return value; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphRecall.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphRecall.java index 94b893d248..5fed2647e0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphRecall.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/LocalGraphRecall.java @@ -4,6 +4,11 @@ import edu.cmu.tetrad.data.DataModel; import edu.cmu.tetrad.graph.Graph; +/** + * LocalGraphRecall implements the Statistic interface and represents the local graph recall statistic. + * It calculates the recall of the estimated graph with respect to the true graph. The recall is defined as the ratio + * of true positives (TP) to the sum of true positives and false negatives (TP + FN). + */ public class LocalGraphRecall implements Statistic { @Override public String getAbbreviation() { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/Statistics.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/Statistics.java index 5b32a76dca..f9df70d026 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/Statistics.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/Statistics.java @@ -100,6 +100,12 @@ public int size() { return this.statistics.size(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -111,6 +117,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/utils/LocalGraphConfusion.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/utils/LocalGraphConfusion.java index c10e7c2da4..e7eab67d0c 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/utils/LocalGraphConfusion.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/algcomparison/statistic/utils/LocalGraphConfusion.java @@ -206,18 +206,38 @@ public LocalGraphConfusion(Graph trueGraph, Graph estGraph) { } } + /** + * Returns the true positives (TP) value of the LocalGraphConfusion object. + * + * @return The true positives (TP) value. + */ public int getTp() { return tp; } + /** + * Retrieves the value of true negatives (TN) from the LocalGraphConfusion object. + * + * @return The true negatives (TN) value. + */ public int getTn() { return tn; } + /** + * Retrieves the value of false positives (FP) from the LocalGraphConfusion object. + * + * @return The false positives (FP) value. + */ public int getFp() { return fp; } + /** + * Returns the false negatives (FN) value of the LocalGraphConfusion object. + * + * @return The false negatives (FN) value. + */ public int getFn() { return fn; } diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/ApproximateUpdater.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/ApproximateUpdater.java index 2d19b7d17d..1a23b11ef8 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/ApproximateUpdater.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/ApproximateUpdater.java @@ -372,6 +372,12 @@ private Dag createManipulatedGraph(Graph graph) { return updatedGraph; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -383,6 +389,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesImProbs.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesImProbs.java index 2ce649fa99..2d94e0ff99 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesImProbs.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesImProbs.java @@ -285,6 +285,12 @@ public List getVariables() { return this.variables; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -296,6 +302,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesPm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesPm.java index b21b35cdae..7cb084b8e9 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesPm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/BayesPm.java @@ -576,6 +576,12 @@ private void initializeValues(int lowerBound, int upperBound) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -587,6 +593,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantMarginalCalculator.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantMarginalCalculator.java index f4df08d42b..0f18ccd164 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantMarginalCalculator.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantMarginalCalculator.java @@ -215,6 +215,12 @@ private boolean noModifiedCpts(int[] parents, int i) { return intersection.isEmpty(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -226,6 +232,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantUpdater.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantUpdater.java index e558efd37b..2a0bde7dba 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantUpdater.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/CptInvariantUpdater.java @@ -293,6 +293,12 @@ private Dag createManipulatedGraph(Graph graph) { return updatedGraph; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -304,6 +310,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/DirichletBayesIm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/DirichletBayesIm.java index 6b441d612a..5ebe897e2a 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/DirichletBayesIm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/DirichletBayesIm.java @@ -1173,6 +1173,12 @@ private int getUniqueCompatibleOldRow(int nodeIndex, int rowIndex, return oldBayesIm.getRowIndex(oldNodeIndex, oldParentValues); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1184,6 +1190,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Evidence.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Evidence.java index dccc670de7..5b16ea8ecd 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Evidence.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Evidence.java @@ -340,6 +340,12 @@ public int hashCode() { return hashCode; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -351,6 +357,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Identifiability.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Identifiability.java index 1f1704a25d..03303bce8d 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Identifiability.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Identifiability.java @@ -996,6 +996,12 @@ private Dag createManipulatedGraph(Graph graph) { ///////////////////////////////////////////////////////////////// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1007,6 +1013,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeAlgorithm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeAlgorithm.java index afdf665eaf..dfec59cca1 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeAlgorithm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeAlgorithm.java @@ -996,6 +996,12 @@ public String toString() { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1007,6 +1013,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeUpdater.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeUpdater.java index 97bca6bc8f..8b35c47a1b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeUpdater.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/JunctionTreeUpdater.java @@ -327,6 +327,12 @@ private Dag createManipulatedGraph(Graph graph) { return updatedGraph; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -338,6 +344,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Manipulation.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Manipulation.java index c2292c82af..e440745e2a 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Manipulation.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Manipulation.java @@ -185,6 +185,12 @@ public boolean isManipulated(int nodeIndex) { return this.manipulated[nodeIndex]; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -196,6 +202,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesIm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesIm.java index 9f5ceaadb6..4d2a6be550 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesIm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesIm.java @@ -1398,6 +1398,12 @@ private void copyValuesFromOldToNew(int oldNodeIndex, int oldRowIndex, } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1409,6 +1415,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesImObs.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesImObs.java index 3126f1a29b..664d1b9ae0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesImObs.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/MlBayesImObs.java @@ -1196,6 +1196,12 @@ private void initializeNode(int nodeIndex) { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1207,6 +1213,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Proposition.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Proposition.java index 3e35240487..51c57fc54c 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Proposition.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/Proposition.java @@ -535,6 +535,12 @@ private int getMaxNumCategories() { return max; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -546,6 +552,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/StoredCellProbs.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/StoredCellProbs.java index 3f340492b0..3575057cd9 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/StoredCellProbs.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/bayes/StoredCellProbs.java @@ -407,6 +407,12 @@ private void setCellProbability(int[] variableValues, double probability) { this.probs[getOffset(variableValues)] = probability; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -418,6 +424,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/BoxDataSet.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/BoxDataSet.java index ac017bed50..13d280404b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/BoxDataSet.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/BoxDataSet.java @@ -166,6 +166,12 @@ public static BoxDataSet serializableInstance() { return new BoxDataSet(new ShortDataBox(4, 4), vars); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -177,6 +183,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/Clusters.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/Clusters.java index 29a1af20e7..9155ba5916 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/Clusters.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/Clusters.java @@ -323,6 +323,12 @@ private int numClustersStored() { return max; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -334,6 +340,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousDiscretizationSpec.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousDiscretizationSpec.java index 7ae03427ff..23ecb5c162 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousDiscretizationSpec.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousDiscretizationSpec.java @@ -154,6 +154,12 @@ public double[] getBreakpoints() { return this.breakpoints; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -165,6 +171,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousVariable.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousVariable.java index 313d49f5a6..e94af1b0a3 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousVariable.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/ContinuousVariable.java @@ -286,6 +286,12 @@ private PropertyChangeSupport getPcs() { return this.pcs; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -297,6 +303,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CorrelationMatrixOnTheFly.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CorrelationMatrixOnTheFly.java index b794ca75a1..eb6152efdb 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CorrelationMatrixOnTheFly.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CorrelationMatrixOnTheFly.java @@ -442,6 +442,12 @@ public void removeVariables(List remaining) { this.cov.removeVariables(remaining); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -453,6 +459,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrix.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrix.java index 85788530c4..bae830f798 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrix.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrix.java @@ -560,6 +560,12 @@ private Set getSelectedVariables() { return this.selectedVariables; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -571,6 +577,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrixOnTheFly.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrixOnTheFly.java index 4d1fd07a7d..67753e8c81 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrixOnTheFly.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/CovarianceMatrixOnTheFly.java @@ -859,6 +859,12 @@ private void checkMatrix() { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -870,6 +876,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataModelList.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataModelList.java index 0720eb8908..b7e46f98c3 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataModelList.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataModelList.java @@ -347,6 +347,12 @@ public boolean equals(Object o) { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -358,6 +364,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DelimiterType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DelimiterType.java index ff07ae7501..b57c2c29aa 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DelimiterType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DelimiterType.java @@ -119,6 +119,12 @@ Object readResolve() throws ObjectStreamException { return DelimiterType.TYPES[this.ordinal]; // Canonicalize. } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -130,6 +136,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteDiscretizationSpec.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteDiscretizationSpec.java index 6d2a516bba..311b178251 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteDiscretizationSpec.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteDiscretizationSpec.java @@ -101,6 +101,12 @@ public int[] getRemap() { return this.remap; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -112,6 +118,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariable.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariable.java index a44f180bcf..5c7040bec0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariable.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariable.java @@ -504,6 +504,12 @@ private PropertyChangeSupport getPcs() { return this.pcs; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -515,6 +521,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariableType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariableType.java index 9d83f4adf3..6d8f4bf892 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariableType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/DiscreteVariableType.java @@ -102,6 +102,12 @@ Object readResolve() throws ObjectStreamException { return DiscreteVariableType.TYPES[this.ordinal]; // Canonicalize. } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -113,6 +119,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeEdge.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeEdge.java index 29ea7b7469..8bf9585914 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeEdge.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeEdge.java @@ -127,6 +127,12 @@ public String toString() { return this.from + "-->" + this.to; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -138,6 +144,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeGroup.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeGroup.java index 2618bae63b..8dbe5c6d4d 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeGroup.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/KnowledgeGroup.java @@ -223,6 +223,12 @@ public boolean equals(Object o) { } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -234,6 +240,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/NumberObjectDataSet.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/NumberObjectDataSet.java index f75055fdce..2091a61fc5 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/NumberObjectDataSet.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/NumberObjectDataSet.java @@ -182,6 +182,12 @@ public static NumberObjectDataSet serializableInstance() { return new NumberObjectDataSet(0, new LinkedList<>()); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -193,6 +199,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/SplitCasesSpec.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/SplitCasesSpec.java index f5d810bc81..f8f4fc78d7 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/SplitCasesSpec.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/SplitCasesSpec.java @@ -100,6 +100,12 @@ public int[] getBreakpoints() { return this.breakpoints; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -111,6 +117,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/TimeSeriesData.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/TimeSeriesData.java index 2f2fc01cf8..b675dc43a5 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/data/TimeSeriesData.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/data/TimeSeriesData.java @@ -248,6 +248,12 @@ public double getDatum(int row, int col) { return this.data2.get(row, col); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -259,6 +265,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Edge.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Edge.java index 732bd4d4a8..75d793d5f3 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Edge.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Edge.java @@ -457,6 +457,12 @@ private boolean pointingLeft(Endpoint endpoint1, Endpoint endpoint2) { // ===========================PRIVATE METHODS===========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -468,6 +474,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/EdgeTypeProbability.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/EdgeTypeProbability.java index 5dd7515568..467e1e99c5 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/EdgeTypeProbability.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/EdgeTypeProbability.java @@ -178,6 +178,12 @@ public enum EdgeType { tt } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -189,6 +195,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Endpoint.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Endpoint.java index ab1703fdf6..2ebb92026d 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Endpoint.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Endpoint.java @@ -67,6 +67,12 @@ public enum Endpoint implements TetradSerializable { */ private static final long serialVersionUID = 23L; + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -78,6 +84,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/IndependenceFact.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/IndependenceFact.java index 440e6b0d6c..f0ece5871c 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/IndependenceFact.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/IndependenceFact.java @@ -253,6 +253,12 @@ public int compareTo(IndependenceFact fact) { return 0; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -264,6 +270,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/OrderedPair.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/OrderedPair.java index 4e1e3ddc80..bc7ef87d6a 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/OrderedPair.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/OrderedPair.java @@ -116,6 +116,12 @@ public String toString() { return "<" + this.first + ", " + this.second + ">"; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -127,6 +133,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Paths.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Paths.java index 347a6327d4..098f9c2297 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Paths.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Paths.java @@ -2605,6 +2605,12 @@ private static Set union(Set set, int element) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -2616,6 +2622,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Triple.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Triple.java index ed70040453..bf483f8b54 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Triple.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/graph/Triple.java @@ -175,6 +175,12 @@ public boolean alongPathIn(Graph graph) { return graph.isAdjacentTo(this.x, this.y) && graph.isAdjacentTo(this.y, this.z) && this.x != this.z; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -186,6 +192,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/regression/RegressionResult.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/regression/RegressionResult.java index 2591f7eeab..99107c80b8 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/regression/RegressionResult.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/regression/RegressionResult.java @@ -358,6 +358,12 @@ public Vector getResiduals() { return this.res; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -369,6 +375,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/BFci.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/BFci.java index 782701621e..48705cc112 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/BFci.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/BFci.java @@ -281,6 +281,8 @@ public void setDoDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule /** * Sets whether the discriminating path collider rule should be used. + * + * @param doDiscriminatingPathColliderRule True if the discriminating path collider rule should be used, false. */ public void setDoDiscriminatingPathColliderRule(boolean doDiscriminatingPathColliderRule) { this.doDiscriminatingPathColliderRule = doDiscriminatingPathColliderRule; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/Cstar.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/Cstar.java index d4a3d8e2b0..bcc0ff5b42 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/Cstar.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/Cstar.java @@ -1038,6 +1038,12 @@ public double getMinBeta() { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1049,6 +1055,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/FciMax.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/FciMax.java index 3f3bc474c5..de8ab640c0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/FciMax.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/FciMax.java @@ -481,6 +481,11 @@ private void doNode(Graph graph, Map scores, Node b) { } } + /** + * Sets whether the discriminating path collider rule should be applied during the search. + * + * @param doDiscriminatingPathColliderRule True, if the rule should be applied. False otherwise. + */ public void setDoDiscriminatingPathColliderRule(boolean doDiscriminatingPathColliderRule) { this.doDiscriminatingPathColliderRule = doDiscriminatingPathColliderRule; } diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLite.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLite.java index de42e400e0..bdaa237aa2 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLite.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLite.java @@ -129,15 +129,20 @@ public LvLite(Score score) { * algorithm, and the graph is modified in place. The call to this method may be repeated to account for the * possibility that the removal of an edge may allow for further removals or orientations. * - * @param pag The original graph. - * @param fciOrient The orientation rules to be applied. - * @param best The list of best nodes. - * @param scorer The scorer used to evaluate edge orientations. - * @param equalityThreshold The threshold for equality. (This is not used for Oracle scoring.) + * @param pag The original graph. + * @param fciOrient The orientation rules to be applied. + * @param best The list of best nodes. + * @param scorer The scorer used to evaluate edge orientations. + * @param unshieldedColliders The set of unshielded colliders. + * @param cpdag The CPDAG. + * @param knowledge The knowledge object. + * @param allowTucks A boolean value indicating whether tucks are allowed. + * @param equalityThreshold The threshold for equality. (This is not used for Oracle scoring.) + * @param verbose A boolean value indicating whether verbose output should be printed. */ public static void orientCollidersAndRemoveEdges(Graph pag, FciOrient fciOrient, List best, TeyssierScorer scorer, - Set unshieldedColliders, Graph cpdag, Knowledge knowledge, - boolean allowTucks, boolean verbose, double equalityThreshold) { + Set unshieldedColliders, Graph cpdag, Knowledge knowledge, + boolean allowTucks, boolean verbose, double equalityThreshold) { reorientWithCircles(pag, verbose); recallUnshieldedTriples(pag, unshieldedColliders, verbose); @@ -189,9 +194,19 @@ public static void orientCollidersAndRemoveEdges(Graph pag, FciOrient fciOrient, /** * Determines the final orientation of the graph using the given FciOrient object, Graph object, and scorer object. * - * @param fciOrient The FciOrient object used to determine the final orientation. - * @param pag The Graph object for which the final orientation is determined. - * @param scorer The scorer object used in the score-based discriminating path rule. + * @param fciOrient The FciOrient object used to determine the final orientation. + * @param pag The Graph object for which the final orientation is determined. + * @param scorer The scorer object used in the score-based discriminating path rule. + * @param doDiscriminatingPathTailRule A boolean value indicating whether the discriminating path tail rule + * should be applied. If set to true, the discriminating path tail rule will + * be applied. If set to false, the discriminating path tail rule will not + * be applied. + * @param doDiscriminatingPathColliderRule A boolean value indicating whether the discriminating path collider rule + * should be applied. If set to true, the discriminating path collider rule + * will be applied. If set to false, the discriminating path collider rule + * will not be applied. + * @param completeRuleSetUsed A boolean value indicating whether the complete rule set should be used. + * @param verbose A boolean value indicating whether verbose output should be printed. */ public static void finalOrientation(FciOrient fciOrient, Graph pag, TeyssierScorer scorer, boolean completeRuleSetUsed, boolean doDiscriminatingPathTailRule, boolean doDiscriminatingPathColliderRule, boolean verbose) { @@ -864,7 +879,17 @@ public void setEqualityThreshold(double equalityThreshold) { this.equalityThreshold = equalityThreshold; } + /** + * Enumeration representing different start options. + */ public enum START_WITH { - BOSS, GRASP + /** + * Start with BOSS. + */ + BOSS, + /** + * Start with GRaSP. + */ + GRASP } } diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLiteDsepFriendly.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLiteDsepFriendly.java index 49d6483283..73bdd23ee6 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLiteDsepFriendly.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/LvLiteDsepFriendly.java @@ -30,7 +30,10 @@ import edu.cmu.tetrad.util.TetradLogger; import org.jetbrains.annotations.NotNull; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * The LV-Lite algorithm implements the IGraphSearch interface and represents a search algorithm for learning the @@ -47,14 +50,14 @@ public final class LvLiteDsepFriendly implements IGraphSearch { * hence it cannot be modified or accessed from outside the class where it is declared. */ private final ArrayList variables; - /** - * Indicates whether to use Raskutti Uhler feature. - */ - private boolean useRaskuttiUhler; /** * The independence test. */ private final IndependenceTest test; + /** + * Indicates whether to use Raskutti Uhler feature. + */ + private boolean useRaskuttiUhler; /** * The score. */ @@ -121,8 +124,8 @@ public final class LvLiteDsepFriendly implements IGraphSearch { */ private int maxPathLength = -1; /** - * The equality threshold, a fraction of abs(BIC) used to determine equality of scores. - * This is not used for MSEP tests. + * The equality threshold, a fraction of abs(BIC) used to determine equality of scores. This is not used for MSEP + * tests. */ private double equalityThreshold; @@ -366,13 +369,20 @@ public void setMaxPathLength(int maxPathLength) { this.maxPathLength = maxPathLength; } + /** + * Sets whether internal randomness is allowed in the search algorithm. + * + * @param allowInternalRandomness true to allow internal randomness, false otherwise + */ public void setAllowInternalRandomness(boolean allowInternalRandomness) { this.allowInternalRandomness = allowInternalRandomness; } /** - * The equality threshold, a fraction of abs(BIC) used to determine equality of scores. - * This is not used for MSEP tests. + * The equality threshold, a fraction of abs(BIC) used to determine equality of scores. This is not used for MSEP + * tests. + * + * @param equalityThreshold the equality threshold */ public void setEqualityThreshold(double equalityThreshold) { this.equalityThreshold = equalityThreshold; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java index 0cd85ec0ee..b64b561f11 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java @@ -203,7 +203,7 @@ public AllSubsetsIndependenceFacts getAllSubsetsIndependenceFacts() { Set z = GraphUtils.asSet(list, _other); if (!checkNodeIndependenceAndConditioning(x, y, z)) { - continue; + continue; } IndependenceFact fact = new IndependenceFact(x, y, z); @@ -271,10 +271,10 @@ public List getLocalPValues(IndependenceTest independenceTest, List> getLocalPValues(IndependenceTest independenceTest, List facts, Double shuffleThreshold) { // Shuffle to generate more data from the same graph. @@ -319,6 +319,7 @@ public Double checkAgainstAndersonDarlingTest(List pValues) { * @param independenceTest The independence test to be used for calculating p-values. * @param graph The graph containing the nodes for testing. * @param threshold The threshold value for classifying nodes. + * @param shuffleThreshold The threshold value for shuffling the data. * @return A list containing two lists: the first list contains the accepted nodes and the second list contains the * rejected nodes. */ @@ -355,12 +356,12 @@ public List> getAndersonDarlingTestAcceptsRejectsNodesForAllNodes(Ind * Confusion statistics were calculated using Adjacency (AdjacencyPrecision, AdjacencyRecall) and Arrowhead * (ArrowheadPrecision, ArrowheadRecall) * - * @param independenceTest - * @param estimatedCpdag - * @param trueGraph - * @param threshold - * @param shuffleThreshold - * @return + * @param independenceTest The independence test to be used for calculating p-values. + * @param estimatedCpdag The estimated CPDAG. + * @param trueGraph The true graph. + * @param threshold The threshold value for classifying nodes. + * @param shuffleThreshold The threshold value for shuffling the data. + * @return A list containing two lists: the first list contains the accepted nodes and the second list contains the */ public List> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlotData(IndependenceTest independenceTest, Graph estimatedCpdag, Graph trueGraph, Double threshold, Double shuffleThreshold) { // When calling, default reject null as <=0.05 @@ -508,12 +509,12 @@ public List> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlot * Confusion statistics were calculated using Local Graph Precision and Recall (LocalGraphPrecision, * LocalGraphRecall). * - * @param independenceTest - * @param estimatedCpdag - * @param trueGraph - * @param threshold - * @param shuffleThreshold - * @return + * @param independenceTest The independence test to be used for calculating p-values. + * @param estimatedCpdag The estimated CPDAG. + * @param trueGraph The true graph. + * @param threshold The threshold value for classifying nodes. + * @param shuffleThreshold The threshold value for shuffling the data. + * @return A list containing two lists: the first list contains the accepted nodes and the second list contains the */ public List> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlotData2(IndependenceTest independenceTest, Graph estimatedCpdag, Graph trueGraph, Double threshold, Double shuffleThreshold) { // When calling, default reject null as <=0.05 @@ -638,6 +639,15 @@ public void getPrecisionAndRecallOnMarkovBlanketGraph(Node x, Graph estimatedGra " ArrowHeadPrecision = " + nf.format(ahp) + " ArrowHeadRecall = " + nf.format(ahr)); } + /** + * Calculates the precision and recall on the markov blanket graph plot data. + * + * @param x the target node + * @param estimatedGraph the estimated graph + * @param trueGraph the true graph + * @return a list of doubles representing the precision and recall values: [adjacency precision, adjacency recall, + * arrowhead precision, arrowhead recall] + */ public List getPrecisionAndRecallOnMarkovBlanketGraphPlotData(Node x, Graph estimatedGraph, Graph trueGraph) { // Lookup graph is the same structure as trueGraph's structure but node objects replaced by estimated graph nodes. Graph lookupGraph = GraphUtils.replaceNodes(trueGraph, estimatedGraph.getNodes()); @@ -677,6 +687,14 @@ public void getPrecisionAndRecallOnMarkovBlanketGraph2(Node x, Graph estimatedGr " LocalGraphPrecision = " + nf.format(lgp) + " LocalGraphRecall = " + nf.format(lgr) + " \n"); } + /** + * This method calculates the precision and recall of a target node's Markov Blanket in the given estimated graph. + * + * @param x the target node for which the precision and recall are calculated + * @param estimatedGraph the estimated graph + * @param trueGraph the true graph + * @return a list of two doubles representing the precision and recall, respectively + */ public List getPrecisionAndRecallOnMarkovBlanketGraphPlotData2(Node x, Graph estimatedGraph, Graph trueGraph) { // Lookup graph is the same structure as trueGraph's structure but node objects replaced by estimated graph nodes. Graph lookupGraph = GraphUtils.replaceNodes(trueGraph, estimatedGraph.getNodes()); diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/test/IndependenceResult.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/test/IndependenceResult.java index 077ba4865e..0c911758cb 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/test/IndependenceResult.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/test/IndependenceResult.java @@ -167,6 +167,12 @@ public boolean isValid() { return isValid; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -178,6 +184,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcAlgorithmType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcAlgorithmType.java index 4eb5e38ec5..4b00065bac 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcAlgorithmType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcAlgorithmType.java @@ -101,6 +101,12 @@ public static BpcAlgorithmType[] getAlgorithmDescriptions() { }; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -112,6 +118,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcTestType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcTestType.java index 528ceb31f0..d14e1226cf 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcTestType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/BpcTestType.java @@ -179,6 +179,12 @@ public static BpcTestType[] getTestDescriptions() { */ } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -190,6 +196,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/Sextad.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/Sextad.java index 5573b2801d..ba5ba6e3a4 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/Sextad.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/utils/Sextad.java @@ -216,6 +216,12 @@ private void testDistinctness(int i, int j, int k, int l, int m, int n) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -227,6 +233,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/work_in_progress/Sextad.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/work_in_progress/Sextad.java index 0eb1023815..14e47b56bd 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/work_in_progress/Sextad.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/work_in_progress/Sextad.java @@ -263,6 +263,12 @@ public List getNodes() { return nodes; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -274,6 +280,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/DagScorer.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/DagScorer.java index 5d1582b10d..d86c025550 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/DagScorer.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/DagScorer.java @@ -330,6 +330,18 @@ public double getPValue() { return 1.0 - ProbUtils.chisqCdf(getChiSquare(), getDof()); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -341,6 +353,22 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/GeneralizedSemPm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/GeneralizedSemPm.java index 68656a5ec8..c62a73b9c6 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/GeneralizedSemPm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/GeneralizedSemPm.java @@ -1066,6 +1066,12 @@ private List putErrorNodesLast(List parents) { return sortedNodes; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1077,6 +1083,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Mapping.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Mapping.java index 92c4a55ed5..34c3fe2a05 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Mapping.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Mapping.java @@ -174,6 +174,12 @@ public String toString() { "[" + this.i + "][" + this.j + "]>"; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -185,6 +191,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamComparison.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamComparison.java index 64b4ce196d..febe89c98e 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamComparison.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamComparison.java @@ -25,9 +25,33 @@ * An enum of the types of the various comparisons a parameter may have with respect to one another for SEM estimation. */ public enum ParamComparison { + /** + * Represents the "Non-comparable" comparison type for a parameter in SEM estimation. + * + * This type of comparison indicates that the parameter is not comparable to any other parameter + * in the structural equation model. + */ NC("NC"), + /** + * An enum representing the "EQ" comparison type for a parameter in SEM estimation. + * + * This type of comparison indicates that the parameter is equal to another parameter + * in the structural equation model. + */ EQ("EQ"), + /** + * Represents the "LT" comparison type for a parameter in SEM estimation. + * + * This type of comparison indicates that the parameter is less than another parameter + * in the structural equation model. + */ LT("LT"), + /** + * An enum value representing the "LE" comparison type for a parameter in SEM estimation. + * + * This type of comparison indicates that the parameter is less than or equal to another parameter + * in the structural equation model. + */ LE("LE"); private final String name; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraint.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraint.java index 01802f374d..f1e5f4f7ff 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraint.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraint.java @@ -147,6 +147,12 @@ public SemIm getSemIm() { return this.semIm; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -158,6 +164,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraintType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraintType.java index 90cf90aad5..3772ef1e33 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraintType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamConstraintType.java @@ -26,10 +26,31 @@ import java.io.*; +/** + * Enum for representing different types of parameter constraints. + */ public enum ParamConstraintType { + /** + * Represents a parameter constraint type LT (less than). + */ LT("LT"), + /** + * Represents a parameter constraint type GT (greater than). + */ GT("GT"), + /** + * The EQ represents a parameter constraint type EQ (equal). + * + * This enum value is used to represent the equality constraint on a parameter. It indicates that the parameter value + * should be equal to a specific value. + */ EQ("EQ"), + /** + * Represents a parameter constraint type NONE. + * + * This enum value is used to represent the absence of a constraint on a parameter. It indicates that there is no specific + * constraint on the parameter value. + */ NONE("NONE"); private final String name; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamType.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamType.java index 2e01b4e8fe..83bffe409a 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamType.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParamType.java @@ -30,10 +30,33 @@ * @version $Id: $Id */ public enum ParamType { + /** + * Enum representing the free parameter type for structural equation modeling (SEM) models. + * COEF free parameters are edge coefficients in the linear SEM model. + */ COEF("Linear Coefficient"), + /** + * Variable Mean parameter type for SEM models. + */ MEAN("Variable Mean"), + /** + * Represents the error variance parameter in a structural equation modeling (SEM) model. + */ VAR("Error Variance"), + /** + * Represents a free parameter type for structural equation modeling (SEM) models. Specifically, the COVAR free parameter type is used to represent non-variance covariances among + * the error terms in the SEM model. + * + * This enum type is a part of the ParamType enum, which is used to categorize different types of free parameters for SEM models. + * + * The COVAR free parameter type is associated with the description "Error Covariance". + */ COVAR("Error Covariance"), + /** + * Represents a free parameter type for structural equation modeling (SEM) models. + * Specifically, the DIST free parameter type is used to represent distribution parameters in the SEM model. + * It is associated with the description "Distribution Parameter". + */ DIST("Distribution Parameter"); private final String name; diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Parameter.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Parameter.java index ef7f54bc27..2a7bdcf41b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Parameter.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/Parameter.java @@ -300,6 +300,12 @@ public void setInitializedRandomly(boolean initializedRandomly) { this.initializedRandomly = initializedRandomly; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -311,6 +317,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParameterPair.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParameterPair.java index a48d840100..19625540c5 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParameterPair.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/ParameterPair.java @@ -139,6 +139,12 @@ private void setPair(Parameter a, Parameter b) { this.b = b; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -150,6 +156,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimator.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimator.java index 4b6ddd7454..edc15b480b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimator.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimator.java @@ -441,6 +441,12 @@ private void setMeans(SemIm semIm, DataSet dataSet) { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -452,6 +458,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbs.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbs.java index 15839cb8ad..1087f7eed7 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbs.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbs.java @@ -532,6 +532,12 @@ public Matrix getDataSet() { return this.dataSet; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -543,6 +549,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbsParams.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbsParams.java index 01fbd0b929..d91f223d48 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbsParams.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEstimatorGibbsParams.java @@ -174,6 +174,12 @@ public void setFlatPrior(boolean flatPrior) { this.flatPrior = flatPrior; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -185,6 +191,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEvidence.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEvidence.java index 52701e9f13..0ab18f3c95 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEvidence.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemEvidence.java @@ -270,6 +270,12 @@ public int hashCode() { return hashCode; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -281,6 +287,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemIm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemIm.java index 155a20df50..41c924b7cb 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemIm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemIm.java @@ -2308,6 +2308,12 @@ private double[] standardErrors() { return this.standardErrors; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -2319,6 +2325,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemManipulation.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemManipulation.java index 5ab0be2925..3c1b214207 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemManipulation.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemManipulation.java @@ -203,6 +203,12 @@ public int hashCode() { return hashCode; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -214,6 +220,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemPm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemPm.java index 7699ad3380..a7e76cd2b8 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemPm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemPm.java @@ -667,6 +667,12 @@ private String newBName() { return "B" + (++this.bIndex); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -678,6 +684,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemProposition.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemProposition.java index b36707a959..2d47604076 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemProposition.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemProposition.java @@ -196,6 +196,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -207,6 +213,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemUpdater.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemUpdater.java index 92bda2f2a2..7dc3eb00f3 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemUpdater.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/SemUpdater.java @@ -247,6 +247,12 @@ private SemGraph createManipulatedGraph(Graph graph) { return updatedGraph; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -258,6 +264,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/StandardizedSemIm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/StandardizedSemIm.java index 367821656a..85435905c0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/StandardizedSemIm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/sem/StandardizedSemIm.java @@ -1045,6 +1045,12 @@ public String toString() { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -1056,6 +1062,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/graph/StoredLagGraphParams.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/graph/StoredLagGraphParams.java index cbe5ecb86a..231586af47 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/graph/StoredLagGraphParams.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/graph/StoredLagGraphParams.java @@ -86,6 +86,12 @@ public void setFilename(String filename) { this.filename = filename; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -97,6 +103,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/BooleanFunction.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/BooleanFunction.java index e912b3053c..8e76d3c7ae 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/BooleanFunction.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/BooleanFunction.java @@ -306,6 +306,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -317,6 +323,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/DishModel.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/DishModel.java index 94d5565e9a..065fa4d227 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/DishModel.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/DishModel.java @@ -156,6 +156,12 @@ public void setDishBumpStDev(double dishBumpStDev) { this.dishBumpStDev = dishBumpStDev; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -167,6 +173,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/GeneHistory.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/GeneHistory.java index 3297e898a3..30e793d9b6 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/GeneHistory.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/GeneHistory.java @@ -285,6 +285,12 @@ public void initialize() { this.step = -1; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -296,6 +302,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedConnectivity.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedConnectivity.java index d1db22bd89..2929628ff2 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedConnectivity.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedConnectivity.java @@ -238,6 +238,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -249,6 +255,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedLagGraph.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedLagGraph.java index e682ab3979..a02ee85ae6 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedLagGraph.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedLagGraph.java @@ -234,6 +234,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -245,6 +251,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedParent.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedParent.java index f3b14e53b1..e0765bb2e1 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedParent.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/IndexedParent.java @@ -125,6 +125,12 @@ public String toString() { return "IndexedParent, index = " + getIndex() + ", lag = " + getLag(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -136,6 +142,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/LaggedEdge.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/LaggedEdge.java index 3e9a48f25d..3bd1eb779e 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/LaggedEdge.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/LaggedEdge.java @@ -99,6 +99,12 @@ public LaggedFactor getLaggedFactor() { return this.laggedFactor; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -110,6 +116,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/Polynomial.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/Polynomial.java index 1e26b5503b..a2a3ca780b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/Polynomial.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/Polynomial.java @@ -155,6 +155,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -166,6 +172,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/PolynomialTerm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/PolynomialTerm.java index cd0c986265..0b6ae64bc4 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/PolynomialTerm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/history/PolynomialTerm.java @@ -180,6 +180,12 @@ public String toString() { return buf.toString(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -191,6 +197,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/simulation/MeasurementSimulator.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/simulation/MeasurementSimulator.java index 640678d5da..f76c6fa0e2 100755 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/simulation/MeasurementSimulator.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetrad/gene/simulation/MeasurementSimulator.java @@ -975,6 +975,12 @@ class results in an inconsistent parameter set. jdramsey 12/22/01 becomes an issue. jdramsey 12/22/01 */ + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -986,6 +992,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/GenePm.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/GenePm.java index 76bdd8507b..f636d84497 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/GenePm.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/GenePm.java @@ -67,6 +67,12 @@ public LagGraph getLagGraph() { return this.lagGraph; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -78,6 +84,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/MeasurementSimulatorParams.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/MeasurementSimulatorParams.java index e779a7384a..fbcf73a0d0 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/MeasurementSimulatorParams.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/study/gene/tetradapp/model/MeasurementSimulatorParams.java @@ -370,6 +370,12 @@ public double[][][] getRawData() { return getSimulator().getRawData(); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -381,6 +387,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Matrix.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Matrix.java index 492649a3e2..21ad683b99 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Matrix.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Matrix.java @@ -629,6 +629,12 @@ public String toString() { } } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -640,6 +646,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Parameters.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Parameters.java index 518899a579..04aeb5e236 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Parameters.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Parameters.java @@ -346,6 +346,12 @@ public void remove(String parameter) { parameters.remove(parameter); } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -357,6 +363,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Params.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Params.java index 906078b4dd..9d0942e379 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Params.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Params.java @@ -891,7 +891,7 @@ public final class Params { */ public static final String ALLOW_TUCKS = "allowTucks"; /** - * Constant ALLOW_TUCKS="allowTucks + * Constant ALLOW_TUCKS="allowTucks" */ public static final String EQUALITY_THRESHOLD = "equalityThreshold"; /** diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/PointXy.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/PointXy.java index a514ca2993..687d4f90d4 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/PointXy.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/PointXy.java @@ -127,6 +127,12 @@ public String toString() { return "Point<" + this.x + "," + this.y + ">"; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -138,6 +144,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Vector.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Vector.java index e5d7af0b94..2a75c360cc 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Vector.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Vector.java @@ -259,6 +259,12 @@ public double dot(Vector v2) { return sum; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -270,6 +276,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Version.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Version.java index 14116fe2f9..0c529f6756 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Version.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/Version.java @@ -301,6 +301,12 @@ public String toString() { //===========================PRIVATE METHODS=========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -312,6 +318,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/ChiSquare.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/ChiSquare.java index fb802f336d..d517141b5d 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/ChiSquare.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/ChiSquare.java @@ -143,6 +143,12 @@ public String toString() { return "ChiSquare(" + this.df + ")"; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -154,6 +160,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Normal.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Normal.java index 32c1ada925..7f284f5a01 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Normal.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Normal.java @@ -155,6 +155,12 @@ public String toString() { //========================PRIVATE METHODS===========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -166,6 +172,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Split.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Split.java index 2767efd4f4..3c1d3e36b1 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Split.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Split.java @@ -186,6 +186,12 @@ public int getNumParameters() { return 2; } + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -197,6 +203,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/TruncatedNormal.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/TruncatedNormal.java index 77dd4b4613..f51a79a5f6 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/TruncatedNormal.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/TruncatedNormal.java @@ -176,6 +176,12 @@ public String toString() { //========================PRIVATE METHODS===========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -187,6 +193,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Uniform.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Uniform.java index b2fec107df..e050632f75 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Uniform.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/util/dist/Uniform.java @@ -157,6 +157,12 @@ public String toString() { //========================PRIVATE METHODS===========================// + /** + * Writes the object to the specified ObjectOutputStream. + * + * @param out The ObjectOutputStream to write the object to. + * @throws IOException If an I/O error occurs. + */ @Serial private void writeObject(ObjectOutputStream out) throws IOException { try { @@ -168,6 +174,14 @@ private void writeObject(ObjectOutputStream out) throws IOException { } } + /** + * Reads the object from the specified ObjectInputStream. This method is used during deserialization + * to restore the state of the object. + * + * @param in The ObjectInputStream to read the object from. + * @throws IOException If an I/O error occurs. + * @throws ClassNotFoundException If the class of the serialized object cannot be found. + */ @Serial private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try {