本文整理汇总了C#中Cloner类的典型用法代码示例。如果您正苦于以下问题:C# Cloner类的具体用法?C# Cloner怎么用?C# Cloner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Cloner类属于命名空间,在下文中一共展示了Cloner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScatterPlotContent
protected ScatterPlotContent(ScatterPlotContent original, Cloner cloner)
: this() {
this.qualities = original.qualities.Select(s => s.ToArray()).ToArray();
this.solutions = original.solutions.Select(s => s.ToArray()).ToArray();
this.paretoFront = original.paretoFront.Select(s => s.ToArray()).ToArray();
this.objectives = original.objectives;
}
示例2: SymbolicDataAnalysisModel
protected SymbolicDataAnalysisModel(SymbolicDataAnalysisModel original, Cloner cloner)
: base(original, cloner) {
this.symbolicExpressionTree = cloner.Clone(original.symbolicExpressionTree);
this.interpreter = cloner.Clone(original.interpreter);
this.lowerEstimationLimit = original.lowerEstimationLimit;
this.upperEstimationLimit = original.upperEstimationLimit;
}
示例3: ConnectionInfo
protected ConnectionInfo(ConnectionInfo original, Cloner cloner)
: base(original, cloner) {
from = cloner.Clone(original.from);
connectorFrom = original.ConnectorFrom;
to = cloner.Clone(original.To);
connectorTo = original.ConnectorTo;
}
示例4: Solution
private Solution(Solution original, Cloner cloner)
: base(original, cloner) {
this.Length = original.Length;
this.Width = original.Width;
this.Tree = cloner.Clone(original.Tree);
this.Quality = original.Quality;
}
示例5: CalculateImpactAndReplacementValues
public override void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node,
IDataAnalysisProblemData problemData, IEnumerable<int> rows, out double impactValue, out double replacementValue, out double newQualityForImpactsCalculation,
double qualityForImpactsCalculation = Double.NaN) {
var classificationModel = (ISymbolicClassificationModel)model;
var classificationProblemData = (IClassificationProblemData)problemData;
if (double.IsNaN(qualityForImpactsCalculation))
qualityForImpactsCalculation = CalculateQualityForImpacts(classificationModel, classificationProblemData, rows);
replacementValue = CalculateReplacementValue(classificationModel, node, classificationProblemData, rows);
var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue };
var cloner = new Cloner();
var tempModel = cloner.Clone(classificationModel);
var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node);
var tempModelParentNode = tempModelNode.Parent;
int i = tempModelParentNode.IndexOfSubtree(tempModelNode);
tempModelParentNode.RemoveSubtree(i);
tempModelParentNode.InsertSubtree(i, constantNode);
OnlineCalculatorError errorState;
var dataset = classificationProblemData.Dataset;
var targetClassValues = dataset.GetDoubleValues(classificationProblemData.TargetVariable, rows);
var estimatedClassValues = tempModel.GetEstimatedClassValues(dataset, rows);
newQualityForImpactsCalculation = OnlineAccuracyCalculator.Calculate(targetClassValues, estimatedClassValues, out errorState);
if (errorState != OnlineCalculatorError.None) newQualityForImpactsCalculation = 0.0;
impactValue = qualityForImpactsCalculation - newQualityForImpactsCalculation;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:30,代码来源:SymbolicClassificationSolutionImpactValuesCalculator.cs
示例6: CMAParameters
private CMAParameters(CMAParameters original, Cloner cloner)
: base(original, cloner) {
this.AxisRatio = original.AxisRatio;
if (original.B != null) this.B = (double[,])original.B.Clone();
if (original.BDz != null) this.BDz = (double[])original.BDz.Clone();
if (original.C != null) this.C = (double[,])original.C.Clone();
this.CCov = original.CCov;
this.CCovSep = original.CCovSep;
this.CC = original.CC;
this.ChiN = original.ChiN;
this.CS = original.CS;
if (original.D != null) this.D = (double[])original.D.Clone();
this.Damps = original.Damps;
this.InitialIterations = original.InitialIterations;
this.Mu = original.Mu;
this.MuCov = original.MuCov;
this.MuEff = original.MuEff;
if (original.PC != null) this.PC = (double[])original.PC.Clone();
if (original.PS != null) this.PS = (double[])original.PS.Clone();
this.Sigma = original.Sigma;
if (original.SigmaBounds != null) this.SigmaBounds = (double[,])original.SigmaBounds.Clone();
if (original.Weights != null) this.Weights = (double[])original.Weights.Clone();
if (original.QualityHistory != null) this.QualityHistory = new Queue<double>(original.QualityHistory);
this.QualityHistorySize = original.QualityHistorySize;
}
示例7: InversionMoveRelativeAttribute
protected InversionMoveRelativeAttribute(InversionMoveRelativeAttribute original, Cloner cloner)
: base(original, cloner) {
this.Edge1Source = original.Edge1Source;
this.Edge1Target = original.Edge1Target;
this.Edge2Source = original.Edge2Source;
this.Edge2Target = original.Edge2Target;
}
示例8: OperatorGraph
protected OperatorGraph(OperatorGraph original, Cloner cloner)
: base(original, cloner) {
operators = cloner.Clone(original.operators);
initialOperator = cloner.Clone(original.initialOperator);
visualizationInfo = cloner.Clone(original.visualizationInfo);
Initialize();
}
示例9: JobPermission
protected JobPermission(JobPermission original, Cloner cloner)
: base(original, cloner) {
this.GrantedByUserId = original.GrantedByUserId;
this.GrantedUserId = original.GrantedUserId;
this.JobId = original.JobId;
this.Permission = original.Permission;
}
示例10: NcaModel
protected NcaModel(NcaModel original, Cloner cloner)
: base(original, cloner) {
this.transformationMatrix = (double[,])original.transformationMatrix.Clone();
this.allowedInputVariables = (string[])original.allowedInputVariables.Clone();
this.nnModel = cloner.Clone(original.nnModel);
this.classValues = (double[])original.classValues.Clone();
}
示例11: PathTSPTour
private PathTSPTour(PathTSPTour original, Cloner cloner)
: base(original, cloner) {
this.coordinates = cloner.Clone(original.coordinates);
this.permutation = cloner.Clone(original.permutation);
this.quality = cloner.Clone(original.quality);
Initialize();
}
示例12: MultinomialLogitModel
private MultinomialLogitModel(MultinomialLogitModel original, Cloner cloner)
: base(original, cloner) {
logitModel = new alglib.logitmodel();
logitModel.innerobj.w = (double[])original.logitModel.innerobj.w.Clone();
allowedInputVariables = (string[])original.allowedInputVariables.Clone();
classValues = (double[])original.classValues.Clone();
}
示例13: SolutionSimilarityCalculator
protected SolutionSimilarityCalculator(SolutionSimilarityCalculator original, Cloner cloner)
: base(original, cloner) {
SolutionVariableName = original.SolutionVariableName;
QualityVariableName = original.QualityVariableName;
ExecuteInParallel = original.ExecuteInParallel;
MaxDegreeOfParallelism = original.MaxDegreeOfParallelism;
}
示例14: Solution
private Solution(Solution original, Cloner cloner)
: base(original, cloner) {
SymbolicExpressionTree = cloner.Clone(original.SymbolicExpressionTree);
World = cloner.Clone(original.World);
MaxTimeSteps = original.MaxTimeSteps;
Quality = original.Quality;
}
示例15: Algorithm
protected Algorithm(Algorithm original, Cloner cloner)
: base(original, cloner) {
PlatformId = original.PlatformId;
AlgorithmClassId = original.AlgorithmClassId;
DataTypeName = original.DataTypeName;
DataTypeTypeName = original.DataTypeTypeName;
}