input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private double skalar pnorm sin value series data ampl time array int pos double result 0 0d double length 0 0d double delta 2 math pi ampl time array length for int i 0 i ampl time array length i double sin math sin pos i delta result ampl time array get value i sin length sin sin return result length
|
calculates the result of the normalized skalar product
|
public void set user data string key object data user data put key data
|
sets the given user data
|
protected value series get inner result value series value series throws operator exception inner series source deliver value series get subprocess 0 execute value series result inner series sink get data return result
|
applies the inner operators and returns their result
|
public value series data transform value series data series throws operator exception int length get parameter as int length if length 1 throw new operation exception cannot transform series length is smaller than 1 vector result new vector length double displacements new double length for int i 0 i length i if i series length result i series get vector i displacements i series get displacement i else throw new operation exception cannot generate the i th value data too short return new value series data first length series get name displacements result series
|
generates the k first values of the series as new series
|
public value series data transform value series data series throws operator exception return filter series
|
invokes the interface method filter value series
|
private void set weights double h w double t w double sum h w t w if sum 0 head weight h w sum tail weight t w sum get parameters set parameter head weight head weight get parameters set parameter tail weight tail weight
|
sets the tail and head weights
|
public void change parameter throws operator exception int function type random generator get global random generator next int functions length get parameters set parameter function type function type if get parameter as int function type exponential double gamma get parameter as double gamma gamma gamma random generator get global random generator next gaussian gamma if gamma 0 0d get parameters set parameter gamma gamma
|
changes the function type of this window function
|
public void change parameter int function type random generator get global random generator next int functions length get parameters set parameter function type function type
|
changes the function type of this window function
|
public value series do work value series series io throws operator exception try file file new file get parameter as string output file print stream out new print stream new file output stream file out println data from get name out println current series data write series series io get series data out out close catch ioexception e throw new operation exception e to string return series io
|
this operator writes the current data in the specified file
|
private void write series value series data series print stream out for int i 0 i series length i out print series get displacement i t for int d 0 d series get number of dimensions d out print series get value i d t out println
|
writes the series data in the stream
|
public boolean is univariate return values length 1
|
returns true if this series is univariate
|
public int get number of dimensions return values length
|
returns the number of values without the index dimension
|
public complex get value int dimension return values dimension
|
returns the complex number in the given dimension
|
private void init for string key operator service get operator keys operator description description operator service get operator description key if value series operator class is assignable from description get operator class handle operator description
|
searches all value series operators defined in any of the operator
|
public double get real value int dimension return values dimension get real
|
returns the real part of the complex number in the given dimension
|
public double scalar product vector a double result 0 0d for int i 0 i get number of dimensions i result this values i multiply a values i get real todo scalar of complex return result
|
delivers the calculation of the scalar product between this and the given vector
|
public void scale double scalar for int i 0 i get number of dimensions i this values i scale scalar
|
scales this vector by the given scalar
|
private void add chain operator chain op list operator chains boolean add to windowing if op instanceof windowing op instanceof combined function op instanceof single combined function chains add op if op instanceof windowing add to windowing for int i 0 i op get number of operators i operator child op get operator i if child instanceof operator chain add chain operator chain child chains add to windowing
|
adds a chain to the given list
|
public void test process throws operator exception repository exception for operator op process get root operator get all inner operators op set breakpoint breakpoint listener breakpoint after false op set breakpoint breakpoint listener breakpoint before false process get root operator set breakpoint breakpoint listener breakpoint after false process get root operator set breakpoint breakpoint listener breakpoint before false iocontainer results process run rapid assert assert equals util get expected result process results as list
|
runs the process and compares the actual results with the expected
|
public attribute weights do work example set example set throws operator exception example set input receive example set check capabilities and produce errors if they are not fulfilled capability check check new capability check this tools boolean value parameter service get parameter value property rapidminer general capabilities warn true only warn for non sufficient capabilities check check learner capabilities this example set do work return weights output get data
|
helper method for anonymous instances of this class
|
public attribute weights do work model model example set example set throws operator exception model input receive model get example set input port receive example set do work return get weights output port get data
|
helper method for anonymous instantiations of this class
|
public void evaluate list population example set original example set throws operator exception iterator i population iterator while i has next aggregation individual individual aggregation individual i next if individual get performance null example set example set individual create example set original example set all attributes generator if example set get attributes size 0 i remove else inner example set source deliver example set get subprocess 0 execute performance vector performance vector inner performance sink get data individual set performance performance vector
|
creates example sets from all individuals and invoke the inner operators
|
protected performance vector evaluate example set based individual individual throws operator exception total evaluations if individual get performance null return individual get performance else evaluation counter attribute weighted example set clone individual get example set create clean clone inner example set source deliver clone get subprocess 0 execute performance vector performance vector inner performance sink get data individual set performance performance vector return performance vector
|
evaluates the given individual
|
public boolean check process branch operator string value throws operator exception class extends ioobject clazz operator get selected class if clazz null ioobject object operator get condition input clazz return object null return false
|
this method checks if the file with pathname value exists
|
public workbook get workbook progress listener listener throws biff exception ioexception if pre opened workbook null file file get file input stream in new progress reporting input stream new file input stream file listener 10 90 file length pre opened workbook workbook get workbook file workbook settings workbook settings new workbook settings if encoding null workbook settings set encoding encoding name pre opened workbook workbook get workbook in workbook settings return pre opened workbook
|
this will return a workbook if already delivered with the configuration
|
public void set workbook file file selected file if selected file equals this workbook file return if has workbook pre opened workbook close pre opened workbook null workbook file selected file pre opened workbook null row offset 0 column offset 0 row last integer max value column last integer max value sheet 0
|
this will set the workbook file
|
protected parameter type make file parameter type final parameter type file file param new parameter type file get file parameter name name of the file to read the data from get file extension true file param set expert false file param register dependency condition new input port not connected condition this new port provider override public port get port return file input port true return file param
|
creates but does not add the file parameter named by
|
public string get xml boolean hide default boolean only core elements try return xmltools to string new xmlexporter only core elements export process this hide default xmlimporter process file charset catch exception e log service get root log level warning cannot generate process xml e e return e to string
|
returns the xml representation of this operator
|
private model train model example set example set throws operator exception training inner source deliver example set get subprocess 0 execute return model inner sink get data
|
runs the quot embedded quot learner on the example set and retuns a
|
public void add child node child children list add child children put child get class name child child set parent this
|
adds a child node
|
private void read optional parameters throws user error this start model model input get data or null if this start model null log get name no model found in input
|
helper method reading a start model from the input if present
|
public void write annotations data output out annotations annotations throws ioexception if version version 3 log service get root warning ignoring annotations in example set stream version version else if annotations null out write int 0 else out write int annotations size for string key annotations get keys write string out key write string out annotations get annotation key
|
one integer for size
|
public void save all log service get root config saving perspectives if current null current store context for perspective perspective perspectives values perspective save
|
saves all perspectives to the users config directory
|
public void load all log service get root config loading perspectives for perspective perspective perspectives values perspective load file user perspective files file system service get user rapid miner dir list files new filename filter override public boolean accept file dir string name return name starts with vlperspective user for file file user perspective files string name file get name name name substring vlperspective user length name name substring 0 name length xml length perspective perspective create user perspective name false perspective load
|
loads all perspectives from the users config directory
|
protected void set value operator operator parameter type type string value parameters set parameter type get key value key value map put type get key value setup components
|
this implementation ignores the operator since it is null anyway
|
public void start and wait try executor submit make wrapper get catch interrupted exception e log service get root log level severe cannot execute name e catch execution exception e log service get root log level severe cannot execute name e
|
enqueues this task and waits for its completion
|
public void action performed action event e for runnable runnable animation renderers runnable run repaint
|
this method is used for being repainted for
|
public void add to action map jcomponent component int condition key stroke key stroke key stroke get value accelerator key if key stroke null component get input map condition put key stroke key component get action map put key this else log service get root warning cannot add action key to input map no accelerator defined
|
adds the action to the input and action map of the component
|
protected void setup gui throws no op user error system set property bookmark io property bookmarks dir file system service get user rapid miner dir get absolute path system set property bookmark io property bookmarks file bookmarks system set property database connection service property connections file connections try uimanager set look and feel new rapid look and feel operator service reload icons catch exception e log service get root log level warning cannot setup modern look and feel using default e
|
this default implementation only setup the tool tip durations
|
public void save if rapid miner get execution mode can access filesystem file file file system service get user config file usagestats xml try log service get root config saving operator usage xmltools stream get xml file null catch exception e log service get root log level warning cannot save operator usage statistics e e else log service get root config cannot access file system bypassing save of operator usage statistics
|
saves the statistics to a user file
|
private void connect char passwd properties props boolean auto commit throws sqlexception if connection null throw new sqlexception connection to database database url already exists log service get root config connecting to database url as this user driver manager set login timeout 30 props put set big string try clob true if this user null user is empty props put user user props put password new string passwd connection driver manager get connection database url props connection set auto commit auto commit statement creator new statement creator connection
|
establishes a connection to the database
|
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 return false
|
returns true iff the user entered a valid non empty repository location
|
public void copy repository location source folder destination progress listener listener throws repository exception listener set total 100000 listener set completed 0 try copy source destination listener 0 100000 finally listener complete
|
copies an entry to a given destination folder
|
public void move repository location source folder destination progress listener l throws repository exception entry entry source locate entry if entry null throw new repository exception no such entry source else if destination get location get repository source get repository copy source destination l entry delete else string new name source get name if destination contains entry new name throw new repository exception destination contains element with name new name l set total 100 l set completed 10 entry move destination l set completed 100 l complete
|
moves an entry to a given destination folder
|
private boolean check port under ports extends port ports int x int y for port port ports get all ports point2 d location get port location port if location null continue int dx int location get x x int dy int location get y y if dx dx dy dy 3 port size port size 2 if hovering port port hovering port port if hovering port instanceof output port show status click to connect alt to disconnect set hovering operator null update cursor repaint return true return false
|
checks whether we have a port under the given point in process space
|
public void handle property final property change event evt target set value target property get type target property get expression target property get type cast convert utils convert get new value evt to string target property get type
|
once we know that source and target are not synchronized and also that
|
public boolean is property to handle property change event evt return evt get property name equals source property get expression
|
whether the property triggered is the one to handle
|
public void set source property property sv source property this source property source property
|
the source property from data is retrieved
|
public void set target bean adapter t target this target target
|
the target object this listener is going to populate
|
public void set target property property tv target property this target property target property
|
the target property where data is going to be copied
|
protected void paint empty rows graphics g highlighter highlighters this get compound highlighter get highlighters if highlighters length 1 final int row count get row count final rectangle clip g get clip bounds if row count row height clip height for int i row count i clip height row height i g set color color for row i g fill rect clip x i row height clip width row height
|
paints the backgrounds of the implied empty rows when the
|
protected color color for row int row compound highlighter ch null int rowx 1 if row 2 0 rowx 0 ch compound highlighter class cast this get compound highlighter get highlighters 0 return color highlighter class cast ch get highlighters rowx get background
|
returns the appropriate background color for the given row
|
private void init dynamic table columns dynamic table model t dynamic table model table column model column model this get column model for dynamic table column column dynamic table model get columns integer column index column model get column index column get property name table column table column column model get column column index string header value column get title null column get title column get property name table column set header value header value table column set preferred width column get width if column get renderer null table column set cell renderer column get renderer
|
this method initializes column settings set to the model
|
protected void fire contents changed object source int index0 int index1 for list data listener listener this listener list listener contents changed new list data event source list data event contents changed index0 index1 update ui listener
|
this method keeps informed listeners of list data changes
|
protected void fire interval added object source int index0 int index1 for list data listener listener this listener list listener interval added new list data event source list data event contents changed index0 index1 update ui listener
|
this method keeps informed listeners of list data changes
|
protected void fire interval removed object source int index0 int index1 for list data listener listener this listener list listener interval removed new list data event source list data event contents changed index0 index1 update ui listener
|
this method keeps informed listeners of list data changes
|
private int get current index return this size 0 0 this size 1
|
returns the current index of the list
|
private void update ui final list data listener listener if listener instanceof jcomponent swing utilities invoke later new runnable public void run jcomponent class cast listener update ui
|
this method helps the list to update the component using it to
|
public application trapper require visible return this require visible true
|
checks that the application is visible
|
public application trapper require visible boolean visible test case assert equals this get target get view manager get root view get frame is visible visible return this
|
checks whether the application is visible or not
|
public void test menu items app menu item exit require enabled app menu item cut require enabled app menu item paste require enabled app menu item copy require enabled app menu item select all require enabled app menu item about require enabled
|
testing all required menu items at startup
|
public document get xml reader reader throws exception document builder factory factory document builder factory new instance factory set ignoring comments true document builder builder factory new document builder document document builder parse new input source reader return document
|
this method returns an xml document built upon the xpath expressions
|
public string get xmlas string document document throws exception transformer factory factory transformer factory new instance transformer transformer factory new transformer string writer writer new string writer transformer transform new domsource document new stream result writer return writer to string
|
method for retrieving the menu contruction as a string object
|
private jpopup menu populate right menu return populate menu tray right menu node name
|
populates the right menu
|
private jpopup menu populate left menu return populate menu tray left menu node name
|
populates the left menu
|
private jpopup menu populate menu string name node list list document get elements by tag name name jpopup menu menu null if list null list get length 0 node current node list item 0 menu populate jmenu bar name current node null new jpopup menu return menu
|
populates the menu which name is passed as argument
|
public jpopup menu get left click menu return left click menu
|
returns the jpopup menu when clicked with the left button
|
public jpopup menu get right click menu return right click menu
|
returns the jpopup menu when clicked with the right button
|
public document get document view container view throws view exception document document null always the menu xml file is processed first document get document from file view if there s any action descriptor the processed document is returned return document
|
parses the menu
|
public void set left click menu jpopup menu left click menu this left click menu left click menu
|
sets the jpopup menu when clicked with the left button
|
public void set right click menu jpopup menu right click menu this right click menu right click menu
|
sets the jpopup menu when clicked with the right button
|
private key stroke process key stroke expression string named item string parts named item split boolean enough args parts length 2 string valid expression enough args parts 0 to lower case parts 1 return key stroke get key stroke valid expression
|
this method translates the expression written in the descriptors into keystrokes
|
private void do init splash this splash screen splash screen get splash screen
|
this method initializes the splash screen
|
private abstract view container tray cast view view container view return abstract view container tray class cast view
|
its a shortcut
|
private void hide menu jpopup menu menu if menu null menu set visible false
|
a checked way of hiding a menu
|
private boolean is right view type view container view return abstract view container tray class is assignable from view get class
|
checking if the view is the right one
|
private void populate jtool bar map string list jbutton button map jtool bar tool bar list string sorted list new array list string button map key set list string clean sorted list new array list string for string clean key sorted list if clean key null clean sorted list add clean key collections sort clean sorted list for string lista clean sorted list if lista null list jbutton list button map get lista for jbutton button list tool bar add button tool bar add separator
|
this method populates the actions into the view containers jtool bar
|
private string extract current resource bundle string resource bundle name application bundle name string key viewa properties get property application locale if viewa properties null key null key equals ignore case empty string resource bundle name locale separator key return resource bundle name properties
|
this method gets the proper resource bundle for getting splash screen
|
public last modified control get control if this control null this control new last modified control return control
|
if no control is defined it returns a org
|
private void initialization try do init splash do load properties do configuration properties do splash coordinates catch ioexception e logger fatal application init failed prefix e get message
|
inits splash screen
|
private resource bundle get current view bundle class extends object clazz boolean is root view child resource bundle aware control resource bundle bundle null getting the specific locale for all bundles locale locale this view get application get locale try control set parent resource bundle get bundle application resource bundle base name locale bundle resource bundle get bundle clazz get name locale this get control catch missing resource exception m log warn there s no specific properties file for view view get id bundle resource bundle get bundle application resource bundle base name locale return bundle
|
this method gets the right resource bundle for this view
|
public image get image return this tray icon get image
|
returns the current tray icons image
|
public string get tool tip return this tray icon get tool tip
|
returns the current tray icons tool tip
|
public view tray icon get tray icon return tray icon
|
returns the tray icon object
|
public void set image image icon this tray icon set image icon
|
exposing the set image method from tray icon
|
public void set tool tip string tool tip this tray icon set tool tip tool tip
|
exposing the set tool tip method from tray icon
|
public void set tray icon view tray icon tray icon this tray icon tray icon
|
establishing the tray icon
|
public image get icon image return this get frame null this get frame get icon image null
|
setting the application icon
|
public void set icon image image icon image if this get frame null this get frame set icon image icon image
|
getting the application view
|
public void test set visible app view my tray view id menu item hiderestore click 3000 application trapper require visible false view my tray view id menu item hiderestore click 3000 application trapper require visible view test view id button failure button click 5000 view text text require text bad situation
|
this test checks the method responsible for hiding and
|
protected popup menu listener get popup menu listener if popup menu listener null popup menu listener create popup menu listener return popup menu listener
|
returns the popup menu listener for the month view popup
|
protected void install popup popup create month view popup popup add popup menu listener get popup menu listener
|
creates the popup and registers the popup listener
|
public void toggle show popup if popup null install popup if popup is visible popup set visible false else pending jw issue 757 swing date picker firing focus lost on opening not with following line but need to run tests date picker get editor request focus in window date picker request focus in window swing utilities invoke later new runnable public void run popup show date picker 0 date picker get height
|
toggles the popups visibility after preparing internal state
|
protected void uninstall popup if popup null popup remove popup menu listener get popup menu listener popup null
|
removes the popup listener from the popup and null it if
|
private void update editor properties date picker get editor set enabled date picker is enabled date picker get editor set editable date picker is editable
|
synchronizes the properties of the current editor to the properties of
|
protected void update from editable changed boolean is editable date picker is editable pending jw revisit align with combo s editable date picker get month view set enabled is editable date picker get editor set editable is editable patryk ry commit today date is not allowed if datepicker is not editable set action enabled jxdate picker home commit key is editable for consistency synch navigation as well set action enabled jxdate picker home navigate key is editable
|
updates properties which depend on the pickers editable
|
protected void update from enabled changed boolean is enabled date picker is enabled popup button set enabled is enabled date picker get editor set enabled is enabled
|
update properties which depend on the pickers enabled
|
protected void update from month view changed jxmonth view old month view uninstall popup update month view listeners old month view time zone old time zone null if old month view null old month view set component input map enabled false old time zone old month view get time zone date picker get month view set component input map enabled true update time zone old time zone update editor value
|
updates internals after the pickers month view has changed
|
private void add handle image handle img this total images this images add img
|
stores the image handle reference so that when all the images report an
|
private void retrieve path cell start cell goal cell current goal path push goal while current equals start for int i 0 i directions length i try cell next cell get cell current get x directions i 0 current get y directions i 1 if next cell get distance from home current get distance from home 1 current next cell path push current break catch index out of bounds exception e remove start position from the path path pop
|
after the function dijkstra marks the distance from the start position
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.