我正在构建一个程序,它将在 6 组数字上运行 10000 次迭代。这些数字经过迭代并按以下方式计算和排序。
*_Set1_****_Set2_****_Set3_****_Set4_****_Set5****_Set6_*
*********************************************************
**DESC******DESC******DESC******DESC******DESC*****DESC**
*********************************************************
其中 Set(n) 是数字的集合, DESC 是数字的降序。
我试过做一个LIST
. 但我很不熟悉,LIST
我什至不确定这是我要找的东西。我会给你一个例子,说明我在做什么LIST
//Created a Output Class for Sim
public class MC_OUT
{
public double output;
public double OOIP;
public double OGIP;
public double EURO;
public double EURG;
public double rAREA;
public double calcEURO;
public double calcEURG;
public MC_OUT(double output, double OOIP, double OGIP, double EURO, double EURG, double rAREA, double calcEURO, double calcEURG) {
this.output = output;
this.OOIP = OOIP;
this.OGIP = OGIP;
this.EURO = EURO;
this.EURG = EURG;
this.rAREA = rAREA;
this.calcEURO = calcEURO;
this.calcEURG = calcEURG;
}
//Declared list before Monte Carlo Sim.
List<MC_OUT> mcout = new List<MC_OUT>();
//Ran Code to Perform Calculations
//Then Executed this at End
if (OOIP >= 0 && OGIP >= 0)
{
mcout.Add(new MC_OUT(NormSInv((i - .5) / iter), OOIP, OGIP, EURO, EURG, rAREA, EURO / (rAREA * rNET_H * rGCF) * 1000, EURG / (rAREA * rNET_H * rGCF) * 1000));
}
//Then I got confused and couldn't figure out how to sort and then access the needed
//information
所以我想在所有这些垃圾之后,我的主要问题是什么是存储这些信息的最有效方法,有人可以指导我找到合适的教程吗?!
谢谢!