Sage Modeling and Simulation Library

Highpoint.Sage.Mathematics.Scaling Namespace

Scaling is an operation that transforms an object or set of objects, typically a Material Transfer Request. This transformation may occur in one or many dimensions, and some dimensions may not be transformed equally. The entity doing the scaling would like not to have to remember the original scale, but would like to be able to rescale to the original size by setting scale to unity. Scaling is seen as a monolithic event - that is, the scaling operation applies to the entire entity at once, and the entity now exists at the new scale, without having to remember its own "unity" scale.

The scaling architecture allows the developer to decorate objects with other object that apply scale to them.

Any object that implements IScalable may be scaled by attaching a scaling engine. The scaling engine must then be connected to the scalable object through a scaling adapter.

When a scaling operation is desired on an object, call that object's scaling engine, and set a new scale.

Classes


  Class Description
Public class DoubleLinearScalingAdapter
A class that manages linear scaling of a double. If linearity is 2.0, for example, a rescaling of 2.0 quadruples the underlying value, and a rescaling of 0.5 quarters the underlying value.
Public class ScalingEngine
An engine that is capable of performing groupwise rescaling of a set of IScalables.
Public class TimeSpanLinearScalingAdapter
A class that manages linear scaling of a TimeSpan. If linearity is 2.0, for example, a rescaling of 2.0 quadruples the underlying value, and a rescaling of 0.5 quarters the underlying value. Slope of the scaling line.

Interfaces


  Interface Description
Public interface IDoubleScalingAdapter
Implemented by an object that has a double value that can be scaled.
Public interface IScalable
This interface is implemented by any object that can be scaled.
Public interface IScalingEngine
An object that is able to apply scaling to another object. It can also subsequently remove that scaling from the same object.
Public interface ITimeSpanScalingAdapter
Implemented by an object that has a TimeSpan value that can be scaled.