libswami Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
SwamiLoopFinder; SwamiLoopFinder * swami_loop_finder_new (void
); void swami_loop_finder_full_search (SwamiLoopFinder *finder
); gboolean swami_loop_finder_verify_params (SwamiLoopFinder *finder
,gboolean nudge
,GError **err
); gboolean swami_loop_finder_find (SwamiLoopFinder *finder
,GError **err
); SwamiLoopResults * swami_loop_finder_get_results (SwamiLoopFinder *finder
);
"active" gboolean : Read "analysis-window" gint : Read / Write "cancel" gboolean : Read / Write "exec-time" guint : Read "group-pos-diff" gint : Read / Write "group-size-diff" gint : Read / Write "max-results" gint : Read / Write "min-loop-size" gint : Read / Write "progress" gfloat : Read / Write "results" SwamiLoopResults* : Read "sample" IpatchSample* : Read / Write "window1-end" gint : Read / Write "window1-start" gint : Read / Write "window2-end" gint : Read / Write "window2-start" gint : Read / Write
SwamiLoopFinder * swami_loop_finder_new (void
);
Create a new sample loop finder object.
Returns : |
New object of type SwamiLoopFinder |
void swami_loop_finder_full_search (SwamiLoopFinder *finder
);
Configures a loop finder to do a full loop search of the assigned sample. Note that a sample must have already been assigned and the "analysis-window" and "min-loop-size" parameters should be valid for it. This means: (finder->analysis_window <= finder->sample_size) && (finder->sample_size - finder->analysis_window) >= finder->min_loop_size.
|
Loop finder object |
gboolean swami_loop_finder_verify_params (SwamiLoopFinder *finder
,gboolean nudge
,GError **err
);
Verify a loop finder's parameters. If the nudge
parameter is TRUE
then
corrections will be made to start and end loop search windows if necessary
(changed to fit within sample and analysis window and swapped if
windows are backwards).
Note that the other parameters will not be corrected and will still cause
errors if wacked. Nudged values are only changed if TRUE
is returned.
gboolean swami_loop_finder_find (SwamiLoopFinder *finder
,GError **err
);
Execute the loop find operation. This function blocks until operation is
finished or the "cancel" property is assigned TRUE
. The "progress"
parameter is updated periodically with the current progress value (between
0.0 and 1.0).
Note: Not thread safe. Properties should be assigned, this function
called and the results retrieved with swami_loop_finder_get_results()
in
a serialized fashion. As long as this is ensured, creating a separate
thread to call this function will be OK. The results can only be accessed
up until the next call to this function.
|
Loop finder object |
|
Location to store error info or NULL to ignore
|
Returns : |
TRUE on success, FALSE if the find parameter values are invalid
or operation was cancelled (in which case err may be set).
|
SwamiLoopResults * swami_loop_finder_get_results (SwamiLoopFinder *finder
);
Get the loop results object from a loop finder.
|
Loop finder object |
Returns : |
Loop results object or NULL if none (if swami_loop_finder_find()
has not yet been called or was canceled). The caller owns a reference
to the returned object and should unref it when completed.
|
"analysis-window"
property"analysis-window" gint : Read / Write
Size of analysis window.
Allowed values: >= 1
Default value: 17
"group-pos-diff"
property"group-pos-diff" gint : Read / Write
Min difference of loop position of separate groups.
Allowed values: >= 0
Default value: 20
"group-size-diff"
property"group-size-diff" gint : Read / Write
Min difference of loop size of separate groups.
Allowed values: >= 0
Default value: 0
"max-results"
property"max-results" gint : Read / Write
Max results.
Allowed values: [1,4000]
Default value: 200
"min-loop-size"
property"min-loop-size" gint : Read / Write
Minimum size of matching loops.
Allowed values: >= 1
Default value: 10
"progress"
property"progress" gfloat : Read / Write
Progress.
Allowed values: [0,1]
Default value: 0
"window1-end"
property"window1-end" gint : Read / Write
First window end position.
Allowed values: >= 0
Default value: 0
"window1-start"
property"window1-start" gint : Read / Write
First window start position.
Allowed values: >= 0
Default value: 0
"window2-end"
property"window2-end" gint : Read / Write
Second window end position.
Allowed values: >= 0
Default value: 0
"window2-start"
property"window2-start" gint : Read / Write
Second window start position.
Allowed values: >= 0
Default value: 0