internal static extern bool DeviceIoControl ( SafeHandle hDevice, DFP dwIoControlCode, ref SENDCMDINPARAMS lpInBuffer, int nInBufferSize, out IDENTIFYCMDOUTPARAMS lpOutBuffer, int nOutBufferSize, out uint lpBytesReturned, IntPtr lpOverlapped);
public void FitDFP2() { double eps = 1e-5; double rEps = eps*10; double step = 3; double[] vector = {6,45,22}; double[] expVector = {0,0,0}; int itMax = 50; Parabola f = new Parabola(); int dim = f.Dimension; DFP alg = new DFP(dim, vector, f, step, eps, itMax); alg.FindMinimum(); Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps); }
public void FitDFP3() { double eps = 1e-5; double rEps = eps; int itMax = 200; double step=1; double[] vector = {6,-5}; double[] expVector = {1,1}; Banana f = new Banana(); int dim = f.Dimension; DFP alg = new DFP(dim,vector,f,step,eps,itMax); alg.FindMinimum(); Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps); }
public void FitDFP1() { double eps = 1e-5; double rEps = eps*10; double step = 1; int itMax=50; double[] vector = {0,0,0}; double[] expVector = {1,-2,3}; TestFunction f = new TestFunction(); int dim = f.Dimension; DFP alg = new DFP(dim, vector, f, step, eps, itMax); alg.FindMinimum(); Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; report += "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (ATP != 0) { report += "ATP: " + ATP.ToString() + "\n"; } if (DFP != 0) { report += "DFP: " + DFP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (ATA != 0) { report += "ATA: " + ATA.ToString() + "\n"; } if (EVP != 0) { report += "EVP: " + EVP.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; if (RequirementLevel != 0) { report += "Requirement: Level " + RequirementLevel + " \n"; } if (Type == ItemType.Frame) { report += "Slots: " + Slots.ToString() + "\n"; } report += "Base DFP: " + DFP.ToString() + "\n"; report += "Base EVP: " + EVP.ToString() + "\n"; report += "DFP Roll: " + VariableDFP.ToString() + "/" + (MaxDFP - DFP).ToString() + "\n"; report += "EVP Roll: " + VariableEVP.ToString() + "/" + (MaxEVP - EVP).ToString() + "\n"; report += "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (ATP != 0) { report += "ATP: " + ATP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (ATA != 0) { report += "ATA: " + ATA.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; report += "Weapon Type: " + Enum.GetName(typeof(WeaponType), WeaponType) + "\n"; if (RequirementATP != 0) { report += "Requirement: " + RequirementATP + " ATP\n"; } else if (RequirementATA != 0) { report += "Requirement: " + RequirementATA + " ATA\n"; } else if (RequirementMST != 0) { report += "Requirement: " + RequirementMST + " MST\n"; } report += "Grind: " + Grind.ToString() + "/" + MaxGrind.ToString() + "\n"; report += "Special: " + Enum.GetName(typeof(SpecialType), Special) + "\n"; report += "ATP: " + MinATP.ToString() + "-" + MaxATP.ToString() + "\n"; report += "ATA: " + ATA.ToString() + "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (DFP != 0) { report += "DFP: " + DFP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (EVP != 0) { report += "EVP: " + EVP.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "Native: " + NativePercentage.ToString() + "%\n"; report += "A. Beast: " + ABeastPercentage.ToString() + "%\n"; report += "Machine: " + MachinePercentage.ToString() + "%\n"; report += "Dark: " + DarkPercentage.ToString() + "%\n"; report += "Hit: " + HitPercentage.ToString() + "%\n"; report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }