Subject: Neo4j Knowledge Graph
Language: TypeScript (node)
Repo: git@github.com:wwlib/neo4j-knowledge-graph.git
Related: Electron-based Graph Editor Tool: https://wwlib.github.io/graph-editor/
https://wwlib.github.io/neo4j-knowledge-graph/
https://github.com/wwlib/neo4j-knowledge-graph
An example of a simple, queryable knowledge graph implemented using neo4j with a node command line interface implemented in TypeScript.
Knowledge Graph Demo Demo Running on Jibo (YouTube):
Note: The code described in this post is based on an example that I worked on with Roberto Pieraccini (http://robertopieraccini.com/home/) at Jibo, Inc. We used a similar example to test a knowledge-graph-enhanced dialog running on Jibo (as seen in the video referenced above)
Note: A nice tool for viewing and live-editing neo4j graphs is called Graph Editor and is available at http://wwlib.org/graph-editor/
Overview video (YouTube): https://www.youtube.com/embed/YFRiWiZJPkU
One way to enhance NLU-driven dialog interactions is to make use of a knowledge graph. This example uses a neo4j graph (database) to store and query a knowledge graph (kg) containing information about animals. This simple example kg represents the relationships between a robot, and handful of animals, a few animal types and a couple of humans.
This command-line version uses node-nlp by default and can be configured to use Microsoft's LUIS NLU. A neo4j graph database is also required (ideally an empty graph). Some setup is required to get started.
1 - Clone and install the neo4j-knowledge-graph repo
git clone git@github.com:wwlib/neo4j-knowledge-graph.git
cd neo4j-knowledge-graph
yarn
The project looks like this:
2 - NLU (optional: create a LUIS NLU agent by uploading the included agent description file to your LUIS account:
See the NLU screenshots at the end of this post for descriptions of the LUIS agent.
3 - Neo4j Download and install the free Neo4j Desktop app from https://neo4j.com/download-neo4j-now/ and create a new graph.
Start the graph and access it in the browser at: http://localhost:7474/browser/
To populate the graph, paste the contents of docs/animals.cypher into the neo4j browser query field. Then verify that the graph is ready by entering this cypher into the browser query field:
MATCH (n) return n limit 100
The result should look like the image below.
To see just the animal relationships, enter this cypher into the browser query field:
match (n)-[r:IS_A]-(m) return n, r, m
The result should look like the image below
4 - Configuring the neo4j-knowledge-graph command-line app
Copy data/config-example.json
and rename it data/config.json
Fill out the user and password fields for your neo4j graph. (optional: fill out the access credentials for your LUIS agent).
{
"luis": {
"endpoint": "",
"appId": "",
"subscriptionKey": ""
},
"neo4j": {
"url": "bolt://localhost:7687",
"user": "neo4j",
"password": ""
}
}
Save the data/config.json
file.
In a terminal window, in the neo4j-knowledge-graph
directory, build and run the command line app:
yarn build
yarn debug
If everything is setup correctly, you should should be prompted with:
Ask a do-you-like question or say “[user] likes [something]”
Try asking (typing): do you like penguins
The response should look like the screen below:
The example graph contains a set of animal-related nodes and relationships that looks like this (as seen in Graph Editor):
The graph also contains nodes and relationship relating a robot and a couple of users to the animals:
According to the graph, the robot likes Flies, Zebras, Whales, Armadillos, Flamingos, and Penguins. Andrew likes whales. Cynthia likes the robot. Asking, “do you like whales” produces the response below: “You know it. One of my favorite animals...and I know that Andrew likes them too.”
Note: In the Penguin node has a special RobotLikes property which is used in the response. A generic response is generated for nodes that do not have this property.
To answer the question, “Do you like bats”, the app must make an upward reference because the robot does not have a direct LIKES relationship to bats. The app checks the bat’s parent node, AnimalType (Mammal), and then responds with a list of mammals that the robot does like:
“I don’t know if I like bats, but they are Mammals and I do like Mammals. Of all the Mammals I like Armadillos, Zebras, and Whales.”
The graph can be modified by asserting that a user likes something. For example, asserting that “cynthia likes penguins” produces the result:
OK. I understand that cynthia likes penguins. That’s cool.
Querying the graph now reveals that the fact that Cynthia likes penguins has been incorporated:
match (n)-[r:LIKES]-(m) return n, r, m
Now, asking if the robot likes penguins produces a response that includes the new information about Cynthia:
When asking about an AnimalType, like ‘Animal’, the answer will include all of the descendants that are liked by the robot.
This simple example offers a quick way to incorporate a knowledge graph into a dialog interaction. As seen in the intro video (at the start of the post) when this kind of interaction is embodied by a social robot like Jibo, the experience is compelling - especially when the app/robot remembers information asserted by the user.
The example suggests that knowledge graphs may offer a path to take to making automated dialog significantly more human-like


Use the slider to indicate relative importance. If they are equally important leave the slider where it is.
AHP works best if you keep your comparisons close to transitive.
When you are done, scroll down and click "compute weights".
| {{pair.left.name}} | {{pair.right.name}} | {{CONVERSIONS[pair.score] | number:'.2-2'}} |


Review: WAKING NED DEVINE
Starring: Ian Bannen, David Kelly
Review by: Joy Wyse
There is more than one definition for the word, Wake, and when you learn that this is an Irish movie, you realize which definition it has. This is a truly enjoyable, funny film from the moment it begins until the final sunset.
There are few people who haven't dreamed of winning the lottery. All those millions of dollars would certainly change our lives, but how? Would we spend it? Invest it? Give it away? Share it with friends? When a winning lottery ticket is sold in the town of Tulaigh Mhor, Ireland, a town of only 52 residents, the question is….who owns the ticket?
Ian Bannen and David Kelly set out to uncover the winner by being especially nice to the one[s] they suspect hold the coveted ticket. First, they buy drinks for `Pig' Finn when he suddenly appears in a sports car. Then, the lady at the post office [who sold the ticket]. But, the real comedy begins when they discover that Ned Devine bought the winner, and the shock of seeing the numbers was too much for him. As Ned had no heirs, the money will go to the state. They are sure that Ned wouldn't have wanted that to happen, so they concoct a scheme to claim the jackpot for themselves.
The humor that follows is clever and original. There is a scene with David Kelly on a motor scooter that will stay in my memory for years. The telling of the plot cannot take the place of seeing it for yourself. In the course of the story, you learn about most of the 52 residents of the town. You get to know them and you care about their lives. And, the question remains, what would Ned Devine have done with the money? The plot takes one turn after another, but they are always believable. You can foresee some of the things that occur, but they aren't always what you expect.
An audience member remarked to me that she was surprised that there were no four-letter words in an Irish movie. It was a strange statement, I thought. The same could be said about American movies. Waking Ned Devine is an excellent example of wonderful dialogue that doesn't need to stoop to that level for humor.
I cannot wait to see this movie again. And, I want to take others to see it as well. I hope that this gets the same word of mouth that `The Full Monty' got. People who see it will love it, even though there are no big name stars. I give it an A-.
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


Mingyue Lay Buddhist Temple
The Mingyue Lay Buddhist Temple is today a massive building of about 16 000 square meters.... Its gestation dates back to 1985 - during the year of Yi Chon of the Chinese lunar calendar - when a group of local Chinese residents, native mainly from the Cantonese speaking southern region of Si Jiu, began planning the construction of the temple.Pha That Luang Vientiane
Pha That Luang is a gold-covered large Buddhist stupa in the centre of the city of Vientiane...Laos. Since its initial establishment, suggested to be in the 3rd century, the stupa has undergone several reconstructions as recently as the 1930s due to foreign invasions of the area.Wat Benchamabophit
Wat Benchamabophit Dusitvanaram is a Buddhist temple in the Dusit District of Bangkok ...Thailand. Also known as the marble temple, it is one of Bangkok's best-known temples and a major tourist attraction. It typifies Bangkok's ornate style of high gables, stepped-out roofs and elaborate finials.Lama Temple
The Yonghe Temple, also known as the Yonghe Lamasery, or popularly as the... Lama Temple, is a temple and monastery of the Gelug school of Tibetan Buddhism located in Dongcheng District, Beijing, China. The building and artwork of the temple is a combination of Han Chinese and Tibetan styles.BOUDHANATH STUPA
Boudha is a stupa in Kathmandu, Nepal. Located about 11 km from the center... and northeastern outskirts of Kathmandu, the stupa's massive mandala makes it one of the largest spherical stupas in Nepal. The Boudha Stupa dominates the skyline; it is one of the largest stupas in the world.


--- layout: post title: Errors in Upgrade from Fedora 21 to Fedora 22 date: 2015-09-28 21:31:57.000000000 +08:00 type: post published: true status: publish categories: - Linux系统 tags: [] meta: _edit_last: '1' views: '48' author: login: lanbing email<EMAIL_ADDRESS>display_name: lanbing first_name: '' last_name: '' ---
1. Make sure your current system is up-to-date and backed upFirst up, ensure that you have the most up-to-date version of Fedora 21 by updating your system using the Software application, or running the following command in the terminal:
sudo dnf update2. Install the FedUp tool
Now, open up a Terminal and install FedUp package by using the following command line:
sudo dnf install fedup3. Start the update with FedUp
Now your system is fully up-to-date, start the upgrade using the following command:
sudo fedup --network 22This command will tell FedUp to download all the appropriate packages from the Fedora repositories, and prep your system for the upgrade.
4. Reboot, and upgradeOnce the FedUp command from step 3 has completed without errors, reboot your system. In the Fedora Boot Menu (i.e. grub), there will be a menu item “System Upgrade”, select that and press enter.
Boot menu with System Upgrade (fedup) option selected
Boot menu with update option selected
All the appropriate packages and upgrade tasks will now be completed automatically, and when completed you will be able to start using your newly upgraded Fedora system.
# fedup --network 22 setting up repos... Error: can't get boot images. The installation repo isn't currently available. Try again later, or specify a repo using --instrepo.
Using --instrepo To special a repo :
[lanbing@LanBing-PC ~]$ setting up repos...
getting boot images...
Downloading failed: couldn't get boot images: No more mirrors to try.
Last error was: [Errno 14] curl#56 - "Proxy CONNECT aborted"
Change the /etc/yum.conf
file to disable Proxy settings ,


Brandon Craig Rhodes
30 June 2003
This Guide introduces the reader to the PostgreSQL tsearch2 module, version 2. More formal descriptions of the module's types and functions are provided in the tsearch2 Reference, which is a companion to this document. You can retrieve a beta copy of the tsearch2 module from the GiST for PostgreSQL page — look under the section entitled Development History for the current version.
First we will examine the tsvector and tsquery types and how they are used to search documents; next, we will use them to build a simple search engine in SQL; and finally, we will study the internals of document conversion and how you might tune the internals to accommodate various searching needs.
Once you have tsearch2 working with PostgreSQL, you should be able to run the examples here exactly as they are typed.
Vectors and Queries
A Simple Search Engine
Ranking and Position Weights
Casting Vectors and Queries
Parsing and Lexing
This section introduces the two data types upon which tsearch2 search engines are based, and illustrates their interaction using the simplest possible case. The complex examples we present later on are merely variations and elaborations of this basic mechanism.
The tsearch2 module allows you to index documents by the words they contain, and then perform very efficient searches for documents that contain a given combination of words. Preparing your document index involves two steps:
The default tsearch2 configuration, which we will learn more about later, provides a good example of a process for reducing documents to vectors:
=# SELECT set_curcfg('default') =# SELECT to_tsvector('The air smells of sea water.') to_tsvector ------------------------------------- 'air':2 'sea':5 'smell':3 'water':6 (1 row)Note the complex relationship between this document and its vector. The vector lists only words from the document — spaces and punctuation have disappeared. Common words like the and of have been eliminated. The -s that makes smells a plural has been removed, leaving a lexeme that represents the word in its simplest form. And finally, though the vector remembers the positions in which each word appeared, it does not store the lexemes in that order.
Keeping word positions in your vectors is optional, by the way. The positions are necessary for the tsearch2 ranking functions, which you can use to prioritize documents based on how often each document uses the search terms and whether they appear in close proximity. But if you do not perform ranking, or use your own process that ignores the word positions stored in the vector, then you can save space by stripping them from your vectors:
=# SELECT strip(to_tsvector('The air smells of sea water.')) strip ----------------------------- 'air' 'sea' 'smell' 'water' (1 row)Now that we have a procedure for creating vectors, we can build an indexed table of vectors very simply:
=# CREATE TABLE vectors ( vector tsvector ) =# CREATE INDEX vector_index ON vectors USING gist(vector) =# INSERT INTO vectors VALUES (to_tsvector('The path forks here')) =# INSERT INTO vectors VALUES (to_tsvector('A crawl leads west')) =# INSERT INTO vectors VALUES (to_tsvector('The left fork leads northeast')) =# SELECT * FROM vectors vector ------------------------------------------ 'fork':3 'path':2 'lead':3 'west':4 'crawl':2 'fork':3 'lead':4 'left':2 'northeast':5 (3 rows)Now we can search this collection of document vectors using the @@ operator and a tsquery that specifies the combination of lexemes we are looking for. Note that while vectors simply list lexemes, queries always combine them with the operators ‘&’ and, ‘|’ or, and ‘!’ not, plus parentheses for grouping. Some examples of the query syntax:
| ‘find documents with the word forks in them’ | 'forks' |
| ‘... with both forks and leads’ | 'forks & leads' |
| ‘... with either forks or leads’ | 'forks | leads' |
| ‘... with either forks or leads,
but without crawl’ | '(forks|leads) & !crawl' |
=# SELECT to_tsquery('(leads|forks) & !crawl') to_tsquery -------------------------------- ( 'lead' | 'fork' ) & !'crawl' (1 row)Again, this is critically important because the search operator @@ only finds exact matches between the words in a query and the words in a vector; if the document vector lists the lexeme fork but the query looks for the plural form forks, the query would not match that document. Thanks to the symmetry between our process for producing vectors and queries, however, the above searches return correct results:
=# SELECT * FROM vectors WHERE vector @@ to_tsquery('(leads|forks) & !crawl') vector ------------------------------------------ 'fork':3 'path':2 'fork':3 'lead':4 'left':2 'northeast':5 (2 rows)You may want to try the other queries shown above, and perhaps invent some of your own.
You should not include stop words in a query, since you cannot search for words you have discarded. If you throw out the word the when building vectors, for example, your index will obviously not know which documents included it. The to_tsquery() function will automatically detect this and give you an error to prevent this mistake:
=# SELECT to_tsquery('the') NOTICE: Query contains only stopword(s) or doesn't contain lexem(s), ignored to_tsquery ------------ (1 row)But if you every build vectors and queries using your own routines, a possibility we will discuss later, then you will need to enforce this rule yourself.
Now that you understand how vectors and queries work together, you are prepared to tackle many additional topics: how to distribute searching across many servers; how to customize the process by which tsearch2 turns documents and queries into lexemes, or use a process of your own; and how to sort and display search results to your users. But before discussing these detailed questions, we will build a simple search engine to see how easily its basic features work together.
In this section we build a simple search engine out of SQL functions that use the vector and query types described in the previous section. While this example is simpler than a search engine that has to interface with the outside world, it will illustrate the basic principles of building a search engine, and better prepare you for developing your own.Building a search engine involves only a few improvements upon the rudimentary vector searches described in the last section.
We can easily construct a simple search engine that accomplishes these goals. First we build a table that, for each document, stores a unique identifier, the full text of the document, and its tsvector:
=# CREATE TABLE docs ( id SERIAL, doc TEXT, vector tsvector ) =# CREATE INDEX docs_index ON docs USING gist(vector);Note that although searches will still work on tables where you have neglected to create a gist() index over your vectors, they will run much more slowly since they will have to compare the query against every document vector in the table.
Because the table we have created stores each document in two different ways — both as text and as a vector — our INSERT statements must provide the document in both forms. While more advanced PostgreSQL programmers might accomplish this with a database trigger or rule, for this simple example we will use a small SQL function:
=# CREATE FUNCTION insdoc(text) RETURNS void LANGUAGE sql AS 'INSERT INTO docs (doc, vector) VALUES ($1, to_tsvector($1));'Now, by calling insdoc() several times, we can populate our table with documents:
=# SELECT insdoc('A low crawl over cobbles leads inward to the west.') =# SELECT insdoc('The canyon runs into a mass of boulders -- dead end.') =# SELECT insdoc('You are crawling over cobbles in a low passage.') =# SELECT insdoc('Cavernous passages lead east, north, and south.') =# SELECT insdoc('To the east a low wide crawl slants up.') =# SELECT insdoc('You are in the south side chamber.') =# SELECT insdoc('The passage here is blocked by a recent cave-in.') =# SELECT insdoc('You are in a splendid chamber thirty feet high.')Now we can build a search function. Its SELECT statement is based upon the same @@ operation illustrated in the previous section. But instead of returning matching vectors, we return for each document its SERIAL identifier, so the user can retrieve it later; a headline that illustrates its use of the search terms; and a ranking with which we also order the results. Our search operation can be coded as a single SELECT statement returning its own kind of table row, which we call a finddoc_t:
=# CREATE TYPE finddoc_t AS (id INTEGER, headline TEXT, rank REAL) =# CREATE FUNCTION finddoc(text) RETURNS SETOF finddoc_t LANGUAGE sql AS ' SELECT id, headline(doc, q), rank(vector, q) FROM docs, to_tsquery($1) AS q WHERE vector @@ q ORDER BY rank(vector, q) DESC'This function is a rather satisfactory search engine. Here is one example search, after which the user fetches the top-ranking document itself; with similar commands you can try queries of your own:
=# SELECT * FROM finddoc('passage|crawl') id | headline | rank ----+-------------------------------------------------------+------ 3 | crawling over cobbles in a low passage. | 0.19 1 | crawl over cobbles leads inward to the west. | 0.1 4 | passages lead east, north, and south. | 0.1 5 | crawl slants up. | 0.1 7 | passage here is blocked by a recent cave-in. | 0.1 (5 rows) =# SELECT doc FROM docs WHERE id = 3 doc ------------------------------------------------- You are crawling over cobbles in a low passage. (1 row)While by default the headline() function surrounds matching words with  and  in order to distinguish them from the surrounding text, you can provide options that change its behavior; consult the tsearch2 Reference for more details about Headline Functions.
Though a search may match hundreds or thousands of documents, you will usually present only ten or twenty results to the user at a time. This can be most easily accomplished by limiting your query with a LIMIT and an OFFSET clause — to display results ten at a time, for example, your would generate your first page of results with LIMIT 10 OFFSET 0, your second page with LIMIT 10 OFFSET 10, your third page with LIMIT 10 OFFSET 20, and so forth. There are two problems with this approach, however.
The first problem is the strain of running the query over again for every page of results the user views. For small document collections or lightly loaded servers, this may not be a problem; but the impact can be high when a search must repeatedly rank and sort the same ten thousand results on an already busy server. So instead of selecting only one page of results, you will probably use LIMIT and OFFSET to return a few dozen or few hundred results, which you can cache and display to the user one page at a time. Whether a result cache rewards your effort will depend principally on the behavior of your users — how often they even view the second page of results, for instance.
The second issue solved by caching involves consistency. If the database is changing while the user browses their results, then documents might appear and disappear as they page through them. In some cases the user might even miss a particular result — perhaps the one they were looking for — if, say, its rank improves from 31th to 30th after they load results 21–30 but before they view results 31–40. While many databases are static or infrequently updated, and will not present this problem, users searching very dymanic document collections might benefit from the stable results that caches yield.
Having seen the features of a search engine implemented entirely within the database, we will learn about some specific tsearch2 features. First we will look in more detail at document ranking.
When we built our simple search engine, we used the rank() function to order our results. Here we describe tsearch2 ranking in more detail.There are two functions with which tsearch2 can rank search results. They both use the lexeme positions listed in the tsvector, so you cannot rank vectors from which these have been removed with strip(). The rank() function existed in older versions of OpenFTS, and has the feature that you can assign different weights to words from different sections of your document. The rank_cd() uses a recent technique for weighting results but does not allow different weight to be given to different sections of your document.
Both ranking functions allow you to specify, as an optional last argument, whether you want their results normalized — whether the rank returned should be adjusted for document length. Specifying a last argument of 0 (zero) makes no adjustment; 1 (one) divides the document rank by the logarithm of the document length; and 2 divides it by the plain length. In all of these examples we omit this optional argument, which is the same as specifying zero — we are making no adjustment for document length.
The rank_cd() function uses an experimental measurement called cover density ranking that rewards documents when they make frequent use of the search terms that are close together in the document. You can read about the algorithm in more detail in Clarke et al., “Relevance Ranking for One to Three Term Queries.” An optional first argument allows you to tune their formula; for details see the section on ranking in the Reference.
The rank() function offers more flexibility because it pays attention to the weights with which you have labelled lexeme positions. Currently tsearch2 supports four different weight labels: 'D', the default weight; and 'A', 'B', and 'C'. All vectors created with to_tsvector() assign the weight 'D' to each position, which as the default is not displayed when you print a vector out.
If you want positions with weights other than 'D', you have two options: either you can author a vector directly through the ::tsvector casting operation, as described in the following section, which lets you give each position whichever weight you want; or you can pass a vector through the setweight() function which sets all of its position weights to a single value. An example of the latter:
=# SELECT vector FROM docs WHERE id = 3 vector ---------------------------------------- 'low':8 'cobbl':5 'crawl':3 'passag':9 (1 row) =# SELECT setweight(vector, 'A') FROM docs WHERE id = 3 setweight -------------------------------------------- 'low':8A 'cobbl':5A 'crawl':3A 'passag':9A (1 row)Merely changing all of the weights in a vector is not very useful, of course, since this results still in all words having the same weight. But if we parse different parts of a document separately, giving each section its own weight, and then concatenate the vectors of each part into a single vector, the result can be very useful. We can construct a simple example in which document titles are given greater weight that text in the body of the document:
=# CREATE TABLE tdocs ( id SERIAL, title TEXT, doc TEXT, vector tsvector ) =# CREATE INDEX tdocs_index ON tdocs USING gist(vector); =# CREATE FUNCTION instdoc(text, text) RETURNS void LANGUAGE sql AS 'INSERT INTO tdocs (title, doc, vector) VALUES ($1, $2, setweight(to_tsvector($1), ''A'') || to_tsvector($2));'Now words from a document title will be weighted differently than those in the main text if we provide the title and body as separate arguments:
=# SELECT instdoc('Spendid Chamber', 'The walls are frozen rivers of orange stone.') instdoc --------- (1 row) =# SELECT vector FROM tdocs vector ------------------------------------------------------------------------------ 'wall':4 'orang':9 'river':7 'stone':10 'frozen':6 'chamber':2A 'spendid':1A (1 row)Note that although the necessity is unusual, you can constrain search terms to only match words from certain sections by following them with a colon and a list of the sections in which the word can occur; by default this list is 'ABCD' so that search terms match words from all sections. For example, here we search for a word both generally, and then looking only for specific weights:
=# SELECT title, doc FROM tdocs WHERE vector @@ to_tsquery('spendid') title | doc -----------------+---------------------------------------------- Spendid Chamber | The walls are frozen rivers of orange stone. (1 row) =# SELECT title, doc FROM tdocs WHERE vector @@ to_tsquery('spendid:A') title | doc -----------------+---------------------------------------------- Spendid Chamber | The walls are frozen rivers of orange stone. (1 row) =# SELECT title, doc FROM tdocs WHERE vector @@ to_tsquery('spendid:D') title | doc -------+----- (0 rows)
Our examples so far use tsearch2 to parse our documents into vectors. When your application needs absolute control over vector content, you will want to use direct type casting, which is described in the next section.
While tsearch2 has powerful and flexible ways to process documents and turn them into document vectors, you will sometimes want to parse documents on your own and place the results directly in vectors. Here we show you how.In the preceding examples, we used the to_tsvector() function when we needed a document's text reduced to a document vector. We saw that the function stripped whitespace and punctuation, eliminated common words, and altered suffixes to reduce words to a common form. While these operations are often desirable, and while in the sections below we will gain precise control over this process, there are occasions on which you want to avoid the changes that to_tsvector() makes to text and specify explicitly the words that you want in your vectors. Or you may want to create queries directly rather than through to_tsquery().
For example, you may have already developed your own routine for reducing your documents to searchable lexemes, and do not want your carefully generated terms altered by passing them through to_tsvector(). Or you might be developing and debugging parsing routines of your own that you are not ready to load into the database. In either case, you will find that direct insertion is easily accomplished if you simply follow some simple rules.
Vectors are created directly when you cast a string of whitespace separated lexemes to the tsvector type:
=# select 'the only exit is the way you came in'::tsvector tsvector -------------------------------------------------- 'in' 'is' 'the' 'way' 'you' 'came' 'exit' 'only' (1 row)Notice that the conversion interpreted the string simply as a list of lexemes to be included in the vector. Their order was lost, as was the number of times each lexeme appeared. You must keep in mind that directly creating vectors with casting is not an alternate means of parsing; it is a way of directly entering lexemes into a vector without parsing.
Queries can also be created through casting, if you separate lexemes with boolean operators rather than with whitespace. When creating your own vectors and queries, remember that the search operator @@ finds only exact matches between query lexemes and vector lexemes — if they are not exactly the same string, they will not be considered a match.
To include lexeme positions in your vector, write the positions exactly the way tsearch2 displays them when it prints vectors: by following each lexeme with a colon and a comma-separated list of integer positions. If you list a lexeme more than once, then all the positions listed for it are combined into a single list. For example, here are two ways of writing the same vector, depending on whether you mention ‘the’ twice or combine its positions into a list yourself:
=# select 'the:1 only:2 exit:3 is:4 the:5 way:6 you:7 came:8 in:9'::tsvector tsvector -------------------------------------------------------------------- 'in':9 'is':4 'the':1,5 'way':6 'you':7 'came':8 'exit':3 'only':2 (1 row) =# select 'the:1,5 only:2 exit:3 is:4 way:6 you:7 came:8 in:9'::tsvector tsvector -------------------------------------------------------------------- 'in':9 'is':4 'the':1,5 'way':6 'you':7 'came':8 'exit':3 'only':2 (1 row)Things can get slightly tricky if you want to include apostrophes, backslashes, or spaces inside your lexemes (wanting to include either of the latter would be unusual, but they can be included if you follow the rules). The main problem is that the apostrophe and backslash are important both to PostgreSQL when it is interpreting a string, and to the tsvector conversion function. You may want to review section <IP_ADDRESS>, “String Constants” in the PostgreSQL documentation before proceeding.
When you cast strings directly into vectors:
| For the lexeme... | you need the string... | which you can type as: |
| nugget | nugget | 'nugget' |
| won't | won't | 'won''t' |
| pinin' | pinin' | 'pinin''' |
| 'bout | \'bout | '\\''bout' |
| white mist | white\ mist | 'white\\ mist' |
| or: | 'white mist' | '''white mist''' |
| won't budge | won\'t\ budge | 'won\\''t\\ budge' |
| or: | 'won\'t budge' | '''won\\''t budge''' |
| back\slashed | back\\slashed | 'back\\\\slashed' |
Position weights are described below and can be written exactly as they will be displayed when you select a weighted vector:
=# select 'weighty:1,3A trivial:2B,4'::tsvector tsvector ------------------------------- 'trivial':2B,4 'weighty':1,3A (1 row)
Note that if you are composing SQL queries in a scripting language like Perl or Python, that itself considers quotes and backslashes special, then you may have another quoting layer to deal with on top of the two layers already shown above. In such cases you may want to write a function that performs the necessary quoting for you.
Having seen how to create vectors of your own, it is time to learn how the native tsearch2 parser reduces documents to vectors.
The previous section described how you can bypass the parser provided by tsearch2 and populate your table of documents with vectors of your own devising. But for those interested in the native tsearch2 facilities, we present here an overview of how it goes about reducing documents to vectors.The to_tsvector() function reduces documents to vectors in two stages. First, a parser breaks the input document into short sequences of text called tokens. Each token is usually a word, space, or piece of punctuation, though some parsers return larger and more exotic items like HTML tags as single tokens. Each token returned by the parser is either discarded or passed to a dictionary that converts it into a lexeme. The resulting lexemes are collected into a vector and returned.
The choice of which parser and dictionaries to_tsvector() should use is controlled by your choice of configuration. The tsearch2 module comes with several configurations, and you can define more of your own; in fact the creation of a new configuration is illustrated below, in the section on position weights.
To learn about parsing in more detail, we will study this example:
=# select to_tsvector('default', 'The walls extend upward for well over 100 feet.') to_tsvector ---------------------------------------------------------- '100':8 'feet':9 'wall':2 'well':6 'extend':3 'upward':4 (1 row)Unlike the to_tsvector() calls used in the above examples, this one specifies the 'default' configuration explicitly. When we called to_tsvector() in earlier examples with only one argument, it used the current configuration, which is chosen automatically based on your LOCALE if that locale is mentioned in the pg_ts_cfg table (which is shown under the first bullet in the description below). If your locale is not listed in the table, your attempts to use the current configuration will return:
ERROR: Can't find tsearch2 config by localeYou can always change the current configuration manually by calling the set_curcfg() function described in the section on Configurations in the Reference.
Each configuration serves as an index into two different tables: in pg_ts_cfg it determines which parser will break our text into tokens, and in pg_ts_cfgmap it directs each token to a dictionary for processing. The steps in detail are:
First, our text is parsed, using the parser listed for our configuration in the pg_ts_cfg table. We are using the 'default' configuration, so the table tells us to use the 'default' parser:
=# SELECT * FROM pg_ts_cfg WHERE ts_name = 'default' ts_name | prs_name | locale ---------+----------+-------- default | default | C (1 row)So our text will be parsed as though we had called:
=# select * from parse('default', 'The walls extend upward for well over 100 feet.')This breaks the text into a list of tokens which are each labelled with an integer type:
The1♦12walls1♦12extend1♦12upward1♦12for1♦12well1♦12over1♦1210022♦12feet1.12
Each word has been assigned type 1; each space (represented here by a diamond) and the period, type 12; and the number one hundred, type 22. We can retrieve the alias for each type through the token_type function:
=# select * from token_type('default') where tokid = 1 or tokid = 12 or tokid = 22 tokid | alias | descr -------+-------+------------------ 1 | lword | Latin word 12 | blank | Space symbols 22 | uint | Unsigned integer (3 rows)
=# select * from pg_ts_cfgmap where ts_name = 'default' and (tok_alias = 'lword' or tok_alias = 'blank' or tok_alias = 'uint') ts_name | tok_alias | dict_name ---------+-----------+----------- default | lword | {en_stem} default | uint | {simple} (2 rows)Since this map provides no dictionary for blank tokens, the spaces and period are simply discarded, leaving nine tokens, which are then numbered by their position:
The1 walls2 extend3 upward4 for5 well6 over7 1008 feet9
=# select lexize('simple', '100') lexize -------- {100} (1 row)The other words are submitted to en_stem which reduces each English word to a linguistic stem, and then discards stems which belong to its list of stop words; you can see the list of stop words in the file whose path is in the dict_initoption field of the pg_ts_dict table entry for en_stem. The first three words of our text illustrate respectively an en_stem stop word, a word which en_stem alters by stemming, and a word which en_stem leaves alone:
=# select lexize('en_stem', 'The') lexize -------- {} (1 row) =# select lexize('en_stem', 'walls') lexize -------- {wall} (1 row) =# select lexize('en_stem', 'extend') lexize ---------- {extend} (1 row)Once en_stem is done discarding stop words and stemming the rest, we are left with:
wall2 extend3 upward4 well6 1008 feet9
Which is precisely the result of the example that began this section.


Trigonometry Helper
Welcome to the trigonometry helper website.
Trig Functions
Unit Circle
30-60-90 Triangle and 45-45-90 Triangle


--- layout: post title: "Ubuntu Officially Supported by Dell?" date: 2007-05-01 00:55:04 +0000 permalink: /2007/05/01/ubuntu-officially-supported-by-dell/ category: Linux redirect_from: - /blog/ubuntu-officially-supported-by-dell/ ---
As an interesting continued note to my post about Michael Dell, Fabián Rodríguez, a Senior Ubuntu Support Analyst at Canonical Ltd, is reporting that Ubuntu Linux will be Officially Supported by Dell Computers. Whether this support comes in the form of Canonical Support or in-house at Dell remains to be seen. My guess would be that Dell will be contracting with Canonical to provide the support.
Normally, I wouldn't do this, but "dude, I'm getting a Dell."
Update: DesktopLinux.com has more details, including the specific machines to come preinstalled and ship dates. Looks pretty solid to me.


Opening: June 18, 1972
Refurbishment
- April 12, 2006 (south lobby)
- October 20, 2006 (north lobby)
Architectural design
- Falcão e Cunha (original project)
- Ana Nascimento (refurbishment)
Art work
- Maria Keil (original project and refurbishment)
- Lourdes de Castro and René Bertholo (refurbishment)
Platform length: 105 m
Code: RM
Wikipedia page


About flags
pause :if set, no IO requests will be sent to any OSD
noup : prevent OSDs from getting marked up
nodown : prevent OSDs from getting marked down
noout : prevent OSDs from getting marked out
noin :prevent OSDs from getting marked in
noin and noout prevent booting OSDs from being marked in (allocated data) or protect OSDs from eventually being marked out (regardless of what the current value for mon osd down out interval is).
noup, noout, and nodown are temporary in the sense that once the flags are cleared, the action they were blocking should occur shortly after.
The noin flag, on the other hand, prevents OSDs from being marked in on boot, and any daemons that started while the flag was set will remain that way.
nobackfill
norecover
noscrub
nodeep-scrub
notieragent : This will pause tiering agent work


Dialog Title
Dialog body text goes here.
Pick a Food Group
Bread, Cereal, Rice, and Pasta
Vegetables
Fruit


Notebooks
Story: The |nushe
The |nushe
Title
The |nushe
Collection
Summary
The |nu'she bird calls at sunrise. There is a description of its appearance and call.
Comments
1) p.9875v: Tamme observed this himself; a note by !nanni referring to his drawing of 8 July 1881 which pictures a Dui plant: a description of its flowers and fruit (see IZIKO_SAMLB_!nBook4), 2) This story is found in Book XI & XII-11
Contributors
Date
8 – 9 July 1881
Categories
Keywords
bird (called |nu'she) , bird (the !kun name for) , bird (its cry or call) , bird (the behaviour and habits of) , bird (a description of) , bird (the appearance of) , bird (calls at sunrise) , bird (is eaten by !kun children) , bird (is feared by lizards) , name (used by the !kun for a bird) , name (of a bird is |nu'she) , food (|nu'she bird eaten by !kun children) , children (of the !kun eat the |nu'she bird)
Story Pages
9876, 9884-9885


