Added length operator to samplers.