/// <summary> /// Load the BatchSampler from a binary reader. /// </summary> /// <param name="br">The binary reader to use.</param> /// <param name="bNewInstance">When <i>true</i>, a the BatchSampler is read into a new instance, otherwise it is read into the current instance.</param> /// <returns>The BatchSampler instance is returned.</returns> public object Load(BinaryReader br, bool bNewInstance) { BatchSampler b = this; if (bNewInstance) { b = new BatchSampler(); } m_bUseOriginalImage = br.ReadBoolean(); m_nMaxSample = br.ReadUInt32(); m_nMaxTrials = br.ReadUInt32(); m_sampler = Sampler.Load(br); m_constraint = SamplerConstraint.Load(br); return(b); }
/// <summary> /// Load the SampleConstraint from a binary reader. /// </summary> /// <param name="br">The binary reader to use.</param> /// <returns>A new SampleConstraint instance is returned.</returns> public static SamplerConstraint Load(BinaryReader br) { SamplerConstraint b = new SamplerConstraint(); return((SamplerConstraint)b.Load(br, true)); }