本文整理汇总了C#中Cloner类的典型用法代码示例。如果您正苦于以下问题:C# Cloner类的具体用法?C# Cloner怎么用?C# Cloner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Cloner类属于命名空间,在下文中一共展示了Cloner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:ScatterPlotContent.cs
示例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;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:SymbolicDataAnalysisModel.cs
示例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;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:ConnectionInfo.cs
示例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;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:Solution.cs
示例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;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:26,代码来源:CMAParameters.cs
示例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;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:InversionMoveRelativeAttribute.cs
示例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();
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:OperatorGraph.cs
示例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;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:JobPermission.cs
示例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();
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:NcaModel.cs
示例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();
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:PathTSPTour.cs
示例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();
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:MultinomialLogitModel.cs
示例13: SolutionSimilarityCalculator
protected SolutionSimilarityCalculator(SolutionSimilarityCalculator original, Cloner cloner)
: base(original, cloner) {
SolutionVariableName = original.SolutionVariableName;
QualityVariableName = original.QualityVariableName;
ExecuteInParallel = original.ExecuteInParallel;
MaxDegreeOfParallelism = original.MaxDegreeOfParallelism;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:SolutionSimilarityCalculator.cs
示例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;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:Trail.cs
示例15: Algorithm
protected Algorithm(Algorithm original, Cloner cloner)
: base(original, cloner) {
PlatformId = original.PlatformId;
AlgorithmClassId = original.AlgorithmClassId;
DataTypeName = original.DataTypeName;
DataTypeTypeName = original.DataTypeTypeName;
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:Algorithm.cs
示例16: TwoPointFiveMove
private TwoPointFiveMove(TwoPointFiveMove original, Cloner cloner)
: base(original, cloner) {
this.Index1 = original.Index1;
this.Index2 = original.Index2;
this.IsInvert = original.IsInvert;
this.Permutation = cloner.Clone(original.Permutation);
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:TwoPointFiveMove.cs
示例17: Solution
private Solution(Solution original, Cloner cloner)
: base(original, cloner) {
Tree = cloner.Clone(original.Tree);
Path = (string)original.Path.Clone();
NrOfRounds = original.NrOfRounds;
Enemies = cloner.Clone(original.Enemies);
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:Solution.cs
示例18: NearestNeighbourModel
private NearestNeighbourModel(NearestNeighbourModel original, Cloner cloner)
: base(original, cloner) {
kdTree = new alglib.nearestneighbor.kdtree();
kdTree.approxf = original.kdTree.approxf;
kdTree.boxmax = (double[])original.kdTree.boxmax.Clone();
kdTree.boxmin = (double[])original.kdTree.boxmin.Clone();
kdTree.buf = (double[])original.kdTree.buf.Clone();
kdTree.curboxmax = (double[])original.kdTree.curboxmax.Clone();
kdTree.curboxmin = (double[])original.kdTree.curboxmin.Clone();
kdTree.curdist = original.kdTree.curdist;
kdTree.debugcounter = original.kdTree.debugcounter;
kdTree.idx = (int[])original.kdTree.idx.Clone();
kdTree.kcur = original.kdTree.kcur;
kdTree.kneeded = original.kdTree.kneeded;
kdTree.n = original.kdTree.n;
kdTree.nodes = (int[])original.kdTree.nodes.Clone();
kdTree.normtype = original.kdTree.normtype;
kdTree.nx = original.kdTree.nx;
kdTree.ny = original.kdTree.ny;
kdTree.r = (double[])original.kdTree.r.Clone();
kdTree.rneeded = original.kdTree.rneeded;
kdTree.selfmatch = original.kdTree.selfmatch;
kdTree.splits = (double[])original.kdTree.splits.Clone();
kdTree.tags = (int[])original.kdTree.tags.Clone();
kdTree.x = (double[])original.kdTree.x.Clone();
kdTree.xy = (double[,])original.kdTree.xy.Clone();
k = original.k;
targetVariable = original.targetVariable;
allowedInputVariables = (string[])original.allowedInputVariables.Clone();
if (original.classValues != null)
this.classValues = (double[])original.classValues.Clone();
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:33,代码来源:NearestNeighbourModel.cs
示例19: Arc
protected Arc(Arc original, Cloner cloner)
: base(original, cloner) {
Source = cloner.Clone(original.Source);
Target = cloner.Clone(original.Target);
label = original.Label;
weight = original.Weight;
}
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:Arc.cs
示例20: Job
protected Job(Job original, Cloner cloner)
: base(original, cloner) {
this.dueDate = original.DueDate;
this.index = original.Index;
this.tasks = cloner.Clone(original.Tasks);
RegisterEventHandlers();
}
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:Job.cs
注:本文中的Cloner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论