| Messages |
A page showing messages coming into EduTrac; you can send and receive messages using this. |
Message Management |
{# #}
{# #}
{# | Other Messages | #}
{# Manage other messages sent into the system. e.g. Unsolicited messages | #}
{# Manage other messages | #}
{#
#}
{# #}
| Reporters |
Manage reporters on EduTrac |
Reporter Management |
| Quitters |
View showing quitters |
Quitters |
| Users |
Manage user accounts on EduTrac |
User Management |
| Schools |
Manage schools in EduTrac |
Schools Management |
| Scripts |
Manage scripts scheduling; e.g. set dates to send out polls, activate polls, etc. |
Script Management |
| Changelog |
Audit trail shows what changes have been made to EduTrac by users; and allows one to revert. |
Audit Trail |
| Poll responses |
Export poll responses |
Export poll responses |
| System Report |
Report which shows how frequently schools are submitting attendance data |
Send email |
| Alerts |
Report which shows unsolicited messages sent in |
Alerts Report |


In UNIX, pipes can be used to pass the output from one program as input to the next program. Let's look at a few examples that combine sed and awk to produce a report. The sed script that replaced the postal abbreviation of a state with its full name is general enough that it might be used again as a script file named nameState:
$cat nameState
s/ CA/, California/ s/ MA/, Massachusetts/ s/ OK/, Oklahoma/ s/ PA/, Pennsylvania/ s/ VA/, Virginia/
Of course, you'd want to handle all states, not just five, and if you were running it on documents other than mailing lists, you should make sure that it does not make unwanted replacements.
The output for this program, using the input file list, is the same as we have already seen. In the next example, the output produced by nameState is piped to an awk program that extracts the name of the state from each record.
$sed -f nameState list | awk -F, '{ print $4 }'
Massachusetts Virginia Oklahoma Pennsylvania Massachusetts Virginia California Massachusetts
The awk program is processing the output produced by the sed script. Remember that the sed script replaces the abbreviation with a comma and the full name of the state. In effect, it splits the third field containing the city and state into two fields. "$4" references the fourth field.
What we are doing here could be done completely in sed, but probably with more difficulty and less generality. Also, since awk allows you to replace the string you match, you could achieve this result entirely with an awk script.
While the result of this program is not very useful, it could be passed to sort | uniq -c, which would sort the states into an alphabetical list with a count of the number of occurrences of each state.
Now we are going to do something more interesting. We want to produce a report that sorts the names by state and lists the name of the state followed by the name of each person residing in that state. The following example shows the byState program.
#! /bin/sh awk -F, '{ print $4 ", " $0 }' $* | sort | awk -F, ' $1 == LastState { print "\t" $2 } $1 != LastState { LastState = $1 print $1 }'
This shell script has three parts. The program invokes awk to produce input for the sort program and then invokes awk again to test the sorted input and determine if the name of the state in the current record is the same as in the previous record. Let's see the script in action:
$sed -f nameState list | byState
California Amy Wilde Massachusetts Eric Adams John Daggett Sal Carpenter Oklahoma Orville Thomas Pennsylvania Terry Kalkas Virginia Alice Ford Hubert Sims
The names are sorted by state. This is a typical example of using awk to generate a report from structured data.
To examine how the byState program works, let's look at each part separately. It's designed to read input from the nameState program and expects "$4" to be the name of the state. Look at the output produced by the first line of the program:
$sed -f nameState list | awk -F, '{ print $4 ", " $0 }'
Massachusetts, John Daggett, 341 King Road, Plymouth, Massachusetts Virginia, Alice Ford, 22 East Broadway, Richmond, Virginia Oklahoma, Orville Thomas, 11345 Oak Bridge Road, Tulsa, Oklahoma Pennsylvania, Terry Kalkas, 402 Lans Road, Beaver Falls, Pennsylvania Massachusetts, Eric Adams, 20 Post Road, Sudbury, Massachusetts Virginia, Hubert Sims, 328A Brook Road, Roanoke, Virginia California, Amy Wilde, 334 Bayshore Pkwy, Mountain View, California Massachusetts, Sal Carpenter, 73 6th Street, Boston, Massachusetts
The sort program, by default, sorts lines in alphabetical order, looking at characters from left to right. In order to sort records by state, and not names, we insert the state as a sort key at the beginning of the record. Now the sort program can do its work for us. (Notice that using the sort utility saves us from having to write sort routines inside awk.)
The second time awk is invoked we perform a programming task. The script looks at the first field of each record (the state) to determine if it is the same as in the previous record. If it is not the same, the name of the state is printed followed by the person's name. If it is the same, then only the person's name is printed.
$1 == LastState { print "\t" $2 } $1 != LastState { LastState = $1 print $1 print "\t" $2 }'
There are a few significant things here, including assigning a variable, testing the first field of each input line to see if it contains a variable string, and printing a tab to align the output data. Note that we don't have to assign to a variable before using it (because awk variables are initialized to the empty string). This is a small script, but you'll see the same kind of routine used to compare index entries in a much larger indexing program in Chapter 12, Full-Featured Applications. However, for now, don't worry too much about understanding what each statement is doing. Our point here is to give you an overview of what sed and awk can do.
In this chapter, we have covered the basic operations of sed and awk. We have looked at important command-line options and introduced you to scripting. In the next chapter, we are going to look at regular expressions, something both programs use to match patterns in the input.


| Address {{#if fcSort.address.desc}}(desc){{/if}} {{#if fcSort.address.asc}}(asc){{/if}} | Agent {{#if fcSort.agent.desc}}(desc){{/if}} {{#if fcSort.agent.asc}}(asc){{/if}} | Actions |
|---|---|---|
| {{address}} | {{agent}} | edit delete |
{{email}} [{{roles}}] / Edit / Change Pwd / Delete


Contact Us
Come to our location , call us ,or send a message but whatever you do make sure you contact us.
Company Address
10 Olifantrivier Street
Vanderbijlpark
S.E 4 ,1911
Phone Numbers


|
ViennaCL - The Vienna Computing Library
1.5.2
|
This class represents a single scalar value on the GPU and behaves mostly like a built-in scalar type like float or double. More...
#include <scalar.hpp>
Public Types | |
| typedef viennacl::backend::mem_handle | handle_type |
| typedef vcl_size_t | size_type |
| typedef SCALARTYPE | value_type |
| Returns the underlying host scalar type. | |
Public Member Functions | |
| scalar () | |
| Creates the scalar object, but does not yet allocate memory. Thus, scalar<> can also be a global variable (if really necessary). | |
| scalar (SCALARTYPE val, viennacl::context ctx=viennacl::context()) | |
| Allocates the memory for the scalar and sets it to the supplied value. | |
| template<typename T1 , typename T2 , typename OP > | |
| scalar (scalar_expression< T1, T2, OP > const &proxy) | |
| Allocates memory for the scalar and sets it to the result of supplied expression. | |
| scalar (const scalar &other) | |
| Copy constructor. Allocates new memory for the scalar and copies the value of the supplied scalar. | |
| operator SCALARTYPE () const | |
| Reads the value of the scalar from the GPU and returns the float or double value. | |
| self_type & | operator= (entry_proxy< SCALARTYPE > const &other) |
| Assigns a vector entry. | |
| self_type & | operator= (scalar< SCALARTYPE > const &other) |
| Assigns the value from another scalar. | |
| self_type & | operator= (float cpu_other) |
| self_type & | operator= (double cpu_other) |
| self_type & | operator= (long cpu_other) |
| self_type & | operator= (unsigned long cpu_other) |
| self_type & | operator= (int cpu_other) |
| self_type & | operator= (unsigned int cpu_other) |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_inner_prod > const &proxy) |
| Sets the scalar to the result of supplied inner product expression. | |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_norm_1 > const &proxy) |
| Sets the scalar to the result of supplied norm_1 expression. | |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_norm_2 > const &proxy) |
| Sets the scalar to the result of supplied norm_2 expression. | |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_norm_inf > const &proxy) |
| Sets the scalar to the result of supplied norm_inf expression. | |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_norm_frobenius > const &proxy) |
| Sets the scalar to the result of supplied norm_frobenius expression. | |
| template<typename T1 , typename T2 > | |
| self_type & | operator= (scalar_expression< T1, T2, op_flip_sign > const &proxy) |
| Sets the scalar to the inverse with respect to addition of the supplied sub-expression. | |
| self_type & | operator+= (scalar< SCALARTYPE > const &other) |
| Inplace addition of a ViennaCL scalar. | |
| self_type & | operator+= (SCALARTYPE other) |
| Inplace addition of a host scalar (float or double) | |
| self_type & | operator-= (scalar< SCALARTYPE > const &other) |
| Inplace subtraction of a ViennaCL scalar. | |
| self_type & | operator-= (SCALARTYPE other) |
| Inplace subtraction of a host scalar (float or double) | |
| self_type & | operator*= (scalar< SCALARTYPE > const &other) |
| Inplace multiplication with a ViennaCL scalar. | |
| self_type & | operator*= (SCALARTYPE other) |
| Inplace multiplication with a host scalar (float or double) | |
| self_type & | operator/= (scalar< SCALARTYPE > const &other) |
| Inplace division with a ViennaCL scalar. | |
| self_type & | operator/= (SCALARTYPE other) |
| Inplace division with a host scalar (float or double) | |
| self_type | operator+ (scalar< SCALARTYPE > const &other) |
| Addition of two ViennaCL scalars. | |
| template<typename T1 , typename T2 , typename OP > | |
| self_type | operator+ (scalar_expression< T1, T2, OP > const &proxy) const |
| Addition of a ViennaCL scalar with a scalar expression. | |
| self_type | operator+ (SCALARTYPE other) |
| Addition of a ViennaCL scalar with a host scalar (float, double) | |
| scalar_expression< const self_type, const self_type, op_flip_sign > | operator- () const |
| Sign flip of the scalar. Does not evaluate immediately, but instead returns an expression template object. | |
| self_type | operator- (scalar< SCALARTYPE > const &other) const |
| Subtraction of two ViennaCL scalars. | |
| template<typename T1 , typename T2 , typename OP > | |
| self_type | operator- (scalar_expression< T1, T2, OP > const &proxy) const |
| Subtraction of a ViennaCL scalar from a scalar expression. | |
| scalar< SCALARTYPE > | operator- (SCALARTYPE other) const |
| Subtraction of a host scalar (float, double) from a ViennaCL scalar. | |
| self_type | operator* (scalar< SCALARTYPE > const &other) const |
| Multiplication of two ViennaCL scalars. | |
| template<typename T1 , typename T2 , typename OP > | |
| self_type | operator* (scalar_expression< T1, T2, OP > const &proxy) const |
| Multiplication of a ViennaCL scalar with a scalar expression. | |
| self_type | operator* (SCALARTYPE other) const |
| Multiplication of a host scalar (float, double) with a ViennaCL scalar. | |
| self_type | operator/ (scalar< SCALARTYPE > const &other) const |
| Division of two ViennaCL scalars. | |
| template<typename T1 , typename T2 , typename OP > | |
| self_type | operator/ (scalar_expression< T1, T2, OP > const &proxy) const |
| Division of a ViennaCL scalar by a scalar expression. | |
| self_type | operator/ (SCALARTYPE other) const |
| Division of a ViennaCL scalar by a host scalar (float, double) | |
| handle_type & | handle () |
| Returns the memory handle, non-const version. | |
| const handle_type & | handle () const |
| Returns the memory handle, const version. |
This class represents a single scalar value on the GPU and behaves mostly like a built-in scalar type like float or double.
Since every read and write operation requires a CPU->GPU or GPU->CPU transfer, this type should be used with care. The advantage of this type is that the GPU command queue can be filled without blocking read operations.
| SCALARTYPE | Either float or double. Checked at compile time. |
| typedef vcl_size_t size_type |
| typedef SCALARTYPE value_type |
Returns the underlying host scalar type.
| scalar | ( | ) | [inline] |
Creates the scalar object, but does not yet allocate memory. Thus, scalar<> can also be a global variable (if really necessary).
| scalar | ( | SCALARTYPE | val, |
| viennacl::context | ctx = viennacl::context() |
||
| ) | [inline] |
Allocates the memory for the scalar and sets it to the supplied value.
| scalar | ( | scalar_expression< T1, T2, OP > const & | proxy | ) | [inline] |
Allocates memory for the scalar and sets it to the result of supplied expression.
Copy constructor. Allocates new memory for the scalar and copies the value of the supplied scalar.
| handle_type& handle | ( | ) | [inline] |
Returns the memory handle, non-const version.
| const handle_type& handle | ( | ) | const [inline] |
Returns the memory handle, const version.
| operator SCALARTYPE | ( | ) | const [inline] |
Reads the value of the scalar from the GPU and returns the float or double value.
Multiplication of two ViennaCL scalars.
| self_type operator* | ( | scalar_expression< T1, T2, OP > const & | proxy | ) | const [inline] |
Multiplication of a ViennaCL scalar with a scalar expression.
| self_type operator* | ( | SCALARTYPE | other | ) | const [inline] |
Multiplication of a host scalar (float, double) with a ViennaCL scalar.
Inplace multiplication with a ViennaCL scalar.
| self_type& operator*= | ( | SCALARTYPE | other | ) | [inline] |
Inplace multiplication with a host scalar (float or double)
Addition of two ViennaCL scalars.
| self_type operator+ | ( | scalar_expression< T1, T2, OP > const & | proxy | ) | const [inline] |
Addition of a ViennaCL scalar with a scalar expression.
| self_type operator+ | ( | SCALARTYPE | other | ) | [inline] |
Addition of a ViennaCL scalar with a host scalar (float, double)
Inplace addition of a ViennaCL scalar.
| self_type& operator+= | ( | SCALARTYPE | other | ) | [inline] |
Inplace addition of a host scalar (float or double)
| scalar_expression<const self_type, const self_type, op_flip_sign> operator- | ( | ) | const [inline] |
Sign flip of the scalar. Does not evaluate immediately, but instead returns an expression template object.
Subtraction of two ViennaCL scalars.
| self_type operator- | ( | scalar_expression< T1, T2, OP > const & | proxy | ) | const [inline] |
Subtraction of a ViennaCL scalar from a scalar expression.
| scalar<SCALARTYPE> operator- | ( | SCALARTYPE | other | ) | const [inline] |
Subtraction of a host scalar (float, double) from a ViennaCL scalar.
Inplace subtraction of a ViennaCL scalar.
| self_type& operator-= | ( | SCALARTYPE | other | ) | [inline] |
Inplace subtraction of a host scalar (float or double)
Division of two ViennaCL scalars.
| self_type operator/ | ( | scalar_expression< T1, T2, OP > const & | proxy | ) | const [inline] |
Division of a ViennaCL scalar by a scalar expression.
| self_type operator/ | ( | SCALARTYPE | other | ) | const [inline] |
Division of a ViennaCL scalar by a host scalar (float, double)
Inplace division with a ViennaCL scalar.
| self_type& operator/= | ( | SCALARTYPE | other | ) | [inline] |
Inplace division with a host scalar (float or double)
| self_type& operator= | ( | entry_proxy< SCALARTYPE > const & | other | ) | [inline] |
Assigns a vector entry.
Assigns the value from another scalar.
| self_type& operator= | ( | float | cpu_other | ) | [inline] |
| self_type& operator= | ( | double | cpu_other | ) | [inline] |
| self_type& operator= | ( | long | cpu_other | ) | [inline] |
| self_type& operator= | ( | unsigned long | cpu_other | ) | [inline] |
| self_type& operator= | ( | int | cpu_other | ) | [inline] |
| self_type& operator= | ( | unsigned int | cpu_other | ) | [inline] |
| self_type& operator= | ( | scalar_expression< T1, T2, op_inner_prod > const & | proxy | ) | [inline] |
Sets the scalar to the result of supplied inner product expression.
| self_type& operator= | ( | scalar_expression< T1, T2, op_norm_1 > const & | proxy | ) | [inline] |
Sets the scalar to the result of supplied norm_1 expression.
| self_type& operator= | ( | scalar_expression< T1, T2, op_norm_2 > const & | proxy | ) | [inline] |
Sets the scalar to the result of supplied norm_2 expression.
| self_type& operator= | ( | scalar_expression< T1, T2, op_norm_inf > const & | proxy | ) | [inline] |
Sets the scalar to the result of supplied norm_inf expression.
| self_type& operator= | ( | scalar_expression< T1, T2, op_norm_frobenius > const & | proxy | ) | [inline] |
Sets the scalar to the result of supplied norm_frobenius expression.
| self_type& operator= | ( | scalar_expression< T1, T2, op_flip_sign > const & | proxy | ) | [inline] |
Sets the scalar to the inverse with respect to addition of the supplied sub-expression.


HotelPedia
Hotel By Place
Hotel Deals
Currency
Language
Sign Up!
Log In !
Check in
Check out
Rooms
Adults
Childrens
1
2
3
4
5
6
7
8
9+
1
2
3
4
5
6
7
1
2
3
Subscribe For More Updates!
Contact Us
Name:
Email:
Message:
Copy Right @ STACKWISER


Tokyo to Hong Kong
March 15 - March 17
Soon
Vancouver to Tokyo
March 10 - March 13
Vancouver to Shanghai
March 12 - March 15
Rome to Barcelona
Dec 14, 2017 - Dec 22, 2017
Completed
Vancouver to Paris
Jan 21 - Jan 29
Seoul to Osaka
Feb 22 - Feb 28
Mars to Saturn
Dec 23, 2014 - Dec 25, 2016
New York to Windsor
Nov 11, 2015 - Nov 12, 2015
Draft
9:41
Plan
Soon
Trip
Place
Plan
Home
Me
Search