LGSVL Simulator: An Autonomous Vehicle Simulator
Website | Documentation | Download #
Table of Contents
Introduction top#
LG Electronics America R&D Center has developed a Unity-based multi-robot simulator for autonomous vehicle developers. We provide an out-of-the-box solution which can meet the needs of developers wishing to focus on testing their autonomous vehicle algorithms. It currently has integration with the TierIV's Autoware and Baidu's Apollo 5.0 and Apollo 3.0 platforms, can generate HD maps, and be immediately used for testing and validation of a whole system with little need for custom integrations. We hope to build a collaborative community among robotics and autonomous vehicle developers by open sourcing our efforts.
To use the simulator with Apollo, after following the build steps for the simulator, follow the guide on our Apollo 5.0 fork.
To use the simulator with Autoware, build the simulator then follow the guide on our Autoware fork.
Getting Started top#
You can find complete and the most up-to-date guides on our documentation website.
Running the simulator with reasonable performance and frame rate (for perception related tasks) requires a high performance desktop. Below is the recommended system for running the simulator at high quality. We are currently working on performance improvements for a better experience.
Recommended system:
- 4 GHz Quad core CPU
- Nvidia GTX 1080 (8GB memory)
- Windows 10 64 Bit
The easiest way to get started with running the simulator is to download our latest release and run as a standalone executable.
For the latest functionality or if you want to modify the simulator for your own needs, you can checkout our source, open it as a project in Unity, and run inside the Unity Editor. Otherwise, you can build the Unity project into a standalone executable.
Currently, running the simulator in Windows yields better performance than running on Linux.
If running Apollo or Autoware on the same system as the Simulator, it is recommended to upgrade to a GPU with at least 10GB memory.
If running Apollo or Autoware on a different system as the Simulator, a gigabit connection between the systems is required (a gigabit switch is sufficient, gigabit internet is not required).
Downloading and starting simulator top#
- Download the latest release of the LGSVL Simulator for your supported operating system (Windows or Linux) here: https://github.com/lgsvl/simulator/releases/latest
- Verify that the latest NVIDIA driver is installed
- On Windows
- Open
NVIDIA GeForce Experience
- Go the
Drivers
tab Check for Updates
- Download and install update if available
- Alternatively download driver manually from NVIDIA's website
- Open
- On Ubuntu
- Add the Graphics Drivers PPA from here under
Adding this PPA to your system
- Open
Software & Updates
- Go to the
Additional Drivers
tab - Select the latest NVIDIA driver
- In a terminal also install libvulkan with
sudo apt install libvulkan1
- Add the Graphics Drivers PPA from here under
- On Windows
- Unzip the downloaded folder and run the executable.
Building and running from source#
Check out our instructions for getting started with building from source here.
Simulator Instructions top#
- After starting the simulator, you should see a button "Open Browser..." to open the UI in the browser. Click the button.
- Go to the Simulations tab and select the appropriate map and vehicle. For a standard setup, select "BorregasAve" for map and "Jaguar2015XE (Apollo 5.0)" for vehicle. Click "Run" to begin.
- The vehicle/robot should spawn inside the map environment that was selected. Read here for an explanation of all current keyboard shortcuts and controls.
- Follow the guides on our respective Autoware and Apollo 5.0 repositories for instructions on running the platforms with the simulator.
Guide to simulator functionality top#
Look here for a guide to currently available functionality and keyboard shortcuts for using the simulator.
Contact top#
Please feel free to provide feedback or ask questions by creating a Github issue. For inquiries about collaboration, please email us at contact@lgsvlsimulator.com.


| Bid |
Bid is meant to represent a bid made by a User (called the bidder)
on an Instrument .
|
| BidList |
BidList is meant to hold a list of Bid objects.
|
| Instrument |
Instrument is meant represent an instrument owned by a specific User
(called the owner), and contains a list of Bid s on the instrument
|
| InstrumentList |
InstrumentList is meant to hold a list of Instrument objects.
|
| User |
User is meant to represent a user, and contains lists of Instrument s
he owns and has borrowed, as well as pending Bid s.
|
| UserList |
UserList is meant to hold a list of User objects.
|


 Both were great. [WISH YOU WERE WERE HERE is reviewed in another article. -ecl]
LIVING ON TOKYO TIME is a comedy about a Japanese girl who comes to the United States after her fiance dumps her for another woman. After she is here for a while, she realizes that she must find a way to stay or she will be deported. One of her co-workers suggests that she marry someone so that she can get a permanent residency visa. This is where Ken steps in. A Japanese-American musician with a heavy metal band, he has just broken up with his girlfriend. He has nothing better to do so he gets married. She speaks only a little English, he speaks no Japanese. The two come from two different worlds (they could be different planets) and have little in common. The story then revolves around the trials and tribulations of a marriage between two people who nothing about each other.
One note, LIVING ON TOKYO TIME is a very dry comedy. There is not much excitement but there are some good laughs. I would give it a 8 out of 10.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


<%- include('base.html'); %>
Live Smarter With GatorRenter
Search
Search
Explore Districts
Districts that are closest to campus
ParkMerced
Lakeshore
Ingleside
Learn More
<%- include('about.html'); %>


