|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.constraints.external_constraint | +--sub_arctic.constraints.linear_ext_constraint
An external (heavyweight) constraint for computing a linear value (A*x + B for two fixed values A and B and one variable x). This class provides an example of how to do a stand-alone external constraint.
Field Summary | |
protected int |
_A
"A" coefficient in A*x+B equation. |
protected int |
_B
"B" coefficient in A*x+B equation. |
protected provider_part_ref |
_target
Provider part that gives the value we compute from |
Fields inherited from class sub_arctic.constraints.external_constraint |
_doing_ood,
_notify_list |
Constructor Summary | |
linear_ext_constraint(int a,
int b,
value_provider v_obj,
int v_part)
Constructor. |
Method Summary | |
int |
A()
"A" coefficient in A*x+B equation. |
int |
B()
"B" coefficient in A*x+B equation. |
void |
finalize()
Finalize by cutting off from any target |
java.lang.Object |
get_value(int part_number)
Compute our value as A*x+B where is x is an integer obtained from our target provider part. |
void |
set_A(int v)
Set the "A" coefficient in A*x+B equation. |
void |
set_B(int v)
Set the "B" coefficient in A*x+B equation. |
void |
set_target(provider_part_ref targ)
Set the provider part that gives the value we compute from |
provider_part_ref |
target()
Provider part that gives the value we compute from |
Methods inherited from class sub_arctic.constraints.external_constraint |
attach_dependent,
detach_dependent,
value_ood |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int _A
protected int _B
protected provider_part_ref _target
Constructor Detail |
public linear_ext_constraint(int a, int b, value_provider v_obj, int v_part)
int
- a the A value in A*x+B.int
- b the B value in A*x+B.value_provider
- v_obj the object we obtain the x value from in
A*x+B.int
- v_part the part number of the above object that we
obtain the x value from in A*x+B.Method Detail |
public int A()
public void set_A(int v)
public int B()
public void set_B(int v)
public provider_part_ref target()
public void set_target(provider_part_ref targ)
public void finalize()
public java.lang.Object get_value(int part_number)
int
- part_number the part number of the value being requested from
us. Since we have only one part we ignore this.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |