Skip to content

Commit

Permalink
create lphy.core.model.component.argument and refactor vector args #294
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Jun 5, 2023
1 parent 0225e54 commit 3cd83dd
Show file tree
Hide file tree
Showing 149 changed files with 357 additions and 305 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lphy.base.bmodeltest;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.DeterministicFunction;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;

public class BModelSetFunction extends DeterministicFunction<BModelSet> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import lphy.base.evolution.substitutionmodel.RateMatrix;
import lphy.core.model.annotation.Citation;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import lphy.core.model.datatype.DoubleArray2DValue;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import lphy.base.evolution.sitemodel.SiteModel;
import lphy.core.model.annotation.Citation;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.DeterministicFunction;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import lphy.base.distribution.DiscretizedGamma;
import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import lphy.core.model.datatype.IntegerValue;
import lphy.core.vectorization.IID;
import org.apache.commons.math3.distribution.BinomialDistribution;
Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Beta.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.BetaDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution1D;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.BinomialDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Collections;
Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Cauchy.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.CauchyDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import lphy.base.math.MathUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.GammaDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Exp.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.ExponentialDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution1D;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.ExponentialDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.ExponentialDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Gamma.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.GammaDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import lphy.base.function.GeneralLinearFunction;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.NormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution1D;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.GeometricDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.GammaDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.LogNormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.LogNormalDistribution;

import java.util.Map;
Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/MVN.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.MultivariateNormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution1D;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Map;
Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Normal.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.NormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.GammaDistribution;
import org.apache.commons.math3.distribution.NormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.NormalDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.PoissonDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;

import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.*;
Expand Down
2 changes: 1 addition & 1 deletion lphy-base/src/main/java/lphy/base/distribution/Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import lphy.base.ParameterNames;
import lphy.base.math.RandomUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GenerativeDistribution;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.VariableUtils;
import lphy.core.model.component.argument.ParameterInfo;

import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.*;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lphy.base.distribution;

import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.ValueUtils;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.distribution.WeibullDistribution;
import org.apache.commons.math3.random.RandomGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import lphy.base.math.MathUtils;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
import lphy.core.model.component.GeneratorCategory;
import lphy.core.model.component.RandomVariable;
import lphy.core.model.component.Value;
import lphy.core.model.component.argument.ParameterInfo;
import org.apache.commons.math3.random.RandomGenerator;

import java.util.Map;
Expand Down
Loading

0 comments on commit 3cd83dd

Please sign in to comment.