'Mei Version 0.60 (12 February 1994)on 15 March 1994 at 3:26:42 pm'!MeiSampleSpace subclass: #MeiSampleSpaceWithReplacement	instanceVariableNames: ''	classVariableNames: ''	poolDictionaries: ''	category: 'Mei-Distributions-SampleSpace'!MeiSampleSpaceWithReplacement comment:'Copyright (c) 1991-1994Atsushi Aoki (SRA Boulder),Katsuhiro Watanabe (SRA Tokyo),Taiji Matsuoka (SRA Tokyo),Yoshiyuki Nishinaka (SRA Tokyo) andMakoto Minagawa (FXIS Tokyo).Software Research Associates, Inc.1113 Spruce Street, Suite 502Boulder, Colorado 80302 the U.S.A.TEL: +1-303-440-3582FAX: +1-303-440-3930'!!MeiSampleSpaceWithReplacement methodsFor: 'accessing'!next: anInteger 	| collection |	collection := OrderedCollection new: anInteger.	anInteger timesRepeat: [collection addLast: self next].	^collection!size	^data size! !!MeiSampleSpaceWithReplacement methodsFor: 'testing'!isEmpty	^self size = 0! !"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!MeiSampleSpaceWithReplacement class	instanceVariableNames: ''!!MeiSampleSpaceWithReplacement class methodsFor: 'examples'!example1	"MeiSampleSpaceWithReplacement example1."	| data space bag set value point |	MeiTestView openDisplayBlock: [:view :gstate | ]		actionBlock: 			[:view :gstate | 			gstate clear.			data := 0 to: 99.			space := MeiSampleSpaceWithReplacement data: data.			bag := Bag new.			set := Set new.			100				timesRepeat: 					[value := space next rounded.					bag add: value.					set add: value.					set						do: 							[:each | 							point := each @ (bag occurrencesOf: each).							gstate displayLineFrom: point to: point]]]! !