DETECTION
Test
GET parameters
POST parameters
cookies
Forms (test Upload forms)
Hidden fields
Common parameter names
file=
location=
locale=
path=
display=
load=
read=
retrieve=
Automated testing
Test with Burp Intruder, payload Fuzzing-path traversal and choose proper file
Black Box
Identify any instance where a request parameter appears to contain the name of a file or directory, such as include=main.inc or template=/en/ sidebar.
Any application functions whose implementation is likely to involve retrieval of data from a server filesystem.
Does application have cookies for dynamic generation of pages?(templates, etc.)
Input
file=foo/file1.txt
and
file=foo/bar/../file1.txt
if same results returned then we can have Path Traversal vuln
if different results then there can be input filter
Testing file read access
Linux:
../../../../../../../../../../../../etc/passwd
Windows:
../../../../../../../../../../../../windows/win.ini
Testing file read access
Windows:
Writable by anyone:
../../../../../../../../../../../../writetest.txt
Non-writable by anyone:
../../../../../../../../../../../../windows/system32/config/sam
Linux:
Writable by anyone:
../../../../../../../../../../../../tmp/writetest.txt
Non-writable by anyone:
../../../../../../../../../../../../tmp
White Box
Start file monitor tool
- Windows: FileMon tool from SysInternals
- Linux: Ltrace, Strace
- Solaris: truss
Test all webapp parameters (GET, POST, cookies) one at time with one exact test string
Set a filter in file system monitoring tool ad search for test string
If search positive, then test all of these findings for Path Traversal vulnerability
IDS Bypass
Use both / and \ versions of paths
URL encode input
16-bit Unicode encode input
Double URL encode
Overlong UTF-8 encode
Non recursive .. removal can by bypassed by
....//
....\/
..../\
....\\
File suffix bypass: ../../../../../boot.ini%00.jpg
Directory prefix bypass:filestore/../../../../../../../etc/passwd
Following suffixes can be added to Windows path without altering functionality
file.txt...
file.txt<spaces>
file.txt""""
file.txt<<<>>><
./././file.txt
nonexistant/../file.txt
EXPLOITATION
Potential loot
https://www.gracefulsecurity.com/path-traversal-cheat-sheet-linux/
Read access
Search for password files
Server and application configuration files
Include files with db credentials
Data sources such as MySQL and XML files
Web app function source code
Application log files (session tokens, usernames, passwords)
Write access
Create scripts in users' startup dirs
Modify files such in.ftpd which executes when user connects
Write scripts to executable directory and run them from browser
Attack PHP session file
If path traversal vulnerability found you can read PHP session files at
/var/lib/php5/sess_9ceed0645151b31a494f4e52dabd0ed7
We can inject this session file when registering new user by <?php passthru(id);?>
Then we can LFI the session file we have RCE


Table 5
| ITEM NAME |
QUANTITY |
PRICE |
ACTION |
|
PEPPERONI PIZZA
|
|
Rs. 1000
|
|
|
V PIZZA
|
|
Rs. 800
|
|
|
SUMMER PIZZA
|
|
Rs. 650
|
|
Table 1
| ITEM NAME |
QUANTITY |
PRICE |
ACTION |
|
PEPPERONI PIZZA
|
1
|
Rs. 1000
|
|
|
V PIZZA
|
1
|
Rs. 800
|
|
|
SUMMER PIZZA
|
1
|
Rs. 650
|
|
Table 3
| ITEM NAME |
QUANTITY |
PRICE |
ACTION |
|
PEPPERONI PIZZA
|
1
|
Rs. 1000
|
|
|
V PIZZA
|
1
|
Rs. 800
|
|
|
SUMMER PIZZA
|
1
|
Rs. 650
|
|


|
robot_interfaces
|
Status information from the backend. More...
#include <status.hpp>
Public Types | |
| enum | ErrorStatus { ErrorStatus::NO_ERROR = 0, ErrorStatus::DRIVER_ERROR, ErrorStatus::BACKEND_ERROR } |
| Different types of errors that can occur in the backend. More... | |
Public Member Functions | |
| void | set_error (ErrorStatus error_type, const std::string &message) |
| Set error. More... | |
| bool | has_error () const |
| Check if an error is set. More... | |
| template<class Archive > | |
| void | serialize (Archive &archive) |
| std::vector< std::string > | get_name () override |
| std::vector< std::vector< double > > | get_data () override |
Public Attributes | |
| uint32_t | action_repetitions = 0 |
| Number of times the current action has been repeated. More... | |
| ErrorStatus | error_status = ErrorStatus::NO_ERROR |
| Indicates if there is an error and, if yes, in which component. More... | |
| std::string | error_message |
| Human-readable message describing the error. More... | |
Status information from the backend.
Used to report status information that is not directly robot-related from the backend to the frontend.
|
strong |
Different types of errors that can occur in the backend.
| Enumerator | |
|---|---|
| NO_ERROR | Indicates that there is no error. |
| DRIVER_ERROR | Error reported from the RobotDriver. An error reported by the low level robot driver (see RobotDriver). This is depending on the driver implementation. It can, for example, be used to report some hardware failure). |
| BACKEND_ERROR | Error from the RobotBackend. An error which is issued by the back end itself, for example if no new action is provided and the allowed number of repetitions is exceeded. |
|
inline |
Check if an error is set.
See error_status and error_message for more details on the error.
|
inline |
Set error.
If another error was set before, the old one is kept and the new one ignored.
| error_type | The type of the error. |
| message | Error message. |
| uint32_t robot_interfaces::Status::action_repetitions = 0 |
Number of times the current action has been repeated.
If the back end wants to apply the next action but no new action was provided by the user in time, it may (depending on configuration) repeat the previous action. Each time this happens, action_repetitions
is increased by one. Once a new action is provided, it will be reset to zero.
See also When Next Action Is Not Provided In Time.
| std::string robot_interfaces::Status::error_message |
Human-readable message describing the error.
Value is undefined if error_status == NO_ERROR
.
| ErrorStatus robot_interfaces::Status::error_status = ErrorStatus::NO_ERROR |
Indicates if there is an error and, if yes, in which component.


val key: String?
the property type dependent part of the info
key - the property type dependent part of the info
key


Flower Bundler Demo
Bundles flowers good!
Order Details
Valid codes are R12, L09, and T58.
Written by
Dave Sag
Source code available at
Github


 Curabitur placerat.
read more
|
|
|
Special Trendy Collections
POSTED ON JUNE 10, 2019 | SEO
Lorem ipsum dolor sit amet, consectetur adipiscing elit.


Pinarayi Vijayan to inaugurate 50th anniversary fete of FIB
by Special CorrespondentChief Minister Pinarayi Vijayan will inaugurate the 50th anniversary celebrations of the Farm Information Bureau (FIB) here on Tuesday. Agriculture Minister V.S. Sunil Kumar will preside over the function which will be held at the Institution of Engineers hall, Vellayambalam, at 5 p.m. Animal Husbandry Minister K. Raju will honour senior FIB officials. R. Hali, the first Principal Information Officer of the FIB, will be felicitated at the function.
The State Agricultural Information Wing existed in 1957. Back then, the Animal Husbandry Department had a separate unit for disseminating information - the Veterinary Information Unit.
The two units were merged to form the FIB on January 1, 1969 when M.N. Govindan Nair was the Agriculture Minister. The Kerala Karshakan magazine, which had first hit the stands in 1954, also was brought under the FIB.


---
title: "bots"
categories: ["Resources"]
---
⧉infominer
11-Sep-18 04:39 PM
What I like about the :
It's free
It will probably outperform the signal service you could pay for
No hindsight, everything tweeted/timestamped
No larping screenshots
Some of you even researched or want to build your own strats, which imo is the best.
https://t.co/q...
⧉infominer
03-Nov-18 10:01 AM
Exciting news:
The Psycho Bot is live!
Includes:
• Fully automated trading
• Monthly updates to improve performance
• 24/7 Discord support
• Built-in risk management — fixed SL + adjustable risk % and leverage
DMs open for questions.
More info⤵
https://t...


---
layout: post
title: Aperture 3 - New Screencast - Faces
tags:
- Aperture 3
- Apple
- Apple Aperture
- screencast
- Site News
- work-flow
- Workflow
status: publish
type: post
published: true
meta:
tt_auto_tweet: "false"
aktt_notify_twitter: "yes"
_edit_lock: "1269634994"
_edit_last: "2"
tt_auto_tweet_text: "New blog post: [TITLE] [URL] "
aktt_tweeted: "1"
dsq_thread_id: "372387384"
---
Okay - so here is something that might surprise you. I am actually using Faces - not to the extent that Matthew Bergsma is - check him out but I am using it none the less. I still thing Apple has a lot of work to do with the UI but here are my suggestions on some of the ways to use Faces most effectively.
I did this screencast the same day that I did stacks and albums - I decided to release it a little later because I wanted to get some feedback on the first one before putting this out there. I took some suggestions from that you had from the couple that I put up on Places and books and color and incorporated them into stacks and albums. Namely - go slower - use menus instead of shortcuts - etc. My biggest worry was that I was going too slow - heck this one is 20 minutes on Faces but the feedback that I have gotten so far has been positive so here is the Faces screencast.
By all means keep the feedback and suggestions coming - I want to make these as useful as possible. You can get the screencasts here.
RB


---
title: All projects
---
Machine Learning (and life) Projects
{% assign projs = (site.projects | sort: 'order') %}
{% for project in projs %}
-
{{ project.title }}
{{ project.subtitle }}
{% endfor %}
{% assign photoprojs = (site.photoprojects | sort: 'order') %}
{% for photoproject in photoprojs %}
-
{% endfor %}


"uSurvey is an innovative data collection tool designed to provide statistically representative real time estimates of a given indicator. It runs on USSD interactive secured channel and on ODK, for off-line data collection in locations with intermittent mobile network connections."
Discover
UNICEF Uganda, in partnership with the Uganda Bureau of Statistics (UBOS), developed uSurvey to conduct official structured surveys and assessments....More
USSD & ODK CHANNELS
uSurvey enables real-time data collection and storage using mobile device (tablet/phone) through via USSD and ODK...


The "struts-bean-el" tag library contains JSP custom tags useful in defining new beans (in any desired scope) from a variety of possible sources, as well as a tag to render a particular bean (or bean property) to the output response.
The functionality of this tag library is entirely provided by the base "struts-bean" tag library in the Struts distribution. This derived tag library, "struts-bean-el", only provides a different way to evaluate attribute values, which is using the JavaServer Pages Standard Tag Library expression language engine, or the "JSTL EL" for short.
In general, the tags provided in the "struts-bean-el" library are a direct mapping from the "struts-bean" tag library. However, there are several tags in the base Struts tag library which were not "ported" to the "struts-bean-el" tag library, as it was determined that all of their functionality was provided by the JSTL. Information about these "non-ported" tags is provided in the information for the "org.apache.strutsel" package.
The functionality of the "bean-el" tags can be almost entirely understood from the documentation of the "struts-bean" base tag library.
The following are discrete examples of uses of the "bean-el" tags, in no paticular order, but emphasizing the use of JSTL EL values as attribute values.
Example:
<bean-el:message key="${messKey}" arg0="${arg}"/>
Example:
<bean-el:resource id="var" name="${filename}" />
Example:
<%-- Size of pagescope hash table --%> <bean-el:size id="pageScopeSize" collection="${pageScope}" />
Example:
<bean-el:struts id="mapping" mapping="${actionName}" />


LANSDOWN A film review by Steve Rhodes Copyright 2001 Steve Rhodes RATING (0 TO ****): ***
"I don't just do stupid things," Hector (Chris Baran) tells his girlfriend, Jessica (Jesse Schein). "I think about them first." In the comedy LANSDOWN, a very promising first effort by writer/director Tom Zuber and his first-time cast and crew, Hector doesn't think long enough.  It turns out that not just any roofer will do.
The trouble starts when lawyer Jake Jorgenson (Paul Shields) puts out a contract on roofer Pat (Chris Stewart), who has been nailing Jake's wife, Lexi (Jennifer Carlson). The inside joke is that director Zuber is himself trained as a lawyer. He met other members of the crew in law school, where they decided that law might be a way to make money, but film was their passion.
The three guys, who get the contract from a sleazy intermediary named Gustaf (D.W. Warren), are exactly hit men material. Up until their big assignment, they had been boosting radios and VCRs and even bungling the simple stuff. The script, which has shades of Tarantino, is quite funny. There is an undertone of seriousness as well, and the story would have been improved if they have developed that more.
The film's best scene has Hector trying to borrow Jessica's car, since his has dead bodies in the trunk. Jessica, however, will hear nothing about his big problem until he listens to her first. She doesn't think he pays enough attention to her. As he is about to bust, he tries to listen to the petty aspects of her life. The sharply written scene speaks volumes about the inability of men and women to communicate. Jessica wants to be heard; Hector wants to get to the point.
LANSDOWN runs a fast 1:20. It is not rated but would be an R for violence and language. The film would be acceptable for older teenagers.
Web: http://www.InternetReviews.com Email<EMAIL_ADDRESS>Want free reviews and weekly movie and video recommendations via Email? Just send me a letter with the word "subscribe" in the subject line.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


above |
Ken Keeping Still, Mountain |
|
below |
Chen The Arousing, Thunder |
The Corners of the Mouth.
Perseverance brings good fortune.
Pay heed to the providing of nourishment.
And to what a man seeks
To fill his own mouth with.
At the foot of the mountain, thunder:
The image of Providing Nourishment.
Thus the superior man is careful of his words
And temperate in eating and drinking.

Misfortune.
Six in the second place means:
Turning to the summit for nourishment,
Deviating from the path
To seek nourishment from the hill.
Continuing to do this brings misfortune.
Six in the third place means:
Turning away from nourishment.
Perseverance brings misfortune.
Do not act thus for ten years.
Nothing serves to further.
Six in the fourth place means:
Turning to the summit
For provision of nourishment
Brings good fortune.
Spying about with sharp eyes
Like a tiger with insatiable craving.
No blame.
Six in the fifth place means:
Turning away from the path.
To remain persevering brings good fortune.
One should not cross the great water.
Nine at the top means:
The source of nourishment.
Awareness of danger brings good fortune.
It furthers one to cross the great water.


You can Feel the web
What if you could step inside the website and see it
like you see the real world around you?
Well, we are a small startup from Serbia,
that's doing hard work on making that possible!
Since Microsoft has made AR possible
with Hololens, we have decided to lean on that technology by
creating a first browser for AR web applications.
If you are a developer, you would be interested in a fact that,
along with the browser, we are working on a framework that will make AR
web development easy for current frontend and backend developers.
At the end, you can better understand our vision in a quote by Chris Milk:
"Virtual reality is the 'ultimate empathy machine.' These experiences are more than documentaries. They're opportunities to walk a mile in someone else's shoes."
If you have any
questions, or you're interested in our product, be sure to:
If you are a FE developer, you'll learn how to develop AR in no time with HOML and OSS!
We are doing our best to provide familiar and easy to use BE frameworks for AR.
For your models you can use anything that is supported by Unity engine!
Nothing would be possible without our new HOTP which looks a lot like HTTP!


class ChildrenManager : RelationshipManager<ChildRelationship>
Responsible for performing CRUD operations for the "children" table. |
|
abstract class DataManager<T : DataModel>
The base data manager class, defining/implementing methods that all data managers should inherit or implement. |
|
class MarriagesManager : RelationshipManager<Marriage>
Responsible for performing CRUD operations for the "marriages" table. |
|
class PersonManager : StandardDataManager<Person>
Contains some methods to perform CRUD operations for the persons table. |
|
abstract class RelationshipManager<T : DataRelationship> : DataManager<T>
An abstract data manager class, containing methods which "relationship" data managers should use. |
|
abstract class StandardDataManager<T : StandardData> : DataManager<T>
An abstract data manager class which includes methods that all "standard" data managers should inherit/implement. |


Home
(current)
Support
About
Login or Register
Email address
Password
Remember me
Sign in
New around here? Sign up
Forgot password?
Tìm Địa Điểm Bạn Muốn Tới
Tìm Kiếm


Do you want to leave without finishing ?
Do you want to leave without finishing ?
Do you want to leave without finishing ?
Do you want to leave without finishing ?
Do you want to leave without finishing ?
Do you want to leave without finishing ?
Do you want to logout ?


Thanks for using
Open Work Items in Power BI
extension.
For feedback and support please refer to the
project main page
.
Your file will be available for download.
This dialog will close in
seconds...
cancel


Books
RFCs and specifications relating to TLS/SSL
ASN.1 and X509
Interesting implementations
- MiTLS , and TLS Attacks in particular.
- GoTLS - TLS as implemented in the Go programming language
- OpenSSL - ubiquitous and reference implementation
- LibreSSL - fork of OpenSSL maintained by a team from OpenBSD
- BoringSSL - fork of OpenSSL maintained by Google Security team
- NSS - maintained by Mozilla, used by several browsers
Mailing lists and forums
Videos and tutorials
Miscellaneous


{% block head_extras %}{% endblock %}
Serving last {{ totpapers }} open papers from top conferences in CV, ML and AI.


[gecode-users] Limits on nonlinear constraints
Michael Mac-Vicar
mmacvicar at gmail.com
Fri Aug 20 14:55:32 CEST 2010
Javier,
I didn't try but I'd check the operators used in the last constraint.
Best,
Michael Mac-Vicar
On Aug 20, 2010 8:45 AM, "Javier Romero" <libicocco at gmail.com> wrote:
> Hi,
> I'm a newbie in Gecode, but in the first stages of trying it i've found
> something that puzzles me. After writing a program with a set of highly
> nonlinear constraints which includes the following constraint (apart from
> others)
>
> IntVar k = expr(*this, 2*x0*x1*x2);
> IntVar kc01= (*this,x2*(sqr(x0)+sqr(x1)-sqr(d01min)));
> IntVar kc02= (*this,x1*(sqr(x0)+sqr(x2)-sqr(d02min)));
> IntVar kc12= (*this,x0*(sqr(x2)+sqr(x1)-sqr(d12min)));
> rel(*this,k*(sqr(kc01)+sqr(kc02)+sqr(kc12)) < (k*k*k+2*kc01*kc02*kc12));
>
> i get an output like this:
>
> Initial
> propagators: 0
> branchers: 0
>
> Summary
> runtime: 0.000 (0.174000 ms)
> solutions: 0
> propagations: 0
> nodes: 0
> failures: 1
> peak depth: 0
> peak memory: 18 KB
> That is, it returns inmediately with no solution. However, the problem has
a
> solution, and actually it finds it by commenting the last lined of the
code
> posted above (by chance; the constraint is actually necessary). This is
how
> the output looks when the solution is found:
> Initial
> propagators: 82
> branchers: 1
>
> Summary
> runtime: 54.402 (54402.259000 ms)
> solutions: 1
> propagations: 638013328
> nodes: 1237660
> failures: 618828
> peak depth: 414
> peak memory: 122 KB
>
> I tested manually (and with a python script) that the solution obtained is
> compliant with the constraint that was removed. So i wonder if there is a
> limitation on the level of the nonlinearities in Gecode (i think it's
> unlikely), in the number of constraints (also unlikely) or what else could
> have happened. The code is basically an adaptation of SMM example to my
> arithmetic constraints. I can post it if necessary.
>
> Best regards,
> -- Javier Romero --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20100820/9adbb915/attachment.htm>
More information about the users
mailing list


Advanced Concepts
Unit Tests - Introduction
-
Testing is mandatory in complex applications
-
This subject can be split in:
-
Unit Tests :
To test "technically" your services / components / pipes independently
-
Integation / end to end tests :
Functional tests of the application, check use cases and workflows
-
Angular comes with tools for both of them


Woahhh... What happened?
Sorry, the page you're looking for wasn't found... :(
Download the App
Support
Contact Us
© 2014 Kish Patel. All rights reserved. iPhone is a trademark of Apple Inc. App Store is a service mark of Apple inc.
Designed and built in London by
Kish Patel
.


Round Bar is a long, cylindrical bar which has many industrial and commercial applications. QSteel supplies superior quality Round Bars 4130, H11, H13, L5, L6. Apart from supplies from mill production on forward delivery basis, we stock some grades of round bars to cater to the needs of immediate requirements.
These grades are for dies, moulds and Oil & Gas applications -
H13/1.2344
H11/1.2343
L5/1.2329
AISI 4130
Grades of steels stocked at our yard for various applications:
| Application / Steel Category | Grades |
|---|---|
| Structural Steels |
S235/S275/S355/S460/S690 ASTM A36/A283/A572/A573/A633 |
| Corten steels | 355JOW/JOWP/J2W/J2WP |
| Offshore |
API 2H – 50, API 2W – 50,
S355G2 + N, S355G3 + N, S355G7-G10+N/M S420-S460+N/M S690QL |
| Pressure vessels |
P275/355/460 N/NH/NL1/NL2
P355/420/460 M/ML1/ML2 P400 NGJ4 16Mo3 DIN17155:1983 HI, DIN17155:1983 HII BS1501:1980 151-430A up to 225-490B A516 Gr. 55, 60, 65, 70 with improved properties after PWHT A516 Gr. 60 – 70 HIC (sour service) A612 (higher resistance) A387 Gr. 11 Cl.2/ Gr. 12 Cl.2/Gr. 22 A537 Class 1(N) and Class 2 (Q&T) |
| Plates for pipes |
From X52M/L360M to X80M/L555M From X52MS/L360MS to X80MS/L555MS |
| Tool steels |
1.2311/1.2312, 1.2316
1.2714/1.2738 1.2085 , 1.2083, 1.2343, 1.2344, 1.2367, 1.2363, 1.2842, 1.2510 VR400 C45/C55/C60/1.1730 |
| Shipbuilding | AH36, DH36, EH36 |
| Alloy Steels |
4130/4140
16MnCr5/20 MnCr5 41Cr4 |
| Wind mills |
S355 J2+N or NL
S355NL CAC (EN10025-3) S355K2 ACC + N (EN10025-2) S420/460 N/NL S420/460 M/ML |


|
Fig. 1
|
Seasonality of the historical (1979–2016) trends in Arctic ( ... |
|
Fig. 2
|
Spatial distributions of the linear trends during 1979–2016. ... |
|
Fig. 3
|
Centennial changes as a function of month from CMIP5 models. ... |
|
Fig. 4
|
Dependence of Arctic warming and amplification on sea-ice lo ... |
|
Fig. 5
|
Centennial changes from CMIP5 models. a from 1970–1999 to 20 ... |
|
Fig. 6
|
Time series of CESM1-simulated changes in surface air temper ... |
|
Fig. 7
|
Centennial changes as a function of month from CESM1 standar ... |
|
Fig. 8
|
Centennial changes as a function of month from CESM1 special ... |
|
Fig. 9
|
Height–latitude distributions of zonal-mean temperature chan ... |
|
Fig. 10
|
Mean changes (relative to the control-run climatology) for y ... |


Members
length :Integer
Number of objects waiting to be read from the stream
Type:
- Integer
(readonly) snapshot :Array.<Object>
A snapshot of the stream's internal buffer
Type:
- Array.<Object>
Methods
read() → {Object}
Reads an object from the stream
Throws:
-
If the stream is empty
- Type
- Error
Returns:
The next object in the stream
- Type
- Object
write(obj)
Writes an object to the stream
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Object | The object to write |


More Canadians plan to attend Remembrance Day ceremonies this year: poll
But it’s not just about thanking veterans, the poll suggests; it’s also about learning from them.
by The Canadian PressA new survey suggests more Canadians are planning to mark Remembrance Day this year, perhaps in a salute to the few remaining veterans of the Second World War.
The poll commissioned by Historica Canada, the organization behind the popular Heritage Minute videos, suggests the percentage of Canadians who plan to attend Remembrance Day ceremonies has climbed to 41 per cent, a boost of two per cent over last year and 14 per cent over 2016.
The online survey, conducted by Ipsos, also indicates 88 per cent of Canadians feel it’s important to attend such events while veterans of the Second World War can still be present.
“We’re aware now that even the youngest of those who served in World War II — 75, 76 years ago — are now in their mid-90s. The number of those who served, who used to be so common in every community, is really diminishing,” said Historica CEO Anthony Wilson-Smith.
ALSO READ: 36 memorial trees for fallen soldiers ‘hiding in plain sight’ around Langley
“The day is coming soon when they won’t be with us, and I think Canadians collectively feel that this is our time to say thank you.”
But it’s not just about thanking veterans, the poll suggests; it’s also about learning from them. The vast majority of survey respondents — 94 per cent — agreed that hearing veterans speak about their experiences is the best way for young people to understand conflict, and 80 per cent said they had heard a veteran tell their story.
That personal element can be very powerful, Wilson-Smith said.
“If you’re, for example, in your 20s or 30s, you do have that feeling of ‘there but for the grace of timing go I,’” he said. “In other words, if I’d been this age 10 or 15 years ago (for the Afghanistan War) or if I’d have been that age 75 years ago for World War II or even World War I, that could have been me out there.”
Ipsos conducted the online poll between Oct. 21 and 24, surveying 1,000 Canadians. The polling industry’s professional body, the Marketing Research and Intelligence Association, says online surveys cannot be assigned a margin of error because they do not randomly sample the population.
Nicole Thompson, The Canadian Press


import {MatTableModule} from '@angular/material/table';
MatRecycleRows
Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with tables that animate rows.
Selector: mat-table[recycleRows] table[mat-table][recycleRows]
MatTable
extends
CdkTable
Selector: mat-table table[mat-table]
Exported as: matTable| Name | Description |
|---|---|
@Input()
|
The table's source of data, which can be provided in three ways (in order of complexity):
If a data array is provided, the table must be notified when the array's objects are
added, removed, or moved. This can be done by calling the When providing an Observable stream, the table will trigger an update automatically when the stream emits a new array of data. Finally, when providing a |
@Input()
|
Whether to use a fixed table layout. Enabling this option will enforce consistent column widths and optimize rendering sticky styles for native tables. No-op for flex tables. |
@Input()
|
Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'
predicate to true. If |
@Input()
|
Tracking function that will be used to check the differences in data changes. Used similarly
to |
@Output()
|
Emits when the table completes rendering a set of data rows based on the latest data from the data source, even if the set of rows is empty. |
|
Overrides the need to add position: sticky on every sticky cell element in |
|
Overrides the sticky CSS class set by the |
| addColumnDef | |
|---|---|
|
Adds a column definition that was not included as part of the content children. |
|
| Parameters | |
|
columnDef CdkColumnDef
|
|
| addFooterRowDef | |
|---|---|
|
Adds a footer row definition that was not included as part of the content children. |
|
| Parameters | |
|
footerRowDef CdkFooterRowDef
|
|
| addHeaderRowDef | |
|---|---|
|
Adds a header row definition that was not included as part of the content children. |
|
| Parameters | |
|
headerRowDef CdkHeaderRowDef
|
|
| addRowDef | |
|---|---|
|
Adds a row definition that was not included as part of the content children. |
|
| Parameters | |
|
rowDef CdkRowDef<T>
|
|
| removeColumnDef | |
|---|---|
|
Removes a column definition that was not included as part of the content children. |
|
| Parameters | |
|
columnDef CdkColumnDef
|
|
| removeFooterRowDef | |
|---|---|
|
Removes a footer row definition that was not included as part of the content children. |
|
| Parameters | |
|
footerRowDef CdkFooterRowDef
|
|
| removeHeaderRowDef | |
|---|---|
|
Removes a header row definition that was not included as part of the content children. |
|
| Parameters | |
|
headerRowDef CdkHeaderRowDef
|
|
| removeRowDef | |
|---|---|
|
Removes a row definition that was not included as part of the content children. |
|
| Parameters | |
|
rowDef CdkRowDef<T>
|
|
| renderRows | |
|---|---|
|
Renders rows based on the table's latest set of data, which was either provided directly as an input or retrieved through an Observable stream (directly or from a DataSource). Checks for differences in the data since the last diff to perform only the necessary changes (add/remove/move rows). If the table's data source is a DataSource or Observable, this will be invoked automatically each time the provided Observable stream emits a new data array. Otherwise if your data is an array, this function will need to be called to render any changes. |
| setNoDataRow | |
|---|---|
|
Sets a no data row definition that was not included as a part of the content children. |
|
| Parameters | |
|
noDataRow CdkNoDataRow
|
|
| updateStickyColumnStyles | |
|---|---|
|
Updates the column sticky styles. First resets all applied styles with respect to the cells sticking to the left and right. Then sticky styles are added for the left and right according to the column definitions for each cell in each row. This is automatically called when the data source provides a new set of data or when a column definition changes its sticky input. May be called manually for cases where the cell content changes outside of these events. |
| updateStickyFooterRowStyles | |
|---|---|
|
Updates the footer sticky styles. First resets all applied styles with respect to the cells sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is automatically called when the footer row changes its displayed set of columns, or if its sticky input changes. May be called manually for cases where the cell content changes outside of these events. |
| updateStickyHeaderRowStyles | |
|---|---|
|
Updates the header sticky styles. First resets all applied styles with respect to the cells sticking to the top. Then, evaluating which cells need to be stuck to the top. This is automatically called when the header row changes its displayed set of columns, or if its sticky input changes. May be called manually for cases where the cell content changes outside of these events. |
MatCellDef
extends
CdkCellDef
Cell definition for the mat-table. Captures the template of a column's data row cell as well as cell-specific properties.
Selector: [matCellDef]
MatHeaderCellDef
extends
CdkHeaderCellDef
Header cell definition for the mat-table. Captures the template of a column's header cell and as well as cell-specific properties.
Selector: [matHeaderCellDef]
MatFooterCellDef
extends
CdkFooterCellDef
Footer cell definition for the mat-table. Captures the template of a column's footer cell and as well as cell-specific properties.
Selector: [matFooterCellDef]
MatColumnDef
extends
CdkColumnDef
Column definition for the mat-table. Defines a set of cells available for a table column.
Selector: [matColumnDef]
| Name | Description |
|---|---|
@Input('matColumnDef')
|
Unique name for this column. |
@Input()
|
Whether sticky positioning should be applied. |
@Input('stickyEnd')
|
Whether this column should be sticky positioned on the end of the row. Should make sure
that it mimics the |
|
Transformed version of the column name that can be used as part of a CSS classname. Excludes all non-alphanumeric characters and the special characters '-' and '_'. Any characters that do not match are replaced by the '-' character. |
| hasStickyChanged | |
|---|---|
|
Whether the sticky value has changed since this was last called. |
|
| Returns | |
boolean
|
|
| resetStickyChanged | |
|---|---|
|
Resets the dirty check for cases where the sticky state has been used without checking. |
MatHeaderCell
extends
CdkHeaderCell
Header cell template container that adds the right classes and role.
Selector: mat-header-cell th[mat-header-cell]
MatFooterCell
extends
CdkFooterCell
Footer cell template container that adds the right classes and role.
Selector: mat-footer-cell td[mat-footer-cell]
MatCell
extends
CdkCell
Cell template container that adds the right classes and role.
Selector: mat-cell td[mat-cell]
MatHeaderRowDef
extends
CdkHeaderRowDef
Header row definition for the mat-table. Captures the header row's template and other header properties such as the columns to display.
Selector: [matHeaderRowDef]
| Name | Description |
|---|---|
@Input( matHeaderRowDef)
|
The columns to be displayed on this row. |
@Input( matHeaderRowDefSticky)
|
Whether sticky positioning should be applied. |
| extractCellTemplate | |
|---|---|
|
Gets this row def's relevant cell template from the provided column def. |
|
| Parameters | |
|
column CdkColumnDef
|
|
| Returns | |
TemplateRef<any>
|
|
| getColumnsDiff | |
|---|---|
|
Returns the difference between the current columns and the columns from the last diff, or null if there is no difference. |
|
| Returns | |
IterableChanges<any> | null
|
|
| hasStickyChanged | |
|---|---|
|
Whether the sticky value has changed since this was last called. |
|
| Returns | |
boolean
|
|
| resetStickyChanged | |
|---|---|
|
Resets the dirty check for cases where the sticky state has been used without checking. |
MatFooterRowDef
extends
CdkFooterRowDef
Footer row definition for the mat-table. Captures the footer row's template and other footer properties such as the columns to display.
Selector: [matFooterRowDef]
| Name | Description |
|---|---|
@Input( matFooterRowDef)
|
The columns to be displayed on this row. |
@Input( matFooterRowDefSticky)
|
Whether sticky positioning should be applied. |
| extractCellTemplate | |
|---|---|
|
Gets this row def's relevant cell template from the provided column def. |
|
| Parameters | |
|
column CdkColumnDef
|
|
| Returns | |
TemplateRef<any>
|
|
| getColumnsDiff | |
|---|---|
|
Returns the difference between the current columns and the columns from the last diff, or null if there is no difference. |
|
| Returns | |
IterableChanges<any> | null
|
|
| hasStickyChanged | |
|---|---|
|
Whether the sticky value has changed since this was last called. |
|
| Returns | |
boolean
|
|
| resetStickyChanged | |
|---|---|
|
Resets the dirty check for cases where the sticky state has been used without checking. |
MatRowDef
extends
CdkRowDef
Data row definition for the mat-table. Captures the data row's template and other properties such as the columns to display and a when predicate that describes when this row should be used.
Selector: [matRowDef]
| Name | Description |
|---|---|
@Input( matRowDefColumns)
|
The columns to be displayed on this row. |
@Input( matRowDefWhen)
|
Function that should return true if this row template should be used for the provided index and row data. If left undefined, this row will be considered the default row template to use when no other when functions return true for the data. For every row, there must be at least one when function that passes or an undefined to default. |
| extractCellTemplate | |
|---|---|
|
Gets this row def's relevant cell template from the provided column def. |
|
| Parameters | |
|
column CdkColumnDef
|
|
| Returns | |
TemplateRef<any>
|
|
| getColumnsDiff | |
|---|---|
|
Returns the difference between the current columns and the columns from the last diff, or null if there is no difference. |
|
| Returns | |
IterableChanges<any> | null
|
|
MatHeaderRow
extends
CdkHeaderRow
Header template container that contains the cell outlet. Adds the right class and role.
Selector: mat-header-row tr[mat-header-row]
Exported as: matHeaderRowMatFooterRow
extends
CdkFooterRow
Footer template container that contains the cell outlet. Adds the right class and role.
Selector: mat-footer-row tr[mat-footer-row]
Exported as: matFooterRowMatRow
extends
CdkRow
Data row template container that contains the cell outlet. Adds the right class and role.
Selector: mat-row tr[mat-row]
Exported as: matRowMatNoDataRow
extends
CdkNoDataRow
Row that can be used to display a message when no data is shown in the table.
Selector: ng-template[matNoDataRow]
| Name | Description |
|---|---|
|
MatTextColumn
extends
CdkTextColumn
Column that simply shows text content for the header and row cells. Assumes that the table
is using the native table implementation (<table>
).
By default, the name of this column will be the header text and data property accessor.
The header text can be overridden with the headerText
input. Cell values can be overridden with
the dataAccessor
input. Change the text justification to the start or end using the justify
input.
Selector: mat-text-column
| Name | Description |
|---|---|
@Input()
|
Accessor function to retrieve the data rendered for each cell. If this
property is not set, the data cells will render the value found in the data's property matching
the column's name. For example, if the column is named |
@Input()
|
Text label that should be used for the column header. If this property is not set, the header text will default to the column name with its first letter capitalized. |
@Input()
|
Alignment of the cell values. |
@Input()
|
Column name that should be used to reference this column. |
MatTableDataSource
extends
DataSource
Data source that accepts a client-side data array and includes native support of filtering, sorting (using MatSort), and pagination (using MatPaginator).
Allows for sort customization by overriding sortingDataAccessor, which defines how data properties are accessed. Also allows for filter customization by overriding filterPredicate, which defines how row data is converted to a string for filter matching.
Note: This class is meant to be a simple data source to help you get started. As such
it isn't equipped to handle some more advanced cases like robust i18n support or server-side
interactions. If your app needs to support more advanced use cases, consider implementing your
own DataSource
.
| Name | Description |
|---|---|
|
Array of data that should be rendered by the table, where each object represents one row. |
|
Filter term that should be used to filter out objects from the data array. To override how data objects match to this filter string, provide a custom function for filterPredicate. |
|
Checks if a data object matches the data source's filter string. By default, each data object is converted to a string of its properties and returns true if the filter has at least one occurrence in that string. By default, the filter string has its whitespace trimmed and the match is case-insensitive. May be overridden for a custom implementation of filter matching. |
|
The filtered set of data that has been matched by the filter string, or all the data if there is no filter. Useful for knowing the set of data the table represents. For example, a 'selectAll()' function would likely want to select the set of filtered data shown to the user rather than all the data. |
|
Instance of the paginator component used by the table to control what page of the data is displayed. Page changes emitted by the paginator will trigger an update to the table's rendered data. Note that the data source uses the paginator's properties to calculate which page of data
should be displayed. If the paginator receives its properties as template inputs,
e.g. |
|
Instance of the MatSort directive used by the table to control its sorting. Sort changes emitted by the MatSort will trigger an update to the table's rendered data. |
|
Gets a sorted copy of the data array based on the state of the MatSort. Called after changes are made to the filtered data or when sort changes are emitted from MatSort. By default, the function retrieves the active sort and its direction and compares data by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation of data ordering. |
|
Data accessor function that is used for accessing data properties for sorting through the default sortData function. This default function assumes that the sort header IDs (which defaults to the column name) matches the data's properties (e.g. column Xyz represents data['Xyz']). May be set to a custom function for different behavior. |


This article is about the work that I focused on in UmboCV internship. I'll show some survey on natural language object retrieval and similar topic: referring expression. Besides, I released the tensorflow implementation of Natural Language Object Retrieval (paper link).
Backgound
Object detection is an age-old question. Many application need the techniques of object detection, such as IoT, self-driving car. So here we're gonna introduce the state-of-the-art: faster rcnn, achieves high performance and can be used in real-time.
Region-based Convolutional Neural Network
Region-based Convolutional Neural Network, aka R-CNN, is a visual object detection system that combines bottom-up region proposals with features computed by a convolutional neural network. R-CNN first computes the region proposal with techniques, such as selective search, and feeds the candidates to the convolutional neural network to do the classification task. Here's the system flow of R-CNN: However, it can some notable disadvantages:- Training is a multi-stage pipeline.(three training stages)
- Training is expensive in space. (due to the multi-stage training pipeline)
- Object detection is slow. Detection with VGG16 takes 47s / image (on a GPU).
Fast R-CNN
"Fast" R-CNN is quite easy to understand by its word. It's quite fast, achieving 0.3s per image for detection when ignoring the region proposal. Well, how does this magic works? The most important factor is that it shares the computation. After the region proposal, we'll get some bounding boxes. In the previous alogrithm, they just directly feed the warped image to the CNN. That is, if we have 2000 proposals, we have to do 2000 times forward pass, which wasting lots of time. Actually, we can use the relation between these proposals. Many proposals have overlap with others, and these overlap part is fed into the CNN for many times. Maybe we can just compute them for once. Fast R-CNN utilizes this property well. Here's the illustration of how it really works:
First, we'll feed the whole image into the ConvNet (to conv5). Then, it's where the magic lies in: we know that convolutional layer won't change the spatial relation between the adjacent pixels. That is, the upmost pixel will still falls on the upmost part of the feature map in conv5. Based on this, it's possible for us to porject the coordinates in raw image to the corresponding neuron in conv5! In this way, we can just compute the image through ConvNet once. After getting the faeture for each bounnding box, it will be fed into the RoI pooling layer, which is a special-case of the spatial pyramid pooling layer. The rest work is similar to the previous work. The following figure is a more clear illustration of Fast R-CNN:
Faster R-CNN
What is Faster R-CNN? Yes! you're right. It's a faster versino of Fast R-CNN.(The author is quite a straight guy, right?)
Faster R-CNN brings the object detection toward the real-time application. It achieves 10 ms per image for object detection
including time cost in region proposal. If you know well about Fast R-CNN, Faster-R-CNN won't be too difficult for you. It replace
the previous region proposal method with a so-called "Region Proposal Netwrok", aka RPN, making the whole network complete. The
Faster R-CNN is look like this:
Left: the overview of the Faster R-CNN network. Right: the region proposal network. Different anchors will apply to the sliding window.
A Region Proposal Network (RPN) takes an image feature map as input and outputs a set of rectangular object proposals, each with an objectness score. Faster R-CNN model this process with a fully convolutional network. The RPN network will detect whether the current region (generated from sliding window and different anchors) is thing or stuff (objectness score) and do the bounding box regression.
How does RPN work?
Usually, the RPN takes image feature map as input(conv5 in Alexnet). And we will apply a 3*3 sliding window on the feature map. Noted that though the window size here is only 3*3, the actual receptive field is quite large if you project the coordinate back to the raw input size. This operation is done by applying an 3*3*256 convolutional kernel on the feature map. In this way, we will get a intermediate layer in 256 dimension. Then the intermediate layer will feed into two different branches, one for objectness score(determines whether the region is thing or stuff) and the other for regression(determines how should the bounding box change to become more similar to the ground truth box).
Some conclusion:
Right now Faster R-CNN provides us a real-time algorithm for object detection. We'll see more devices with this techniques, such as surveillance camera, mobile device. Or we can even extend the object detection on images to object detection on videos, which is more useful for our lifes.
Train Faster R-CNN on your own dataset(eg. ImageNet)
Faster R-CNN is a really cool stuff. You can see my demo video, which is pretty amazin, right. It can even detect the swimming trunk! If you want to train Faster R-CNN on your own dataset, you can refer to my tutorial. Here is my result on ImageNet, which I train on validation set 1 and test on validation set 2.
I got 33.1% mAP on ImageNet 200 categories
Reference:
Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun, Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksRoss Girshick, Fast R-CNN
Ross Girshick Jeff Donahue Trevor Darrell Jitendra Malik, Rich feature hierarchies for accurate object detection and semantic segmentation


Badger women open with win vs. North Florida
Balance leads to 75-62 win
by Jay WilsonMADISON - Four players scored in double figures as the Wisconsin Badgers defeated North Florida 75-62 in a non-conference women's basketball game at the Kohl Center Tuesday night.
It was the regular season opener for both teams.
Kendra Van Leeuwen and Julie Pospisilova scored 14 points each and Suzanne Gilreath added 13.
Sydney Hilliard, a freshman from Monroe, scored 11 points and had five rebounds while Beaver Dam freshman Tara Stauffacher had seven points and five rebounds.
Wisconsin hosts Wofford Sunday afternoon at 2 pm at the Kohl Center.


Hundreds to descend on OMV in New Plymouth
by Greenpeace New ZealandHundreds to descend on OMV in New Plymouth for climate protest
Friday, 29 November: Hundreds of climate protesters are expected to descend on New Plymouth this coming Monday, 2 December. They’ll be surrounding the headquarters of Austrian Oil Company - OMV - for a three day ‘climate uprising occupation’ led by Greenpeace.
It’s the latest in a series of rolling actions against OMV - the last major overseas oil company with permits to search for offshore oil and gas in Aotearoa.
OMV’s 34,000 tonne oil rig is right now approximately 50 nautical miles off the Taranaki Coast preparing to begin exploratory drilling.
Greenpeace NZ Programme Director Niamh O’Flynn says the organisation is now bringing the resistance to OMV’s front door step.
"If we stand any hope of averting a climate catastrophe we need to rid ourselves of this final villain looking for new oil and gas that we just can’t afford to burn," says O’Flynn.
Monday’s peaceful protest at the OMV headquarters in New Plymouth will comprise of a huge variety of New Zealanders, students, grandparents, professionals and first time activists.
It brings in people from a wide coalition of environmental groups including Greenpeace, Student Climate Strikers, Extinction Rebellion, 350 Aotearoa, Climate Justice Taranaki and Oil Free groups from across the country.
"As we face the climate crisis, it’s great to see all these brave kiwis prepared to come together just when the world needs them," says O’Flynn.
"We want to send a clear message to OMV: We’re over it. They must acknowledge their role in heating the planet and give up their oil and gas exploration permits."
Members of the group which earlier this week boarded the OMV "henchboat" Skandi Atlantic in Timaru and occupied it for three days, are also on their way to join the protest.
The Skandi Atlantic was preparing to leave the Port of Timaru and travel north to meet the an OMV oil rig now stationed off the coast of Taranaki and is now being shadowed by the group.
OMV is about to begin drilling three exploratory oil wells there, and another in the Great South Basin off the Otago coast.
"While the science is unequivocal that we must transition our society to clean energy and away from a dependence on oil, gas and coal - it must be a just transition so that the workers and communities currently employed in fossil fossil fuel industries are not left behind," says O’Flynn.
"There are real employment opportunities in clean energy, including solar, onshore and offshore wind, new infrastructure, and the electrification of transport and industry."
More Details:
The mass action will take place at OMV’s headquarters 167 Devon Street West, Brooklands, New Plymouth 4310 Monday December 2nd. It is expected to last three days.
Photos and videos for download:
https://greenpeace.box.com/s/xv02p4aplylogm7y8f20r8nt17uhf9g8
ends


Welcome to the Edumaps helpful guides portal.
Here you can find references to the API, best practices for building your own applications or just general help with the Edumaps platform.
edumaps
Edumaps User Guide
API Documentation
Build Integrations
Want to suggest a feature or show your support, then visit our
Feature Requests Board
or, Contact Us


Using the box API
The box API opens an intermediate access inside the Faust compilation chain. In this tutorial, we present it with examples of code. The goal is to show how new audio DSP languages (textual or graphical) could be built on top of the box API, and take profit of part of the Faust compiler infrastructure.
Faust compiler structure
The Faust compiler is composed of several steps:
Starting from the DSP source code, the Semantic Phase produces signals as conceptually infinite streams of samples or control values. Those signals are then compiled in imperative code (C/C++, LLVM IR, WebAssembly, etc.) in the Code Generation Phase.
The Semantic Phase itself is composed of several steps:
The initial DSP code using the Block Diagram Algebra (BDA) is translated in a flat circuit in normal form in the Evaluation, lambda-calculus step.
The list of output signals is produced by the Symbolic Propagation step. Each output signal is then simplified and a set of optimizations are done (normal form computation and simplification, delay line sharing, typing, etc.) to finally produce a list of output signals in normal form.
The Code Generation Phase translates the signals in an intermediate representation named FIR (Faust Imperative Representation) which is then converted to the final target language (C/C++, LLVM IR, WebAssembly,etc.) with a set of backends.
Accessing the box stage
A new intermediate public entry point has been created in the Semantic Phase, after the Evaluation, lambda-calculus step to allow the creation of a box expression, then beneficiate of all remaining parts of the compilation chain. The box API (or the C box API version) allows to programmatically create the box expression, then compile it to create a ready-to-use DSP as a C++ class, or LLVM, Interpreter or WebAssembly factories, to be used with all existing architecture files. Several optimizations done at the signal stage will be demonstrated looking at the generated C++ code.
Note that the signal API allows to access another stage in the compilation stage.
Compiling box expressions
To use the box API, the following steps must be taken:
-
creating a global compilation context using the
createLibContext
function -
creating a box expression using the box API, progressively building more complex expressions by combining simpler ones
-
compiling the box expression using the
createCPPDSPFactoryFromBoxes
function to create a DSP factory (or createDSPFactoryFromBoxes to generate a LLVM embedding factory, or createInterpreterDSPFactoryFromBoxes to generate an Interpreter embedding factory) -
finally destroying the compilation context using the
destroyLibContext
function
The DSP factories allow the creation of DSP instances, to be used with audio and UI architecture files, outside of the compilation process itself. The DSP instances and factory will finally have to be deallocated when no more used.
Tools
Let's first define a compile
function, which uses the createCPPDSPFactoryFromBoxes
function and print the generated C++ class:
static void compile(const string& name,
tvec signals,
int argc = 0,
const char* argv[] = nullptr)
{
string error_msg;
dsp_factory_base* factory = createCPPDSPFactoryFromBoxes(name,
signals,
argc,
argv,
error_msg);
if (factory) {
// Print the C++ class
factory->write(&cout);
delete(factory);
} else {
cerr << error_msg;
}
}
A macro to wrap all the needed steps:
#define COMPILER(exp) \
{ \
createLibContext(); \
exp \
destroyLibContext(); \
} \
Examples
For each example, the equivalent Faust DSP program and SVG diagram is given as helpers. The SVG diagram shows the result of the compilation propagate step (so before any of the signal normalization steps). All presented C++ examples (as well as some more) are defined in the box-tester tool, to be compiled with make box-tester
in the tools/benchmark folder.
Expression generating constant signals
Let's create a program generating a parallel construction of 7 and 3.14 constant values. Here is the Faust DSP code:
The following code creates a box expression, containing a box boxPar(boxInt(7), boxReal(3.14))
expression, then compile it and display the C++ class:
static void test1()
{
COMPILER
(
Box box = boxPar(boxInt(7), boxReal(3.14));
compile("test1", signals);
)
}
The compute
method is then:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT(7);
output1[i0] = FAUSTFLOAT(3.1400001f);
}
}
Doing some mathematical operations on an input signal
Here is a simple program doing a mathematical operation on an signal input:
The first audio input is created with boxWire()
expression, then transformed using the boxAdd
and boxSeq
operators to produce one output:
static void test2()
{
COMPILER
(
Box box = boxSeq(boxPar(boxWire(), boxReal(3.14)), boxAdd());
compile("test2", box);
)
}
The compute
method is then:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT((float(input0[i0]) + 3.1400001f));
}
}
In the published API, most operators are exported as simple no-argument operators, using the language core-syntax. The prefix notation has been added for each relevant operator, and can be used with additional multi-argument versions. So the previous example can be written in a simpler way with the following code, which will produce the exact same C++:
static void test3()
{
COMPILER
(
Box box = boxAdd(boxWire(), boxReal(3.14));
compile("test3", box);
)
}
Defining a delay expression
Here is a simple program delaying the first input:
The prefix-notation boxDelay(x, y)
operator is used to delay the boxWire()
first parameter with the second boxInt(7)
:
static void test6()
{
COMPILER
(
Box box = boxDelay(boxWire(), boxInt(7));
compile("test3", test6);
)
}
The compute
method is then:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
fVec0[0] = float(input0[i0]);
output0[i0] = FAUSTFLOAT(fVec0[7]);
for (int j0 = 7; (j0 > 0); j0 = (j0 - 1)) {
fVec0[j0] = fVec0[(j0 - 1)];
}
}
}
Several options of the Faust compiler allow control of the generated C++ code. By default computation is done sample by sample in a single loop. But the compiler can also generate vector and parallel code. The following code show how to compile in vector mode:
static void test7()
{
createLibContext();
Box box = boxDelay(boxWire(), boxInt(7));
compile("test7", box, 3, (const char* []){ "-vec", "-lv", "1" });
destroyLibContext();
}
The compute
method is then:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0_ptr = inputs[0];
FAUSTFLOAT* output0_ptr = outputs[0];
float fYec0_tmp[40];
float* fYec0 = &fYec0_tmp[8];
for (int vindex = 0; (vindex < count); vindex = (vindex + 32)) {
FAUSTFLOAT* input0 = &input0_ptr[vindex];
FAUSTFLOAT* output0 = &output0_ptr[vindex];
int vsize = std::min<int>(32, (count - vindex));
/* Vectorizable loop 0 */
/* Pre code */
for (int j0 = 0; (j0 < 8); j0 = (j0 + 1)) {
fYec0_tmp[j0] = fYec0_perm[j0];
}
/* Compute code */
for (int i = 0; (i < vsize); i = (i + 1)) {
fYec0[i] = float(input0[i]);
}
/* Post code */
for (int j1 = 0; (j1 < 8); j1 = (j1 + 1)) {
fYec0_perm[j1] = fYec0_tmp[(vsize + j1)];
}
/* Vectorizable loop 1 */
/* Compute code */
for (int i = 0; (i < vsize); i = (i + 1)) {
output0[i] = FAUSTFLOAT(fYec0[(i - 7)]);
}
}
}
And can possibly be faster if the C++ compiler can auto-vectorize it.
If the delay operators are used on the input signal before the mathematical operations, then a single delay line will be created, taking the maximum size of both delay lines:
And built with the following code:
static void test8()
{
COMPILER
(
Box box = boxSplit(boxWire(),
boxPar(boxAdd(boxDelay(boxWire(),
boxReal(500)), boxReal(0.5)),
boxMul(boxDelay(boxWire(),
boxReal(3000)), boxReal(1.5))));
compile("test8", box);
)
}
In the compute
method, the single fVec0
delay line is read at 2 differents indexes:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
float fTemp0 = float(input0[i0]);
fVec0[(IOTA & 4095)] = fTemp0;
output0[i0] = FAUSTFLOAT((fVec0[((IOTA - 500) & 4095)] + 0.5f));
output1[i0] = FAUSTFLOAT((1.5f * fVec0[((IOTA - 3000) & 4095)]));
IOTA = (IOTA + 1);
}
}
Equivalent box expressions
It is really important to note that syntactically equivalent box expressions will be internally represented by the same memory structure (using hash consing), thus treated in the same way in the further compilations steps. So the following code where the s1
variable is created to define the boxAdd(boxDelay(boxWire(), boxReal(500)), boxReal(0.5))
expression, then used in both outputs:
static void equivalent1()
{
COMPILER
(
Box b1 = boxAdd(boxDelay(boxWire(), boxReal(500)), boxReal(0.5));
Box box = boxPar(b1, b1);
compile("equivalent1", signals);
)
}
Will behave exactly the same as the following code, where the boxAdd(boxDelay(boxWire(), boxReal(500)), boxReal(0.5))
expression is used twice:
static void equivalent2()
{
COMPILER
(
Box box = boxPar(boxAdd(boxDelay(boxWire(), boxReal(500)), boxReal(0.5)),
boxAdd(boxDelay(boxWire(), boxReal(500)), boxReal(0.5)));
compile("equivalent2", box);
)
}
It can be a property to remember when creating a DSL on top of the box API.
Using User Interface items
User Interface items can be used, as in the following example, with a hslider
:
Built with the following code:
static void test8()
{
COMPILER
(
Box box = boxMul(boxWire(),
boxHSlider("Freq [midi:ctrl 7][style:knob]",
boxReal(100),
boxReal(100),
boxReal(2000),
boxReal(1)));
compile("test8", box);
)
}
The buildUserInterface
method is generated, using the fHslider0
variable:
virtual void buildUserInterface(UI* ui_interface)
{
ui_interface->openVerticalBox("test8");
ui_interface->declare(&fHslider0, "midi", "ctrl 7");
ui_interface->declare(&fHslider0, "style", "knob");
ui_interface->addHorizontalSlider("Freq", &fHslider0,
FAUSTFLOAT(100.0f),
FAUSTFLOAT(100.0f),
FAUSTFLOAT(2000.0f),
FAUSTFLOAT(1.0f));
ui_interface->closeBox();
}
The compute
method is then:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
float fSlow0 = float(fHslider0);
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT((fSlow0 * float(input0[i0])));
}
}
User Interface layout can be described with hgroup, or vgroup or tgroup. With the box API, the layout can be defined using the labels-as-pathnames syntax, as in the following example:
import("stdfaust.lib");
freq = vslider("h:Oscillator/freq", 440, 50, 1000, 0.1);
gain = vslider("h:Oscillator/gain", 0, 0, 1, 0.01);
process = freq*gain;
Built with the following code:
static void test9()
{
COMPILER
(
Box box = boxMul(boxVSlider("h:Oscillator/freq",
boxReal(440),
boxReal(50),
boxReal(1000),
boxReal(0.1)),
boxVSlider("h:Oscillator/gain",
boxReal(0),
boxReal(0),
boxReal(1),
boxReal(0.01)));
compile("test9", box);
)
}
The buildUserInterface
method is generated with the expected openHorizontalBox
call:
virtual void buildUserInterface(UI* ui_interface)
{
ui_interface->openHorizontalBox("Oscillator");
ui_interface->addVerticalSlider("freq", &fVslider0,
FAUSTFLOAT(440.0f),
FAUSTFLOAT(50.0f),
FAUSTFLOAT(1000.0f),
FAUSTFLOAT(0.100000001f));
ui_interface->addVerticalSlider("gain", &fVslider1,
FAUSTFLOAT(0.0f),
FAUSTFLOAT(0.0f),
FAUSTFLOAT(1.0f),
FAUSTFLOAT(0.0109999999f));
ui_interface->closeBox();
}
Defining recursive signals
Recursive signals can be defined using the boxRec
expression. A one sample delay is automatically created to produce a valid computation. Here is a simple example:
Built with the following code:
static void test10()
{
COMPILER
(
Box box = boxRec(boxAdd(), boxWire());
compile("test10", box);
)
}
The compute
method shows the fRec0
variable that keeps the delayed signal:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
fRec0[0] = (float(input0[i0]) + fRec0[1]);
output0[i0] = FAUSTFLOAT(fRec0[0]);
fRec0[1] = fRec0[0];
}
}
Accessing the global context
In Faust, the underlying audio engine sample rate and buffer size is accessed using the foreign function and constant mechanism. The values can also be used in the box language with the following helper functions:
// Reproduce the 'SR' definition in platform.lib
// SR = min(192000.0, max(1.0, fconstant(int fSampleFreq, <dummy.h>)));
inline Box SR()
{
return boxMin(boxReal(192000.0),
boxMax(boxReal(1.0),
boxFConst(SType::kSInt, "fSampleFreq", "<math.h>")));
}
// Reproduce the 'BS' definition in platform.lib
// BS = fvariable(int count, <dummy.h>);
inline Signal BS()
{
return boxFVar(SType::kSInt, "count", "<math.h>");
}
So the following DSP program:
Can be written at the box API level with:
static void test11()
{
COMPILER
(
Box box = boxPar(SR(), BS());
compile("test11", box);
)
}
And the resulting C++ class contains:
virtual void instanceConstants(int sample_rate)
{
fSampleRate = sample_rate;
fConst0 = std::min<float>(192000.0f, std::max<float>(1.0f, float(fSampleRate)));
}
and:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
int iSlow0 = count;
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT(fConst0);
output1[i0] = FAUSTFLOAT(iSlow0);
}
}
Creating tables
Read only and read/write tables can be created. The read only table signal is created with boxReadOnlyTable
and takes:
- a size first argument
- a content second argument
- a read index third argument (between 0 and size-1)
and produces the indexed table content as its single output. The following simple DSP example:
Can be written with the code:
static void test20()
{
COMPILER
(
Box box = boxReadOnlyTable(boxInt(10), boxInt(1), boxIntCast(boxWire()));
compile("test20", signals);
)
}
The resulting C++ code contains the itbl0mydspSIG0
static table definition:
static int itbl0mydspSIG0[10];
The table filling code that will be called once at init time:
void fillmydspSIG0(int count, int* table)
{
for (int i1 = 0; (i1 < count); i1 = (i1 + 1)) {
table[i1] = 1;
}
}
An the compute
method that access the itbl0mydspSIG0
table:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT(itbl0mydspSIG0[int(float(input0[i0]))]);
}
}
The read/write table signal is created with boxWriteReadTable
and takes:
- a size first argument
- a content second argument
- a write index a third argument (between 0 and size-1)
- the input of the table as fourth argument
- a read index as fifth argument (between 0 and size-1)
and produces the indexed table content as its single output. The following DSP example:
Can be written with the code:
static void test20()
{
COMPILER
(
Box box = boxWriteReadTable(boxInt(10),
boxInt(1),
boxIntCast(boxWire()),
boxIntCast(boxWire()),
boxIntCast(boxWire()));
compile("test21", signals);
)
}
The resulting C++ code contains the itbl0
definition as a field in the mydsp
class:
int itbl0[10];
The table filling code that will be called once at init time:
void fillmydspSIG0(int count, int* table)
{
for (int i1 = 0; (i1 < count); i1 = (i1 + 1)) {
table[i1] = 1;
}
}
An the compute
method that reads and writes in the itbl0
table:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* input0 = inputs[0];
FAUSTFLOAT* input1 = inputs[1];
FAUSTFLOAT* input2 = inputs[2];
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
itbl0[int(float(input0[i0]))] = int(float(input1[i0]));
output0[i0] = FAUSTFLOAT(itbl0[int(float(input2[i0]))]);
}
}
Creating waveforms
The following DSP program defining a waveform:
Can be written with the code, where the size of the waveform is the first output, and the waveform content itself is the second output created with boxWaveform
, to follow the waveform semantic:
static void test12()
{
COMPILER
(
tvec waveform;
// Fill the waveform content vector
for (int i = 0; i < 5; i++) {
waveform.push_back(boxReal(100*i));
}
Box box = boxWaveform(waveform); // the size and the waveform content
compile("test12", box);
)
}
With the resulting C++ code, where the fmydspWave0
waveform is defined as a static table:
const static float fmydspWave0[5] = {0.0f,100.0f,200.0f,300.0f,400.0f};
And using in the following compute
method:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT(5);
output1[i0] = FAUSTFLOAT(fmydspWave0[fmydspWave0_idx]);
fmydspWave0_idx = ((1 + fmydspWave0_idx) % 5);
}
}
Creating soundfile
The soundfile primitive allows the access of a list of externally defined sound resources, described as the list of their filename, or complete paths. It takes:
- the sound number (as a integer between 0 and 255 as a constant numerical expression)
- the read index in the sound (which will access the last sample of the sound if the read index is greater than the sound length)
The generated block has:
- two fixed outputs: the first one is the currently accessed sound length in frames, the second one is the currently accessed sound nominal sample rate
- several more outputs for the sound channels themselves, as a constant numerical expression
The soundfile block is created with boxSoundfile
. Thus the following DSP code:
Will be created using the box API with:
static void test19()
{
COMPILER
(
Box box = boxSoundfile("sound[url:{'tango.wav'}]",
boxInt(2),
boxInt(0),
boxInt(0));
compile("test19", box);
)
}
And the following compute
method is generated:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
FAUSTFLOAT* output2 = outputs[2];
Soundfile* fSoundfile0ca = fSoundfile0;
int* fSoundfile0ca_le0 = fSoundfile0ca->fLength;
int iSlow0 = fSoundfile0ca_le0[0];
int* fSoundfile0ca_ra0 = fSoundfile0ca->fSR;
int iSlow1 = fSoundfile0ca_ra0[0];
int iSlow2 = std::max<int>(0, std::min<int>(0, (iSlow0 + -1)));
int* fSoundfile0ca_of0 = fSoundfile0ca->fOffset;
float** fSoundfile0ca_bu0 = static_cast<float**>(fSoundfile0ca->fBuffers);
float* fSoundfile0ca_bu_ch0 = fSoundfile0ca_bu0[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
output0[i0] = FAUSTFLOAT(iSlow0);
output1[i0] = FAUSTFLOAT(iSlow1);
output2[i0] = FAUSTFLOAT(fSoundfile0ca_bu_ch0[(fSoundfile0ca_of0[0] + iSlow2)]);
}
fSoundfile0 = fSoundfile0ca;
}
Using the DSPToBoxes function
Complete DSP programs can be compiled to boxes using the DSPToBoxes
function, which takes a DSP program as a string, and returns the number of inputs/outputs and the created box:
static void test25(int argc, char* argv[])
{
createLibContext();
{
int inputs = 0;
int outputs = 0;
string error_msg;
// Create the oscillator
Box osc = DSPToBoxes("import(\"stdfaust.lib\"); process = os.osc(440);", &inputs, &outputs, error_msg);
// Compile it
dsp_factory_base* factory = createCPPDSPFactoryFromBoxes("FaustDSP", osc, argc, (const char**)argv, error_msg);
if (factory) {
factory->write(&cout);
delete(factory);
} else {
cerr << error_msg;
}
}
destroyLibContext();
}
The resulting box expression can possibly be reused in a more complex construction, as in the following example, where a filter is created using the DSPToBoxes
function, then called with a slider to control its frequency, and the actual input:
static void test26(int argc, char* argv[])
{
createLibContext();
{
int inputs = 0;
int outputs = 0;
string error_msg;
// Create the filter without parameter
Box filter = DSPToBoxes("import(\"stdfaust.lib\"); process = fi.lowpass(5);", &inputs, &outputs, error_msg);
// Create the filter parameters and connect
Box cutoff = boxHSlider("cutoff", boxReal(300), boxReal(100), boxReal(2000), boxReal(0.01));
Box cutoffAndInput = boxPar(cutoff, boxWire());
Box filteredInput = boxSeq(cutoffAndInput, filter);
bool res = getBoxType(filteredInput, &inputs, &outputs);
std::cout << "getBoxType inputs: " << inputs << " outputs: " << outputs << std::endl;
dsp_factory_base* factory = createCPPDSPFactoryFromBoxes("FaustDSP", filteredInput, argc, (const char**)argv, error_msg);
if (factory) {
factory->write(&cout);
delete(factory);
} else {
cerr << error_msg;
}
}
destroyLibContext();
}
Note that the getBoxType
function can be used to retrieve a given box number of inputs and outputs.
Defining more complex expressions: phasor and oscillator
More complex signal expressions can be defined, creating boxes using auxiliary definitions. So the following DSP program:
import("stdfaust.lib");
process = phasor(440)
with {
decimalpart(x) = x-int(x);
phasor(f) = f/ma.SR : (+ : decimalpart) ~ _;
};
Can be built using the following helper functions, here written in C:
static Box decimalpart()
{
return boxSub(boxWire(), boxIntCast(boxWire()));
}
static Box phasor(Box f)
{
return boxSeq(boxDiv(f, SR()),
boxRec(boxSplit(boxAdd(), decimalpart()), boxWire()));
}
And the main function combining them:
static void test17()
{
COMPILER
(
Box box = phasor(boxReal(440));
compile("test17", box);
)
}
Which produces the following compute
method:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
fRec0[0] = (fConst0 + (fRec0[1] - float(int((fConst0 + fRec0[1])))));
output0[i0] = FAUSTFLOAT(fRec0[0]);
fRec0[1] = fRec0[0];
}
}
Now the following oscillator:
import("stdfaust.lib");
process = osc(440), osc(440)
with {
decimalpart(x) = x-int(x);
phasor(f) = f/ma.SR : (+ : decimalpart) ~ _;
osc(f) = sin(2 * ma.PI * phasor(f));
};
Can be built with:
static Box osc(Box f)
{
return boxSin(boxMul(boxMul(boxReal(2.0), boxReal(3.141592653)), phasor(f)));
}
static void test18()
{
COMPILER
(
Box box = boxPar(osc(boxReal(440)), osc(boxReal(440)));
compile("test18", signals);
)
}
Which produces the following compute
method, where one can see that since the same oscillator signal is used on both outputs, it is actually computed once and copied twice:
virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
{
FAUSTFLOAT* output0 = outputs[0];
FAUSTFLOAT* output1 = outputs[1];
for (int i0 = 0; (i0 < count); i0 = (i0 + 1)) {
fRec0[0] = (fConst0 + (fRec0[1] - float(int((fConst0 + fRec0[1])))));
float fTemp0 = std::sin((6.28318548f * fRec0[0]));
output0[i0] = FAUSTFLOAT(fTemp0);
output1[i0] = FAUSTFLOAT(fTemp0);
fRec0[1] = fRec0[0];
}
}
Using the generated code
Using the LLVM or Interpreter backends allows to generate and execute the compiled DSP on the fly.
The LLVM backend can be used with createDSPFactoryFromBoxes
(see llvm-dsp.h) to produce a DSP factory, then a DSP instance:
string error_msg;
llvm_dsp_factory* factory = createDSPFactoryFromBoxes("FaustDSP",
box, 0,
nullptr, "",
error_msg);
// Check factory
dsp* dsp = factory->createDSPInstance();
// Check dsp
...
// Use dsp
...
// Delete dsp and factory
delete dsp;
deleteDSPFactory(factory);
The Interpreter backend can be used with createInterpreterDSPFactoryFromBoxes
(see interpreter-dsp.h) to produce a DSP factory, then a DSP instance:
string error_msg;
interpreter_dsp_factory* factory = createInterpreterDSPFactoryFromBoxes("FaustDSP",
box, 0,
nullptr, "",
error_msg);
// Check factory
dsp* dsp = factory->createDSPInstance();
// Check dsp
...
// Use dsp
...
// Delete dsp and factory
delete dsp;
deleteInterpreterDSPFactory(factory);
Connecting the audio layer
Audio drivers allow to render the DSP instance. Here is a simple code example using the dummyaudio audio driver:
// Allocate the audio driver to render 5 buffers of 512 frames
dummyaudio audio(5);
audio.init("Test", dsp);
// Render buffers...
audio.start();
audio.stop();
A more involved example using the JACK audio driver:
// Allocate the JACK audio driver
jackaudio audio;
audio.init("Test", dsp);
// Start real-time processing
audio.start();
....
audio.stop();
Connecting the controller layer
Controllers can be connected to the DSP instance using GUI architectures. Here is a code example using the GTKUI interface:
GUI* interface = new GTKUI("Test", &argc, &argv);
dsp->buildUserInterface(interface);
interface->run();
And all other standard controllers (MIDI, OSC, etc.) can be used as usual.
Example with audio rendering and GUI control
Here is a more complete example, first with the DSP code:
import("stdfaust.lib");
process = osc(f1), osc(f2)
with {
decimalpart(x) = x-int(x);
phasor(f) = f/ma.SR : (+ : decimalpart) ~ _;
osc(f) = sin(2 * ma.PI * phasor(f));
f1 = vslider("Freq1", 300, 100, 2000, 0.01);
f2 = vslider("Freq2", 500, 100, 2000, 0.01);
};
Then with the C++ code using the box API:
// Using the Interpreter backend.
static void test22(int argc, char* argv[])
{
interpreter_dsp_factory* factory = nullptr;
string error_msg;
createLibContext();
{
Box sl1 = boxHSlider("v:Oscillator/Freq1", boxReal(300),
boxReal(100), boxReal(2000), boxReal(0.01));
Box sl2 = boxHSlider("v:Oscillator/Freq2", boxReal(300),
boxReal(100), boxReal(2000), boxReal(0.01));
Box box = boxPar(osc(sl1), osc(sl2));
factory = createInterpreterDSPFactoryFromBoxes("FaustDSP",
box, 0,
nullptr, error_msg);
}
destroyLibContext();
// Use factory outside of the createLibContext/destroyLibContext scope
if (factory) {
dsp* dsp = factory->createDSPInstance();
assert(dsp);
// Allocate audio driver
jackaudio audio;
audio.init("Test", dsp);
// Create GUI
GTKUI gtk_ui = GTKUI("Organ", &argc, &argv);
dsp->buildUserInterface(>k_ui);
// Start real-time processing
audio.start();
// Start GUI
gtk_ui.run();
// Cleanup
audio.stop();
delete dsp;
deleteInterpreterDSPFactory(factory);
} else {
cerr << error_msg;
}
}
Generating the signals as an intermediate step
The boxesToSignals
function allows to compile a box in a list of signals, to be used with the signal API. The following example shows how the two steps (box => signals then signals => DSP factory) can be chained, rewriting the previous code as:
// Using the Interpreter backend.
static void test23(int argc, char* argv[])
{
interpreter_dsp_factory* factory = nullptr;
string error_msg;
createLibContext();
{
Box sl1 = boxHSlider("v:Oscillator/Freq1", boxReal(300),
boxReal(100), boxReal(2000), boxReal(0.01));
Box sl2 = boxHSlider("v:Oscillator/Freq2", boxReal(300),
boxReal(100), boxReal(2000), boxReal(0.01));
Box box = boxPar(osc(sl1), osc(sl2));
// Compile the 'box' to 'signals'
tvec signals = boxesToSignals(box, error_msg);
// Then compile the 'signals' to a DSP factory
factory = createInterpreterDSPFactoryFromSignals("FaustDSP",
signals, 0,
nullptr, error_msg);
}
destroyLibContext();
// Use factory outside of the createLibContext/destroyLibContext scope
if (factory) {
dsp* dsp = factory->createDSPInstance();
assert(dsp);
// Allocate audio driver
jackaudio audio;
audio.init("Test", dsp);
// Create GUI
GTKUI gtk_ui = GTKUI("Organ", &argc, &argv);
dsp->buildUserInterface(>k_ui);
// Start real-time processing
audio.start();
// Start GUI
gtk_ui.run();
// Cleanup
audio.stop();
delete dsp;
deleteInterpreterDSPFactory(factory);
} else {
cerr << error_msg;
}
}
Polyphonic MIDI controllable simple synthesizer
Here is a MIDI controlable simple synthesizer, first with the DSP code:
import("stdfaust.lib");
process = organ, organ
with {
decimalpart(x) = x-int(x);
phasor(f) = f/ma.SR : (+ : decimalpart) ~ _;
osc(f) = sin(2 * ma.PI * phasor(f));
freq = nentry("freq", 100, 100, 3000, 0.01);
gate = button("gate");
gain = nentry("gain", 0.5, 0, 1, 0.01);
organ = gate * (osc(freq) * gain + osc(2 * freq) * gain);
};
Then with the C++ code using the box API:
// Simple polyphonic DSP.
static void test24(int argc, char* argv[])
{
interpreter_dsp_factory* factory = nullptr;
string error_msg;
createLibContext();
{
// Follow the freq/gate/gain convention,
// see: https://faustdoc.grame.fr/manual/midi/#standard-polyphony-parameters
Box freq = boxNumEntry("freq",
boxReal(100),
boxReal(100),
boxReal(3000),
boxReal(0.01));
Box gate = boxButton("gate");
Box gain = boxNumEntry("gain",
boxReal(0.5),
boxReal(0),
boxReal(1),
boxReal(0.01));
Box organ = boxMul(gate, boxAdd(boxMul(osc(freq), gain),
boxMul(osc(boxMul(freq, boxInt(2))), gain)));
// Stereo
Box box = boxPar(organ, organ);
factory = createInterpreterDSPFactoryFromBoxes("FaustDSP",
box,
0, nullptr,
error_msg);
}
destroyLibContext();
// Use factory outside of the createLibContext/destroyLibContext scope
if (factory) {
dsp* dsp = factory->createDSPInstance();
assert(dsp);
// Allocate polyphonic DSP
dsp = new mydsp_poly(dsp, 8, true, true);
// Allocate MIDI/audio driver
jackaudio_midi audio;
audio.init("Organ", dsp);
// Create GUI
GTKUI gtk_ui = GTKUI("Organ", &argc, &argv);
dsp->buildUserInterface(>k_ui);
// Create MIDI controller
MidiUI midi_ui = MidiUI(&audio);
dsp->buildUserInterface(&midi_ui);
// Start real-time processing
audio.start();
// Start MIDI
midi_ui.run();
// Start GUI
gtk_ui.run();
// Cleanup
audio.stop();
delete dsp;
deleteInterpreterDSPFactory(factory);
} else {
cerr << error_msg;
}
}
Examples with the C API
The box API is also available as a pure C API. Here is one of the previous example rewritten using the C API to create box expressions, where the LLVM backend is used with the C version createCDSPFactoryFromBoxes
function (see llvm-dsp-c.h) to produce a DSP factory, then a DSP instance:
/*
import("stdfaust.lib");
process = phasor(440)
with {
decimalpart(x) = x-int(x);
phasor(f) = f/ma.SR : (+ : decimalpart) ~ _;
};
*/
static Box decimalpart()
{
return CboxSubAux(CboxWire(), CboxIntCastAux(CboxWire()));
}
static Box phasor(Box f)
{
return CboxSeq(CboxDivAux(f, SR()),
CboxRec(CboxSplit(CboxAdd(), decimalpart()), CboxWire()));
}
static void test1()
{
createLibContext();
{
Box box = phasor(CboxReal(2000));
char error_msg[4096];
llvm_dsp_factory* factory = createCDSPFactoryFromBoxes("test1",
box,
0, NULL,
"",
error_msg,
-1);
if (factory) {
llvm_dsp* dsp = createCDSPInstance(factory);
assert(dsp);
// Render audio
render(dsp);
// Cleanup
deleteCDSPInstance(dsp);
deleteCDSPFactory(factory);
} else {
printf("Cannot create factory : %s\n", error_msg);
}
}
destroyLibContext();
}
Here is an example using controllers and the PrintUI
architecture to display their parameters:
/*
import("stdfaust.lib");
freq = vslider("h:Oscillator/freq", 440, 50, 1000, 0.1);
gain = vslider("h:Oscillator/gain", 0, 0, 1, 0.01);
process = freq * gain;
*/
static void test3()
{
createLibContext();
{
Box freq = CboxVSlider("h:Oscillator/freq",
CboxReal(440),
CboxReal(50),
CboxReal(1000),
CboxReal(0.1));
Box gain = CboxVSlider("h:Oscillator/gain",
CboxReal(0),
CboxReal(0),
CboxReal(1),
CboxReal(0.011));
Box box = CboxMulAux(freq, CboxMulAux(gain, CboxWire()));
char error_msg[4096];
llvm_dsp_factory* factory = createCDSPFactoryFromBoxes("test3",
box, 0,
NULL, "",
error_msg,
-1);
if (factory) {
llvm_dsp* dsp = createCDSPInstance(factory);
assert(dsp);
printf("=================UI=================\n");
// Defined in PrintCUI.h
metadataCDSPInstance(dsp, &mglue);
buildUserInterfaceCDSPInstance(dsp, &uglue);
// Cleanup
deleteCDSPInstance(dsp);
deleteCDSPFactory(factory);
} else {
printf("Cannot create factory : %s\n", error_msg);
}
}
destroyLibContext();
}
All presented C examples (as well as some more) are defined in the box-tester-c tool, to be compiled with make box-tester-c
in the tools/benchmark folder.


Dual-Pivot Quicksort and Beyond: Analysis of Multiway Partitioning and Its Practical Potential
In my dissertation I analyze a parametric scheme of Quicksort variants with an arbitrary number of pivots. Using the mathematical analysis, I discuss in detail, which choices for parameters look promising.
My dissertation won the GI Dissertationspreis 2016 jointly awarded by GI, SI and OCG for the best thesis in computer science in Germany, Switzerland and Austria (announcement).
While writing it up, the dissertation grew into a sizable collection of mathematical tools for the analysis of Quicksort. I summarized the main algorithmic findings in an invited article in self-contained form.
Generic one-pass multiway partitioning
The parametric partitioning algorithm that I consider
- partitions the input into $s$ segments at once (around $s-1$ pivots),
- chooses these pivots as order statistics from a sample according to the sampling parameter $\mathbf t$,
- works in “one pass” over the array, growing $\lceil m\rceil$ segments from the left and $s-\lfloor m\rfloor$ segments from the right, where $0\le m\le s$ is another parameter.
The analysis covers the average costs of Quicksort with any choice of the above parameters.
Equal Keys
Chapter 8 of my dissertation contains an analysis of generic $s$-way Quicksort on inputs with equal elements. I describe the result in more details in the context of the follow-up ANALCO paper on Quicksort with equal keys.
For the case of a random string drawn uniformly from all length-$n$-strings over the alphabet $ \lbrace 1,\ldots,u \rbrace $, my dissertation gives a general asymptotic solution (Theorem 8.17). This case is particularly nice in that—under the assumption that $n\gg u$—the costs for Quicksort have the same form as for random permutations, only with $\ln(n)$ replaced by $\ln({\color{red!50!black}u})$.
I presented this part of the analysis in Dagstuhl, see the slides on slideshare.
Relation to Other Publications
The analyses in my dissertation build on my papers on YBB Quicksort, in particular Analysis of Pivot Sampling in Dual-Pivot Quicksort, and are an extension thereof.
The analysis of Quicksort with equal keys is an extension of Chapter 8 of my dissertation.
Entropy-Equivalent Sampling
A key idea to fairly compare different $s$-way Quicksort variants is that of entropy-equivalent sampling: Choose one single pivot of the same quality as the $s-1$ pivots chosen according to sampling parameter $\mathbf t$. I found a way to do that for any $\mathbf t$ so that one can exactly simulate the subproblem-shrinking effect of one $s$-way partitioning round by a certain number of binary partitioning rounds.
We can then fairly compare the intrinsic values of a certain partitioning method without having pivots of different quality skewing the picture.
This idea is explained in the slides linked above from my defense talk. A second set of slides from a more comprehensive 1h-talk about the topic is also available.
Printed Version
A nice hardcover version is available (for under 40 USD for a nicely printed full-color hardcover book) from IngramSpark, a large print-on-demand publisher. Check here where to buy.
Errata for Print Version
The print version is essentially identical to the archive version in KLUEDO (urn above). Various (harmless) typos have been spotted afterwards, but also the following errors. The pdf version on this site always contains the most current version in which these errors have been corrected.
- p 146 Algorithm 8: The case distinction in line 17 should only be executed if $k\le g$ holds.


Software Engineering Leadership Resources
Recommended books
Radical Candor
Leaders Eat Last
The Manager's Path


A summary/detail list:
Hot List
A list of hot beverages, by type.
Coffee List
Some coffee drinks
▻
coffee 1
▻
coffee 2
Tea List
▻
tea 1
▻
tea 2
Cold List
A list of cold beverages, by type.
Water List
▻
water 1
▻
water 2
Beer List
Some beers
▻
beer 1
▻
beer 2
Wine List
Red Wine List
Some red wines
▻
red wine 1
▻
red wine 2
White Wine List
▻
white wine 1
▻
white wine 2