input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public average vector average try average vector output average vector get vector 0 clone for int i 1 i size i average vector av get vector i for int j 0 j av size j output get averagable j build average av get averagable j return output catch clone not supported exception e throw new runtime exception clone of average vector is not supported e get message e
|
calculates the mean value of the averagables of the average vectors and
|
override public double calculate distance double x1 double x2 double result 0 int zeros x1 length for int i 0 i x1 length i double factor x1 i x2 i result math exp gamma factor factor if tools is not equal x1 i 0 0d tools is not equal x2 i 0 0d zeros result zeros return math pow result degree
|
calculates kernel value of vectors x and y
|
protected void evaluate population population throws operator exception current best null evaluate all population if current best null population set current best current best individual best ever population get best ever if best ever null current best get fitness get main criterion get fitness best ever get fitness get main criterion get fitness individual best ever clone individual current best clone best ever clone set fitness current best get fitness population set best ever best ever clone
|
evaluates the individuals of the given population
|
public group tree get sub group string key return children get key
|
returns or creates the subgroup with the given key
|
public jmenu get file menu return file menu
|
this returns the file menu to change menu entries
|
public group tree get sub group int index collection extends group tree all children get sub groups if index all children size return null else iterator extends group tree i all children iterator int counter 0 while i has next group tree current i next if counter index return current counter return null
|
returns the i th sub group
|
protected void fire update final a argument lists are copied in order to avoid concurrent modification occurs if updating an observer triggers insertion of another list observer a copy synchronized lock copy new linked list observer a observers regular fire update copy argument if observers edt is empty final list observer a copy edt synchronized lock copy edt new linked list observer a observers edt swing utilities invoke later new runnable override public void run fire update copy edt argument
|
updates all observers with the given argument
|
protected void add operator description operator description description operators add description
|
adds an operator to this group
|
protected void remove operator description operator description description operators remove description
|
this removes the given
|
public int next int in range int lower bound int upper bound if upper bound lower bound throw new illegal argument exception random generator next int in range the upper bound of the random number range should be greater than the lower bound return next int upper bound lower bound lower bound
|
returns the next pseudorandom uniformly distributed code int code
|
public void sort comparator operator description comparator collections sort operators comparator for group tree child children values child sort comparator
|
this method will sort this group tree according to the given comparator
|
private void add sub group group tree node child children put child get key child child set parent this
|
adds a subgroup to this group
|
private void load icons if icon name null icons null return icons new image icon 3 icons 0 swing tools create icon 16 icon name icons 1 swing tools create icon 24 icon name icons 2 swing tools create icon 48 icon name
|
loads the icons if defined
|
public jmenu bar get main menu bar return menu bar
|
this returns the complete menu bar to insert additional menus
|
public string get pre start name return pre start name
|
this is this a pre start parameter this will return the
|
public void set value string value if value null throw new null pointer exception else this value value
|
sets the value of this parameter
|
public boolean is defined return type null
|
this method returns whether this parameter is a defined type
|
public parameter scope get scope return scope
|
this returns the scope of this parameter if it is a defined parameter
|
public parameter type get type return type
|
returns the type of this parameter
|
public void set type parameter type type this type type string parts type get key split if rapidminer equals parts 0 this group parts 1 else this group system
|
this converts this parameter from an implicit parameter into a defined one
|
public void set scope parameter scope scope this scope scope
|
this sets the scope to the given one
|
public jmenu get edit menu return edit menu
|
this returns the edit menu to change menu entries
|
public void set connection properties properties connection properties properties new props new properties for object key connection properties key set new props put key connection properties get key this connection properties new props
|
sets the additional connection properties not the jdbc properties
|
public properties get connection properties properties new props new properties for object key connection properties key set new props put key connection properties get key return new props
|
gets the additional connection properties not the jdbc properties
|
public jmenu get help menu return help menu
|
this returns the help menu to change menu entries
|
public void disconnect throws sqlexception if connection null connection close unregister
|
closes the connection to the database
|
private string map attribute type to sqldata type int type data type syntax information type str get sqltype for rmvalue type type return type str get type name
|
maps attribute types as defined by
|
public string make insert statement table name table name example set example set throws sqlexception return make insert statement table name example set 1
|
creates an sql insert statement for filling attributes into a table
|
public void make column alter string builder b attribute role role throws sqlexception b append alter make column creator b role
|
this will create an alteration statement for the given role
|
private void make column creator string builder b attribute attribute b append make column identifier attribute b append b append map attribute type to sqldata type attribute get value type
|
makes an sql fragment that can be used for creating a table column
|
public prepared statement create prepared statement string sql string boolean scrollable and updatable throws sqlexception if connection null throw new sqlexception could not create a prepared statement for database url not connected if scrollable and updatable return connection prepare statement sql string result set type scroll sensitive result set concur updatable else return connection prepare statement sql string result set type forward only result set concur read only
|
create a prepared statement where result sets will have the properties
|
public void add resource bundle resource bundle bundle bundles add bundle
|
this method extends this resource bundle with the properties set by the given
|
public boolean is fulfilled list plugins iterator i plugins iterator while i has next plugin plugin plugin i next if plugin get extension id equals this extension id managed extension normalize version plugin get version compare to managed extension normalize version this version 0 return true return false
|
returns true if the list contains a plugin with the desired name and
|
public void add dependency plugin parent plugin parent plugins add parent plugin
|
this adds another parent plugin to the list of dependencies
|
private void get root doc try get root doc new file parameter service get rapid miner home src file separator com rapidminer operator catch exception e e print stack trace
|
use only classes beneath the operator package
|
private plugin class loader make initial classloader url url try url this file to uri to url catch malformed urlexception e throw new runtime exception cannot make classloader for plugin e e final plugin class loader cl new plugin class loader new url url return cl
|
this method will create an initial class loader that is only used to
|
public void build final class loader add urls of plugins this plugin depends on for dependency dependency this plugin dependencies final plugin other get plugin by extension id dependency get plugin extension id class loader add dependency other
|
this method will build the final class loader for this plugin
|
public void remove column attribute attribute string table name throws sqlexception statement st null try st connection create statement result set type forward only result set concur updatable string query alter table statement creator make identifier table name drop column statement creator make column identifier attribute st execute query catch sqlexception e throw e finally if st null st close
|
removes the column of the given attribute from the table with name
|
public void drop table table name table name throws sqlexception statement statement create statement true statement execute update statement creator make drop statement table name statement close
|
drops the table with the given name
|
public string get plugin init class name return plugin init class name
|
returns the class name of the plugin init class
|
public void empty table table name table name throws sqlexception statement statement create statement true statement execute update statement creator make delete statement table name statement close
|
deletes all entries of the table with the given name
|
public string get absolute location string builder b new string builder b append repository prefix b append repository name for string component path b append separator b append component return b to string
|
returns the absolute location of this repoository location
|
public repository get repository throws repository exception return repository manager get instance get accessor get repository repository name
|
returns the repository associated with this location
|
public string get path string builder b new string builder for string component path b append separator b append component return b to string
|
returns the path within the repository
|
public entry locate entry throws repository exception repository repos get repository if repos null entry entry repos locate get path return entry else return null
|
locates the corresponding entry in the repository
|
public string get name return path path length 1
|
returns the last path component
|
public folder create folders recursively throws repository exception entry entry locate entry if entry null folder folder parent create folders recursively folder child folder create folder get name return child else if entry instanceof folder return folder entry else throw new repository exception to string is not a folder
|
creates this folder and its parents
|
public string get plugin resource operators return plugin resource operators
|
returns the resource identifier of the xml file specifying the operators
|
public boolean has selection boolean allow folders if allow folders location field get text is empty return false else try get repository location return true catch malformed repository location exception e log service get root warning malformed repository location e log service get root log level warning i18 n get message log service get root get resource bundle com rapidminer repository gui repository location chooser malformed repository location e e return false
|
returns true iff the user entered a valid non empty repository location
|
public string get plugin resource objects return plugin resource objects
|
returns the resource identifier of the io object descriptions
|
public plugin class loader get class loader return this class loader
|
returns the class loader of this plugin
|
public class loader get original class loader try this archive new jar file this file final url url new url file null this file get absolute path return access controller do privileged new privileged exception action class loader override public class loader run throws exception return new urlclass loader new url url plugin class get class loader catch ioexception e return null catch privileged action exception e return null
|
returns the class loader of this plugin
|
private boolean check dependencies list plugins if rapid miner get long version compare to necessary rapid miner version 0 return false if plugin dependencies size 1 throw new unsupported operation exception only one dependent plugin allowed other plugins iterator i plugin dependencies iterator while i has next dependency dependency dependency i next if dependency is fulfilled plugins return false all ok return true
|
checks the rapid miner version and plugin dependencies
|
private void connect output port out input port in out connect to in operator in op in get ports get owner get operator if in op is enabled in op set enabled true operator out op out get ports get owner get operator if out op is enabled out op set enabled true
|
connects two operators and enables them
|
private string to resource identifier string value if value starts with value value substring 1 return value
|
removes leading slash if present
|
private boolean exists table table name table name throws sqlexception result set table names connection get meta data get tables table name get catalog table name get schema table name get table name null return table names next
|
checks whether a table with the given name exists
|
private boolean exists column in table string table name string column name throws sqlexception return connection get meta data get columns null null table name column name next
|
checks whether the given column exists in the given data base
|
public image icon get extension icon url icon url class loader find resource meta inf icon png if icon url null return new image icon icon url return null
|
this returns the icon of the extension or null if not present
|
protected void extract data entry response response this location response get location this owner response get user
|
extracts the relevant data for this entry from the servers response
|
public void add repository repository repository logger config adding repository repository get name repositories add repository if instance null we cannot call post install during init the reason is that post install may access repository manager get instance which will be null and hence trigger further recursive endless calls to init repository post install save fire update repository
|
registers a repository
|
public void remove repository repository repository repository pre remove repositories remove repository fire update null
|
removes a registered repository
|
public boolean check all files file current throws exception boolean success true final pattern skip pattern get skipped packages expression if skip pattern null skip pattern matcher current get absolute path matches system err println skipping current return true counter if current is directory if current get name ends with java success perform check current else file children current list files for int i 0 i children length i success check all files children i return success
|
recursively checks all files and returns true iff all checks are
|
public repository get repository string name throws repository exception for repository repos repositories if repos get name equals name return repos throw new repository exception requested repository name does not exist
|
gets a registered
|
public ioobject store ioobject ioobject repository location location operator calling operator throws repository exception return store ioobject location calling operator null
|
stores an ioobject at the given location
|
public void copy repository location source folder destination progress listener listener throws repository exception copy source destination null listener
|
copies an entry to a given destination folder
|
public void copy repository location source folder destination string new name progress listener listener throws repository exception if listener null listener set total 100000 listener set completed 0 try copy source destination new name listener 0 100000 finally if listener null listener complete
|
copies an entry to a given destination folder with the name new name
|
public string to html string return get alias br small style color gray get base url small
|
returns a short html description of this repository
|
public void move repository location source folder destination progress listener listener throws repository exception move source destination null listener
|
moves an entry to a given destination folder
|
public repository get sample repository return sample repository
|
returns the repository containing the rapid miner sample processes
|
public http urlconnection get resource httpconnection string location entry stream type type boolean pre auth header throws ioexception string split location split string builder encoded new string builder encoded append raws resources for string fraction split if fraction is empty only for non empty to prevent double encoded append encoded append urlencoder encode fraction utf 8 if type entry stream type metadata encoded append format binmeta return get httpconnection encoded to string pre auth header
|
returns a connection to a given location in the repository
|
public void run t argument boolean rethrow on completion throws operator exception this rethrow on completion rethrow on completion caught exception null completion count new atomic integer try run argument finally if thread pool null thread pool shutdown thread pool null concurrent operation helper wait for zero completion count lock operator get logger if this rethrow on completion concurrent operation helper rethrow caught exception
|
initializes a counter for pending tasks and a thread pool
|
public double get double int index throws jsonexception object o get index try return o instanceof number number o double value double value of string o double value catch exception e throw new jsonexception jsonarray index is not a number but o o get class
|
get the double value associated with an index
|
public boolean is substring match string s boolean result false iterator pattern it patterns iterator while it has next result pattern p it next if p matcher s find result true return result
|
returns true if the given string contains one of the patterns
|
public string get match string s iterator pattern it patterns iterator string name null while it has next name null pattern p it next matcher m p matcher s if m matches name pattern names get p return name
|
returns the name of the first matched pattern
|
public google archive parser parse parsed clear matcher matcher pattern compile single news regex pattern dotall matcher page while matcher find google news news parse news token matcher group if news null parsed add news system out println parsed parsed size news items return this
|
p parses the specified page
|
private google news parse news token string news token google news news new google news news set date parse date news token news set title parse title news token news set link parse link news token news set source parse source news token news set abstract text parse abstract text news token if news get date null news get title null news get link null news get source null news get abstract text null return null return news
|
p parses a single news token
|
private date parse date string news token matcher matcher pattern compile date regex pattern dotall matcher news token try if matcher find return date format parse matcher group 1 else system err println can not parse date returning null return null catch parse exception e system err println can not parse date returning null return null
|
p parses the date from the news token
|
private string parse title string news token matcher matcher pattern compile title regex pattern dotall matcher news token if matcher find return string escape utils unescape html matcher group 1 else system err println can not parse title returning null return null
|
p parses the title from the news token
|
private string parse link string news token matcher matcher pattern compile link regex pattern dotall matcher news token if matcher find return matcher group 1 else system err println can not parse link returning null return null
|
p parses the link from the news token
|
private string parse source string news token matcher matcher pattern compile source regex pattern dotall matcher news token if matcher find return matcher group 1 else system err println can not parse source returning null return null
|
p parses the source from the news token
|
private string parse abstract text string news token matcher matcher pattern compile abstract text regex pattern dotall matcher news token if matcher find return string escape utils unescape html matcher group 1 replace all else system err println can not parse abstract text returning null return null
|
p parses the abstract from the news token
|
public data row create data row double data new double 5 for int j 0 j data length j data j double na n data 0 get date get time data 1 link attribute get mapping map string get link data 2 source attribute get mapping map string get source data 3 title attribute get mapping map string get title data 4 abstract attribute get mapping map string get abstract text return new double array data row data
|
p creates and returns based on the properties
|
public void set abstract text string abstract text this abstract text abstract text
|
p setter for the abstract text of the news article
|
public string get abstract text return abstract text
|
p getter for the abstract text of the news article
|
public string to string string builder builder new string builder builder append title builder append get title builder append n builder append date builder append get date builder append n builder append source builder append get source builder append n builder append link builder append get link builder append n builder append abstract builder append get abstract text return builder to string
|
p string representation of one google news article
|
static public string double to string double d if double is infinite d double is na n d return null shave off trailing zeros and decimal point if possible string s double to string d final boolean contains no e s index of e 0 s index of e 0 if s index of 0 contains no e while s ends with 0 s s substring 0 s length 1 if s ends with s s substring 0 s length 1 if contains no e return number format format d else return s
|
produce a string from a double
|
public boolean check string s boolean result s contains literal if negation return result else return result
|
matches the string against the literal
|
public void add conjunction list string matching literal conj dnf based rules add conj
|
a a new conjuctive element to the dnf
|
public boolean check string s if the rule set is empty assume that it is fulfilled for all strings if dnf based rules size 0 return true boolean result false for iterator list string matching literal it dnf based rules iterator it has next result list string matching literal conj it next boolean conj result true for iterator string matching literal it2 conj iterator it2 has next conj result if it2 next check s conj result false result conj result return result
|
check the dnf against a given string
|
public double get current value return double this get client property key current
|
get the current value
|
public double get magnifying factor return magnifying factor
|
get the magnifying factor
|
public point2 d get point return point
|
get the mouse point
|
public void set magnifying factor double magnifying factor this magnifying factor magnifying factor
|
set the magnifying factor
|
public void set point point2 d point this point set location point
|
set the mouse point
|
protected void cleanup state object s state object
|
cleanup the state object
|
protected s create state object jxlayer extends v layer return null
|
create a state object specific for this layer ui and the jxlayer argument
|
public jsonarray put collection object value put new jsonarray value return this
|
put a value in the jsonarray where the value will be a
|
public double get scale double value get value type preferred scale return value
|
get the scale
|
public void add rendering hint rendering hints key key object value this rendering hints put key value
|
add one rendering hint to the currently active rendering hints
|
public double get rotation double value get value type rotation return value
|
get the rotation value in radians as set by
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.