input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public jbutton create button string key string text uimanager get string option pane key button text locale get default jbutton button new jbutton text string num uimanager get string option pane key button mnemonic locale get default if num null int n integer parse int num if n 0 button set mnemonic n return button
|
creates buttons containing labels translated to default locale using
|
public void compile and initialize ssbn throws exception try super compile and initialize ssbn catch exception e debug println this get class failed to compile and initialize the generated ssmsbn e
|
try compile and inicialize ssmsbn
|
public relations window array list node variables super new frame un bbayes learning module true container container get content pane this variables variables container add get relation box list insert relation controller new relation interation controller this variables pack set resizable false set visible true
|
method for screen construction which defines fixed parent children relationships
|
private void reset non selected values int new row int col for int row 0 row data length row if get value at row col equals boolean true row new row set value at boolean false row col fire table cell updated row col
|
this will give the behavior of a button group
|
public graph load file input throws load exception ioexception return null
|
this is a stub method
|
public float get score from qvalues float asset q return float math log asset q math log get current log base get current currency constant
|
translates asset q values to scores using logarithm functions
|
public float get qvalues from score float score score b log asset q score b log asset q power base of log score b power base of log log asset q power base of log score b asset q return float math pow get current log base score get current currency constant
|
translates scores to asset q values using logarithm functions
|
public int compare integer o1 integer o2 return o2 compare to o1 just do inverse comparison
|
comparator for sorting the clique size in inverse i
|
public void set to create user asset net boolean is to create user asset net this is to create user asset net is to create user asset net
|
if true the map parameter of
|
public boolean is structure change action return false
|
this action reboots the network but does not change the structure by itself
|
public boolean is to create user asset net return is to create user asset net
|
if true the map parameter of
|
public void save file output graph net throws ioexception throw new ioexception save operation not supported by this version
|
not implemented yet
|
public boolean is id return false
|
this method will always return false because asset network will never contain
|
public int get type return this utility node type
|
although this class extends decision node for convenience
|
public boolean is structure change action return true
|
adding a new node is a structure change
|
protected void update marginals graph graph for node node graph get nodes check if the node represents a numeric attribute if node get states size 0 the node represents a numeric attribute which has no potential table just skip it continue this update marginal node
|
this method customizes
|
public boolean is to calculate prob of non mpe return is to calculate prob of non mpe
|
if this is true then
|
public void set to calculate prob of non mpe boolean is to calculate prob of non mpe this is to calculate prob of non mpe is to calculate prob of non mpe
|
if this is true then
|
public ijunction tree builder get default junction tree builder return default junction tree builder
|
this builder will be passed to
|
public comparator get table explanation comparator return table explanation comparator
|
this comparator is used by
|
public void set table explanation comparator comparator table explanation comparator this table explanation comparator table explanation comparator
|
this comparator is used by
|
public boolean is to normalize return is to normalize
|
if set to true
|
public void set to normalize boolean is to normalize this is to normalize is to normalize
|
if set to true
|
protected void colete evidencia clique clique throws exception if is to normalize super colete evidencia clique return else this is the same of super colete evidencia clique but without normalizing clique pot for clique aux clique clique get children if aux clique get children is empty this colete evidencia aux clique absorb clique aux clique
|
this is the same of the superclasss method
|
public float operate float arg1 float arg2 if arg2 0 0f return arg1 else if arg1 0 0f return arg2 else return arg1 arg2 arg1 arg2
|
return the minimum but ignores values less than or equals to 0
|
public void initialize assets throws illegal argument exception invalid parent exception this get asset propagation delegator set related probabilistic network probabilistic network this get network this get asset propagation delegator set network this get asset propagation delegator create asset net from probabilistic net this get asset propagation delegator get related probabilistic network
|
this method creates a copy of
|
public void reset for iinference algorithm listener listener this get inference algorithm listeners listener on before reset this for clique clique this get asset network get junction tree get cliques this init asset potential clique get probability function for separator sep this get asset network get junction tree get separators this init asset potential sep get probability function for iinference algorithm listener listener this get inference algorithm listeners listener on after reset this
|
this method just restores all cells of the q tables to be
|
public void set network graph g throws illegal argument exception this get probability propagation delegator set network g it should update the this get asset propagation delegator only on propagate try this get asset propagation delegator set related probabilistic network probabilistic network g catch invalid parent exception e throw new illegal argument exception e
|
this will set the probabilistic network the one used in
|
public graph get network return this get probability propagation delegator get network
|
this will return the probabilitstic network obtainable
|
public void set property map map string object property map this property map property map
|
this map is used by
|
protected void init components this set layout new flow layout super init components this set main label new jlabel insert initial asset quantity for each node this add this get main label try this set asset quantity text field new jtext field string value of asset aware inference algorithm this get inference algorithm get default initial asset quantity catch exception e debug println get class e get message e this set asset quantity text field new jtext field 1000 this add this get asset quantity text field
|
this method initializes all jcomponents
|
public iinference algorithm get probability propagation delegator return probability propagation delegator
|
requests to this class not related to assets will be delegated
|
protected void init asset potential potential table asset clique potential for int i 0 i asset clique potential table size i asset clique potential set value i this get default initial asset quantity asset clique potential copy data
|
initializes the assets potential of a asset clique potential
|
protected int find j array list cc int id int mult int j 0 int im 0 for int i 0 i cc size i j data base id integer cc get i int value mult im im return j
|
finds the j value related to the case and a list of separators
|
protected void set original clique to asset clique map network asset net map irandom variable irandom variable original clique to asset clique map if asset net null asset net add property originalclique to assetclique map property original clique to asset clique map
|
it stores original clique to asset clique map into the property
|
public boolean is to turn to ssbnmode return is to turn to ssbnmode
|
if this is false
|
public float get default initial asset quantity try return this get asset propagation delegator get default initial asset quantity catch exception e debug println get class e get message e return 1000 0f
|
this will delegate to
|
public void set default initial asset quantity float initial asset quantity try this get asset propagation delegator set default initial asset quantity initial asset quantity catch exception e debug println get class e get message e
|
this will delegate to
|
public void set to turn to ssbnmode boolean is to turn to ssbnmode this is to turn to ssbnmode is to turn to ssbnmode
|
if this is false
|
protected void propagate findings probabilistic network net if net null this get bninference algorithm set network net the code below is almost equivalent to net update evidences this get bninference algorithm propagate
|
this method is called at the end of
|
public boolean is to propagate for global consistency return is to propagate for global consistency
|
if set to true min propagation junction tree algorithm will be called
|
protected void compile bn probabilistic network net if net null this get bninference algorithm set network net the code below is almost equivalent to net compile this get bninference algorithm run the code below is almost equivalent to net initialize this get bninference algorithm reset
|
compile the generated bn
|
public float calculate explanation list map inode integer input outpu argument for explanation if this get asset propagation delegator null return float na n if input outpu argument for explanation null input outpu argument for explanation new array list map inode integer return this get asset propagation delegator calculate explanation input outpu argument for explanation
|
this method only delegates to
|
protected void update cpt todo auto generated method stub
|
this is called when a state information of
|
public void undo min propagation reset all clique potentials for clique clique this get asset network get junction tree get cliques clique get probability function restore data reset all separator potential for separator sep this get asset network get junction tree get separators sep get probability function restore data reset any findings of asset nodes for node node get asset network get nodes if node instanceof asset node asset node node reset evidence
|
this method assumes that
|
public comparator get cell values comparator return cell values comparator
|
this comparator is used by
|
public void set cell values comparator comparator cell values comparator this cell values comparator cell values comparator
|
this comparator is used by
|
public void set to log assets boolean is to log assets this is to log assets is to log assets
|
if this is false
|
public void set network actions map map long list network action network actions map this network actions map network actions map
|
this map stores the transaction keys and all actions
|
public boolean is to log assets return is to log assets
|
if this is false
|
protected class panel super this icon controller icon controller get instance this attribute descriptors copy new array list iattribute descriptor
|
at least one constructor is visible for subclasses
|
public void delegate to graph renderer graph graph debug println this get class opening compiled network graph if graph instanceof probabilistic network network window bn window new network window probabilistic network graph this get unbbayes frame add window bn window bn window set visible true
|
delegate the graph to the correct window that can render the graph
|
protected void set transaction counter long transaction counter this transaction counter transaction counter
|
this is used in
|
public void set parent nodes list inode arg0 this parent nodes arg0
|
this is a buffer of parent nodes
|
public long get transaction counter return transaction counter
|
this is used in
|
public void reset components this remove all this init components this init listeners
|
remove all components and calls
|
public iprobabilistic network builder get network builder return network builder
|
builders to help constructing correct instances of
|
public void reset class tree this initialize class tree
|
resets the content of the class tree
|
public void set probability error margin float probability error margin this probability error margin probability error margin
|
this is the error margin used when comparing two probability values
|
protected base io reload plugin io instantiate the new io plugin aware file extension iodelegator io delegator plugin aware file extension iodelegator new instance false customize the attributes io delegator set core plugin id this get prm module plugin id io delegator set extension point id this get prm ioextension point id reload plugins io delegator reload plugins if no plugin was loaded add a default io if io delegator get delegators is empty io delegator get delegators add default sqlprmio get instance return io delegator
|
this method uses
|
public icon controller get icon controller return this icon controller
|
the icon controller to obtain default icons
|
public float get probability error margin return probability error margin
|
this is the error margin used when comparing two probability values
|
public void update prm classes
|
forces update of the
|
protected void handle create table stream tokenizer st iprm prm throws ioexception while st next token st tt eof if st ttype break if st ttype st tt word table equals ignore case st sval if st next token st tt eof if st ttype st tt word st ttype iprmclass prm class prmclass new instance prm st sval prm add prmclass prm class if st next token st tt eof if st ttype this handle columns st prm class
|
handles the create table statement
|
protected void set user to asset net map map long asset network user to asset net map this user to asset net map user to asset net map
|
mapping from user id to
|
protected asset network get asset net from user id long user id throws invalid parent exception asset network asset net null synchronized get user to asset net map asset net get user to asset net map get user id if asset net null first time user is referenced generate new asset net synchronized get probabilistic network lock access to network asset net get inference algorithm create asset net from probabilistic net get probabilistic network asset net set name long to string user id get user to asset net map put user id asset net return asset net
|
obtains the asset network structure representing the user and
|
protected stream tokenizer set up stream tokenizer file file stream tokenizer st null try st new stream tokenizer new buffered reader new file reader file catch file not found exception e throw new illegal argument exception e st word chars a z st word chars st word chars st whitespace chars st whitespace chars t t st quote char st quote char st eol is significant false st slash star comments true st ordinary char st ordinary char return st
|
sets up the stream tokenizer used by
|
public boolean has node node node return this objects map contains value node
|
checks if node is within afinmetaphor tree
|
public float get default initial qtable value return default initial qtable value
|
assets are managed by a data structure known as the asset tables
|
public boolean equals java lang object other key if other key instanceof unbbs persistence model model key unbbs persistence model model key o unbbs persistence model model key other key return this id o id return false
|
returns true if both keys are equal
|
public int hash code return new java lang integer id hash code
|
returns the hash code for the key
|
public void set id int new id id new id
|
set accessor for persistent attribute id
|
public boolean equals java lang object other key if other key instanceof unbbs persistence model domain key unbbs persistence model domain key o unbbs persistence model domain key other key return this id o id return false
|
returns true if both keys are equal
|
public void set default initial qtable value float default value this default initial qtable value default value
|
assets are managed by a data structure known as the asset tables
|
public domain value get domain return domain
|
returns the domain
|
public void set domain domain value domain this domain domain
|
sets the domain
|
public float get current log base return current log base
|
assets s values and q values values actually stored in
|
public void set current log base float base this current log base base
|
assets s values and q values values actually stored in
|
public double get current currency constant return current currency constant
|
assets s values and q values values actually stored in
|
public void set current currency constant float b this current currency constant b
|
assets s values and q values values actually stored in
|
public jdialog build dialog this set upper dialog new jdialog this get upper dialog get content pane add this this get upper dialog set preferred size new dimension 600 400 this get upper dialog pack this get upper dialog set title iattribute descriptor get attribute list get selected value get name this get upper dialog set always on top true return this get upper dialog
|
obtains a jdialog containing this panel
|
public jdialog build dialog this set upper dialog new jdialog this get upper dialog get content pane add this this get upper dialog set preferred size new dimension 600 400 this get upper dialog pack this get upper dialog set title fk of get prm class get name this get upper dialog set always on top true return this get upper dialog
|
obtains a jdialog containing this panel
|
public jdialog build dialog this upper dialog new jdialog frame null true this upper dialog get content pane add this this upper dialog set preferred size new dimension 500 500 this upper dialog pack this upper dialog set title this fk get name return this upper dialog
|
obtains a jdialog containing this panel
|
public jdialog build dialog this upper dialog new jdialog frame null true this upper dialog get content pane add this this upper dialog set preferred size new dimension 500 500 this upper dialog pack this upper dialog set title dependency of get current chain get dependency to get attribute descriptor get name return this upper dialog
|
creates a jdialog containing this panel
|
public idependency chain get current chain return current chain
|
chain currently being created
|
public void set current chain idependency chain current chain this current chain current chain
|
chain currently being created
|
public void login irequest cycle cycle cycle activate login
|
navigate to the login form
|
public void logout irequest cycle cycle todo logout
|
log the user out
|
public void page begin render page event event
|
setting a few values needed to render the border
|
public void set app context application context ac this app context ac
|
set the springframework application context
|
public string get screen name ipage page get page string screen name page get specification get property screen name if screen name null return screen name get page get page name return screen name
|
view helper function to display the applications screen name
|
private authentication get authentification http session session get page get request cycle get request context get session if session null secure context sc secure context session get attribute http session context integration filter acegi security context key if sc null authentication auth sc get authentication return auth return null
|
return the authentification object that is stored by acegi security
|
public string get user name authentication auth get authentification if auth null return string auth get credentials return anonymous
|
get the username user credentials that is automatically stored by
|
public boolean get is logged in authentication auth get authentification if auth null if auth instanceof anonymous authentication token return false return true return false
|
return true if user has succesfully logged in
|
public boolean get is anonymous authentication auth get authentification if auth null if auth instanceof anonymous authentication token return false return true
|
return true if the current user is anonymous
|
public boolean user has role string role name authentication auth get authentification if auth null if auth instanceof username password authentication token granted authority authorities auth get authorities for int i 0 i authorities length i if authorities i get authority equals ignore case role role name return true return false
|
return true if the given user is in a given role
|
public boolean user has any role string roles as string string roles roles as string split authentication auth get authentification if auth null if auth instanceof username password authentication token granted authority authorities auth get authorities for int i 0 i authorities length i for int k 0 k roles length k if authorities i get authority equals ignore case role roles k return true return false
|
return true if the current user has one or more of the
|
public int size return cache key set size
|
return the size of the signature cache i
|
public void test key manager factory type instantiation try new key manager factory catch exception e fail utility type ought still be instantiatable
|
rudimentary test of instantiation of underlying type
|
public void test key store key manager instantiation key manager key mgr key manager factory get instance supported key manager jks assert equals instantiated type is not correct keystore key manager classname key mgr get class get name
|
test the instantiation of the jks key manager
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.