Motorcycles
Photography
Reading
Scuba Diving
Traveling
The University of Texas at Austin '18
M.S. and B.S. Computer Science
McNair Scholar
Graduate Certification in Robotics
Learning Agents Research Group
Building-Wide Intelligence Project
Robotics Graduate Portfolio Program
Resume [PDF]
LinkedIn
GitHub
<EMAIL_ADDRESS><EMAIL_ADDRESS>Call availability: CST


|
UQTk: Uncertainty Quantification Toolkit 3.1.3
|
Contains all basis type specific definitions and operations needed to generate a PCSet. More...
#include <PCBasis.h>
Public Member Functions | |
| PCBasis (const string type="LU", const double alpha=0.0, const double betta=1.0, const int maxord=10) | |
| Constructor: initializes the univariate basis type and order. More... | |
| ~PCBasis () | |
| Destructor. More... | |
| void | Init1dQuadPoints (int qdpts) |
| Initialize the quadrature points and weights and store the information in arrays quadPoints_, quadWeights_,quadIndices_. More... | |
| void | Eval1dBasisAtQuadPoints () |
| Evaluate polynomial 1d basis functions at quadrature points and store in the private variable psi1d_. More... | |
| void | Eval1dBasisAtCustPoints (Array2D< double > &psi, int kord, const Array1D< double > &custPoints) |
| Evaluate polynomial 1d basis functions up to the order kord at custom points given by an array custPoints Returns the evaluations in the first argument psi, where the number of rows are the number of points, and columns correspond to successive orders. More... | |
| double | EvalBasis (const double &xi, Array1D< double > &basisEvals) const |
| Evaluate 1d basis functions for the given value of random variable xi. Return the value of the basis functions for all orders in the passed Array1D array (indexed by their order), also returns the highest-order value. More... | |
| double | EvalBasis (const double &xi, const int kord, double *basisEvals) const |
| Evaluate 1d basis functions for the given value of random variable xi. Return the value of the basis functions for all orders in the passed double * array (indexed by their order), also returns the highest-order value. More... | |
| void | Eval1dNormSq_Exact (int kord) |
| Evaluate the norms (squared) of the basis functions exactly and stores in the private array psi1dSqExact_. More... | |
| void | EvalDerivBasis (const double &xi, Array1D< double > &basisDEvals) |
| Evaluate derivative of 1d non-normalized Legendre basis. More... | |
| void | Eval1dDerivBasisAtCustPoints (Array2D< double > &dpsi, int kord, const Array1D< double > &custPoints) |
| void | Eval2ndDerivBasis (const double &xi, Array1D< double > &ddP) |
| void | Eval2ndDerivCustPoints (Array2D< double > &psi, int kord, Array1D< double > &custPoints) |
| void | Get1dNormsSq (Array1D< double > &psi1dSq) const |
| Get the norms-squared of the basis functions. Returns the values for each basis function in the passed Array1D array. More... | |
| void | Get1dNormsSqExact (Array1D< double > &psi1dSqExact) const |
| Get the analytic norms-squared of the basis functions. Returns the values for each basis function in the passed Array1D array. More... | |
| void | GetRandSample (Array1D< double > &randSamples) |
| Get samples of the random variables associated with the current PC basis functions and return them in the 1D array randSamples. Take as many samples as the length of the array randSamples. More... | |
| void | GetRandSample (double *randSamples, const int &nSamp) |
| Get nSamp samples of the random variables associated with the current PC basis functions and return them in the double* randSamples. More... | |
| int | GetSeed () const |
| Get the random number generator seed. More... | |
| void | SeedRandNumGen (const int &seed) |
| Function to (re)seed the random number generator used to sample the Basis functions. More... | |
| void | GetQuadRule (Array2D< double > &qPoints, Array1D< double > &qWeights, Array2D< int > &qIndices) |
| Get the quadrature integration information. More... | |
| void | GetQuadPoints (Array2D< double > &quadPoints) const |
| Get the quadrature points in the passed Array2D array. More... | |
| void | GetQuadWeights (Array1D< double > &quadWeights) const |
| Get the quadrature weights in the passed Array1D array. More... | |
| void | GetQuadIndices (Array2D< int > &quadIndices) const |
| Get the quadrature points' indices in the passed Array1D array. More... | |
| void | GetBasisAtQuadPoints (Array2D< double > &psi1d) const |
| Get the basis values at quadrature points in the passed Array2D array. More... | |
| string | GetPCType () const |
| Get the PC type. More... | |
| double | GetAlpha () const |
| Get the value of the parameter alpha. More... | |
| double | GetBeta () const |
| Get the value of the parameter beta. More... | |
Private Member Functions | |
| PCBasis (const PCBasis &obj) | |
| Dummy default constructor, which should not be used as it is not well defined Therefore we make it private so it is not accessible. More... | |
| void | Eval1dNormSq (int kord) |
| Evaluate the norms (squared) of the basis functions and stores in the private array psi1dSq_. More... | |
| double | NormSq_Exact (int kord) |
| Evaluate 1d norm of order kord exactly. More... | |
Private Attributes | |
| string | type_ |
| String indicator of type of basis functions used. More... | |
| Array2D< double > | quadPoints_ |
| Array to store quadrature points. More... | |
| Array1D< double > | quadWeights_ |
| Array to store quadrature weights. More... | |
| Array2D< int > | quadIndices_ |
| Array to store quadrature point indexing; useful only for nested rules. More... | |
| Array2D< double > | psi1d_ |
| Array to store basis functions evaluated at quadrature points for each order: psi1d_(iqp,iord) contains the value of the polynomial chaos basis of order iord at the location of quadrature point iqp. More... | |
| Array1D< double > | psi1dSq_ |
| Array with the norms squared of the 1D basis functions for each order. More... | |
| Array1D< double > | psi1dSqExact_ |
| Array with the exact norms squared of the 1D basis functions for each order. More... | |
| int | maxord_ |
| Maximal order of any dimension. More... | |
| int | narg_ |
| Number of parameters to specify the basis. More... | |
| double | alpha_ |
| Parameter alpha for PCs that require a parameter (LG,SW,JB) More... | |
| double | beta_ |
| Parameter beta for PCs that require two parameters (SW,JB) More... | |
| dsfmt_t | rnstate_ |
| Random sequence state for dsfmt. More... | |
| int | rSeed_ |
| The seed used for the random number generators that sample the xi's in the basis functions. More... | |
Contains all basis type specific definitions and operations needed to generate a PCSet.
| PCBasis::PCBasis | ( | const string | type = "LU" , |
| const double | alpha = 0.0 , |
||
| const double | betta = 1.0 , |
||
| const int | maxord = 10 |
||
| ) |
Constructor: initializes the univariate basis type and order.
Currently, the only valid types are Hermite-Gaussian, denoted with "HG", Legendre-Uniform, denoted with "LU", or Laguerre-Gamma, denoted with "LG". (Where the shape parameter for the Gamma distribution is alpha + 1 = 2)
|
inline |
Destructor.
|
inlineprivate |
Dummy default constructor, which should not be used as it is not well defined Therefore we make it private so it is not accessible.
Dummy copy constructor, which should not be used as it is currently not well defined. Therefore we make it private so it is not accessible.
| void PCBasis::Eval1dBasisAtCustPoints | ( | Array2D< double > & | psi, |
| int | kord, | ||
| const Array1D< double > & | custPoints | ||
| ) |
Evaluate polynomial 1d basis functions up to the order kord at custom points given by an array custPoints Returns the evaluations in the first argument psi, where the number of rows are the number of points, and columns correspond to successive orders.
| void PCBasis::Eval1dBasisAtQuadPoints | ( | ) |
Evaluate polynomial 1d basis functions at quadrature points and store in the private variable psi1d_.
| void PCBasis::Eval1dDerivBasisAtCustPoints | ( | Array2D< double > & | dpsi, |
| int | kord, | ||
| const Array1D< double > & | custPoints | ||
| ) |
|
private |
Evaluate the norms (squared) of the basis functions and stores in the private array psi1dSq_.
| void PCBasis::Eval1dNormSq_Exact | ( | int | kord | ) |
Evaluate the norms (squared) of the basis functions exactly and stores in the private array psi1dSqExact_.
| void PCBasis::Eval2ndDerivBasis | ( | const double & | xi, |
| Array1D< double > & | ddP | ||
| ) |
| void PCBasis::Eval2ndDerivCustPoints | ( | Array2D< double > & | psi, |
| int | kord, | ||
| Array1D< double > & | custPoints | ||
| ) |
| double PCBasis::EvalBasis | ( | const double & | xi, |
| Array1D< double > & | basisEvals | ||
| ) | const |
Evaluate 1d basis functions for the given value of random variable xi. Return the value of the basis functions for all orders in the passed Array1D array (indexed by their order), also returns the highest-order value.
| double PCBasis::EvalBasis | ( | const double & | xi, |
| const int | kord, | ||
| double * | basisEvals | ||
| ) | const |
Evaluate 1d basis functions for the given value of random variable xi. Return the value of the basis functions for all orders in the passed double * array (indexed by their order), also returns the highest-order value.
| void PCBasis::EvalDerivBasis | ( | const double & | xi, |
| Array1D< double > & | basisDEvals | ||
| ) |
Evaluate derivative of 1d non-normalized Legendre basis.
|
inline |
Get the norms-squared of the basis functions. Returns the values for each basis function in the passed Array1D array.
|
inline |
Get the analytic norms-squared of the basis functions. Returns the values for each basis function in the passed Array1D array.
|
inline |
Get the value of the parameter alpha.
|
inline |
Get the basis values at quadrature points in the passed Array2D array.
|
inline |
Get the value of the parameter beta.
|
inline |
Get the PC type.
|
inline |
Get the quadrature points' indices in the passed Array1D array.
|
inline |
Get the quadrature points in the passed Array2D array.
| void PCBasis::GetQuadRule | ( | Array2D< double > & | qPoints, |
| Array1D< double > & | qWeights, | ||
| Array2D< int > & | qIndices | ||
| ) |
Get the quadrature integration information.
|
inline |
Get the quadrature weights in the passed Array1D array.
| void PCBasis::GetRandSample | ( | Array1D< double > & | randSamples | ) |
Get samples of the random variables associated with the current PC basis functions and return them in the 1D array randSamples. Take as many samples as the length of the array randSamples.
| void PCBasis::GetRandSample | ( | double * | randSamples, |
| const int & | nSamp | ||
| ) |
Get nSamp samples of the random variables associated with the current PC basis functions and return them in the double* randSamples.
|
inline |
Get the random number generator seed.
| void PCBasis::Init1dQuadPoints | ( | int | qdpts | ) |
Initialize the quadrature points and weights and store the information in arrays quadPoints_, quadWeights_,quadIndices_.
|
private |
Evaluate 1d norm of order kord exactly.
| void PCBasis::SeedRandNumGen | ( | const int & | seed | ) |
Function to (re)seed the random number generator used to sample the Basis functions.
|
private |
Parameter alpha for PCs that require a parameter (LG,SW,JB)
|
private |
Parameter beta for PCs that require two parameters (SW,JB)
|
private |
Maximal order of any dimension.
|
private |
Number of parameters to specify the basis.
|
private |
Array to store basis functions evaluated at quadrature points for each order: psi1d_(iqp,iord) contains the value of the polynomial chaos basis of order iord at the location of quadrature point iqp.
|
private |
Array with the norms squared of the 1D basis functions for each order.
|
private |
Array with the exact norms squared of the 1D basis functions for each order.
|
private |
Array to store quadrature point indexing; useful only for nested rules.
|
private |
Array to store quadrature points.
|
private |
Array to store quadrature weights.
|
private |
Random sequence state for dsfmt.
|
private |
The seed used for the random number generators that sample the xi's in the basis functions.
This seed is set to 1 during the class construction and can be reset with the SeedRandNumGen function
|
private |
String indicator of type of basis functions used.


Implements basic tasks for OpenMP parallelism and suitable scalar alternatives.
More...
#include <openmp_utils.h>
Implements basic tasks for OpenMP parallelism and suitable scalar alternatives.
This class defines utility functions that implement some basic OpenMP capabilities and an equivalent scalar alternative to use in compilations where OpenMP is not enabled. The idea is to allow Kratos developers to design their code in parallel, knowing that it will work in scalar runs as well.
◆ PartitionVector
◆ DivideInPartitions()
| static void Kratos::OpenMPUtils::DivideInPartitions |
( |
const int |
NumTerms, |
|
|
const int |
NumThreads, |
|
|
PartitionVector & |
Partitions |
|
) |
| |
|
inlinestatic |
Divide an array of length NumTerms between NumThreads threads.
Creates a std::vector containing NumThreads + 1 terms, where term k is the first and position of the array that corresponds to thread k. The k+1 term is the end of the array, so that the vector can be used to iterate the array between 'k' and 'k+1' in each thread.
- Parameters
-
| NumTerms | Number of objects to be divided between the threads. |
| NumThreads | The number of parallel threads that will be used. |
| Partitions | This object will contain the begin and end positions for each thread. |
◆ GetCurrentNumberOfThreads()
| static int Kratos::OpenMPUtils::GetCurrentNumberOfThreads |
( |
| ) |
|
|
inlinestatic |
Wrapper for omp_get_num_threads().
- Returns
- Number of OpenMP threads in the current team.
◆ IsDynamic()
| static int Kratos::OpenMPUtils::IsDynamic |
( |
| ) |
|
|
inlinestatic |
Wrapper for omp_get_dynamic().
- Returns
- Dynamic teams are enabled.
◆ IsInParallel()
| static int Kratos::OpenMPUtils::IsInParallel |
( |
| ) |
|
|
inlinestatic |
Wrapper for omp_in_parallel().
- Returns
- Maximum number of OpenMP threads that will be used in parallel regions.
◆ KRATOS_DEPRECATED_MESSAGE() [1/3]
| Kratos::OpenMPUtils::KRATOS_DEPRECATED_MESSAGE |
( |
"This is legacy |
version, |
|
|
please use the \"ParallelUtilities\" instead" |
|
|
) |
| |
|
inline |
Wrapper for omp_get_max_threads().
- Returns
- Maximum number of OpenMP threads that will be used in parallel regions.
◆ KRATOS_DEPRECATED_MESSAGE() [2/3]
| Kratos::OpenMPUtils::KRATOS_DEPRECATED_MESSAGE |
( |
"This is legacy |
version, |
|
|
please use the \"ParallelUtilities\" instead" |
|
|
) |
| |
|
inline |
Wrapper for omp_get_num_procs().
- Returns
- Number of processors available to the device.
◆ KRATOS_DEPRECATED_MESSAGE() [3/3]
| Kratos::OpenMPUtils::KRATOS_DEPRECATED_MESSAGE |
( |
"This is legacy |
version, |
|
|
please use the \"utilities/builtin_timer.h\" instead" |
|
|
) |
| |
|
inline |
Timing routine.
Determine the current time by calling an appropiate (scalar or parallel) timer class.
- Returns
- Current time
◆ PartitionedIterators()
template<class TVector >
| static void Kratos::OpenMPUtils::PartitionedIterators |
( |
TVector & |
rVector, |
|
|
typename TVector::iterator & |
rBegin, |
|
|
typename TVector::iterator & |
rEnd |
|
) |
| |
|
inlinestatic |
Generate a partition for an std::vector-like array, providing iterators to the begin and end positions for each thread.
This function assumes that the vector class will have an iterator type and implement begin(), end() and size() methods.
- Parameters
-
| rVector | An arary containing the elements to be distributed between the threads. |
| rBegin | Iterator pointing to the first element in rVector to be used in the current thread. |
| rEnd | Iterator pointing to the end position for the current thread in rVector. |
◆ ThisThread()
| static int Kratos::OpenMPUtils::ThisThread |
( |
| ) |
|
|
inlinestatic |
Wrapper for omp_get_thread_num().
- Returns
- The thread number for this thread, 0 if scalar run.
The documentation for this class was generated from the following file:
- /home/runner/work/Documentation/Documentation/master/kratos/utilities/openmp_utils.h


CHARLIE'S ANGELS A film review by David N. Butterworth Copyright 2000 David N. Butterworth
**1/2 (out of ****)
It's a fact: teenage girls are just as obsessed with female breasts as teenage boys, and Drew Barrymore has a huge following of teenage girls. It makes perfect sense, therefore, that as the co-producer and shrewd marketing force behind "Charlie's Angels," Barrymore would insist that the film feature, first and foremost, her breasts. Better yet, Barrymore has employed the talents of Cameron Diaz and Lucy Liu and since her co-stars have breasts too, the pulchritude on parade here is disturbingly unreal.
Now this a PG-13 rated film so we're not talking full-frontal nudity or, to be fair, even casual toplessness. But "Charlie's Angels," a post-feminist update of the cheesy '70's TV show about three crime-fighting babes employed by a speakerphone, is one sexual tease-a-thon from start to finish. Hardly a minute goes by in which one of our heroines doesn't flash some thigh, unbutton her shirt, or waggle her bum at the camera. The T&A in this film is truly amazing, as if Russ Meyer served as creative consultant. I lost count of how many times an Angel shakes out her hair in slow-mo like a Keeshond wicking rainwater from its pelt.
The sexual innuendo and double entendres don't come as thick and fast as in, say, a James Bond movie, but they're there all right. "You should be on my staff" an appreciative Tim Curry tells Liu's character, who's working undercover as a masseuse. "My hands are going nowhere near your staff" is Liu's sly response.
Do Barrymore's adoring fans appear to mind all this? Mind it? They love it.
There's a scene in the film in which Barrymore hangs from a window wrapped in nothing but a bed sheet. The squeals of delight when the sheet rips and Barrymore--or more likely her stunt double--plunges (safely, of course) to the ground below confirm what the largely 13-year-old audience had come to see. Likewise the scene in which the Angels emerge from the surf in their skin-tight scuba gear. Now Diaz already has her suit unbuttoned to the naval when she sashays up on the beach but she unbuttons it some more. And when all three actresses peel out of their wetsuits tastefully (?) shot from behind, well... the Q102-loving crowd went wild.
If you can take your eyes off the naughty bits for a moment you'll notice that "Charlie's Angels" is actually better than this summer's overhyped "Mission: Impossible 2" because it doesn't take itself too seriously. Like that Tom Cruise vehicle its plot is rather silly, although "Charlie's Angels" only features the one rubber mask removal. "Charlie's Angels" is fast moving, slickly edited, and features a pulse-pounding score. It never flags for a minute. Many of the action sequences are sensational--Barrymore, Diaz, and Liu have clearly trained with the best. One of the best fight sequences comes early in the film in which the Angels face off with a thin henchman, played by Crispin Glover (oddly absent from the screen since 1996's "The People vs. Larry Flynt"). It's kinetic, balletic, a sort of "Bodacious Ta-Ta's" meets "The Matrix" by way of John Woo! Diaz leaps through the air, appears to hang there for several digitally-enhanced seconds as she bicycles her long, sinuous legs into position and delivers a stunning blow to the bad guy's chest--KERBLAM!! Talk about being touched by an Angel.
The film is competently directed by a first timer with the mysterious moniker of McG. It will come as no surprise to anyone that Mr. McG's claim to fame is as a former rock video director; watch for an association with producer Jerry Bruckheimer Real Soon Now.
Barrymore plays Dylan--she has killer red hair. Diaz plays Natalie--she's effervescent, loves to dance, and has a killer smile. Liu plays Alex, she of the killer freckles. All three are stunning in that way that destroys our young girls' self-image. Bill Murray plays the comic interest, Bosley, and he's funny yet woefully underutilized. The villain, a voice-recognition software mogul called Knox, is played by Sam Rockwell but he's just not very villainous. More menacing is his henchwoman, played by Kelly Lynch. Bonus breasts! Killer. There are more costume changes in "Charlie's Angels" than in an entire season of "Are You Being Served?"
From its well-crafted Bond-ian opening sequence, "Charlie's Angels" is, for the most part, a fast and fun-filled 90-minute entertainment. And if you think "Baywatch" provides good role models for your teenage daughter(s), then you shouldn't have the slightest problem with it.
-- David N. Butterworth<EMAIL_ADDRESS>Got beef? Visit "La Movie Boeuf" online at http://members.dca.net/dnb
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


DAIRY BUSINESS PRODUCTION FORM
Shed A:Milk in ltrs
Shed B:Milk in ltrs
Shed C:Milk in ltrs
Shed D:Milk in ltrs
submit
Reset
Production Data Log


|
Class Summary |
| APSPNSI |
The All Pairs Shortest Path NSI stores the exact graph distance for all pairs of nodes. |
| DegreeNSI |
The Degree NSI labels each node with its degree. |
| DTZNSI |
The DTZ NSI, or distance-to-zone, computes a Zone NSI and then for each node, stores the shortest distance
to each other zone. |
| GNPNSI |
The GNP NSI is based on the Global Network Positioning system proposed by Ng & Zhang in 2002. |
| LandmarksNSI |
The Landmarks NSI chooses a set of landmarks and stores the exact distance from every node to each landmark. |
| MatrixFactorizationNSI |
The Matrix Factorization NSI is based on techniques proposed by Mao & Saul in 2004. |
| SearchNSI |
The Search NSI uses a searching routine to provide distances. |
| ZoneNSI |
The Zone NSI works by assigning each node a label corresponding to one of k zones
The zones are chosen by randomly flooding from k seed nodes until all nodes have been labeled. |


THE WHOLE NINE YARDS (2000) / ** 1/2
Directed by Jonathan Lynn. Screenplay by Mitchell Kapner. Starring Bruce Willis, Matthew Perry, Natasha Henstridge. Running time: 100 minutes. Rated AA. Reviewed on March 16th, 2000.
By SHANNON PATRICK SULLIVAN
Sometimes, comedy is easy. Romance, sports, teen angst -- these topics and others have often been mined for the purpose of making us laugh. (Every now and then, it's even done successfully.) Other subjects have proved more difficult to capture successfully in a comedy format, however. Of these, few have been more elusive than the gangster genre.
"The Whole Nine Yards" is the latest attempt to marry mirth and the mob, telling the screwball tale of Nicholas "Oz" Oseransky (Matthew Perry).  Just when things seem as though they can't get any worse, Oz recognizes his new next-door neighbor as Jimmy "The Tulip" Tudeski (Bruce Willis), a feared hitman who turned state's evidence against Chicago's Gogolack gang and has recently been released from prison.
Oz does his best to ignore the situation, eventually becoming friends with Tudeski. But Oz's scheming wife Sophie (Rosanna Arquette) has other ideas. She forces him to fly to Chicago to inform mob boss Yanni Gogolack (Kevin Pollak, with a hilariously ridiculous accent) as to The Tulip's whereabouts and collect a finder's fee, while at the same time telling Jimmy what Oz is doing, in the hope that Tudeski will bump off her husband. To make matters worse, in Chicago Oz meets Jimmy's wife Cynthia (Natasha Henstridge) and instantly falls in love with her. It turns out that she, Jimmy and Gogolack have entered into an agreement whereby if two of them die, the third gets ten million dollars. It is this deal which drives the final two-thirds of the movie, as the different players try to bump each other off, and Oz tries to save Cynthia while not losing his own head.
Like most mob comedies, "The Whole Nine Yards" faces the difficult task of juxtaposing laughs with the sheer brutality of the gangster profession. Some movies deal with this by indulging in the truly bizarre, like Tarantino's "Reservoir Dogs". Others simply tone down the violence, so that the jokes seem less incongruous. "The Whole Nine Yards" does neither, and the result is a somewhat uncomfortable viewing experience. I found it difficult at times to laugh at the sitcom-level humor of the film, immediately after seeing four men blown away in a hail of gunfire.
Neither of the principals really seems to embrace the material, perhaps themselves uncertain how to reconcile the movie's plot with its comedic intentions. Willis looks like he's cruising in neutral as Tudeski. While The Tulip is given a number of interesting personality traits, they never really come together to form a convincing, complete individual. Perry's Oz is basically just his Chandler Bing character from the TV series "Friends" transplanted to a different milieu; even some of the vocal mannerisms are identical. He's likeable enough as a sympathetic Ordinary Joe caught up in events beyond his control, but just doesn't have the on-screen presence to really absorb the viewer into his plight.
Better are the supporting characters, particularly Amanda Peet as Jill St Claire, Oz's receptionist who harbors secrets of her own. Peet clearly relishes her role, and her electrifying performance helps her steal scenes from the more tepid Willis and Perry. Star of the TV sitcom "Jack and Jill", Peet appears to be a comedy star on the rise. Michael Clarke Duncan also has fun as Frankie Figs, one of Tudeski's hitman confreres.
"The Whole Nine Yards" is set for the most part in Montréal, and is attractively photographed. Surprisingly, though, it takes little advantage of the Francophone milieu. The movie is liberally sprinkled with the French language (and Arquette sports a grotesquely exaggerated Québecois accent), but virtually none of the humor arises from the unique culture, beyond a running gag about hamburgers and mayonnaise. This is unfortunate; were the comedy to arise more naturally from the film's situations and surroundings, instead of resorting to routine one-liners and pratfalls, I think I would have found the violent aspects of the plot less jarring and easier to swallow.
Like last year's "Analyze This", "The Whole Nine Yards" is an only partially-successful mob comedy. It has its moments, especially when Peet is involved, but the time between laughs is often lengthy, and many of the jokes just don't pack much of a punch, especially when paired with the violence of the gangster lifestyle. This is a film which desperately needs to eschew the conventions of the sitcom format and more wholly embrace its subject material. In essence, instead of falling back on a tired comedy format, "The Whole Nine Yards" needs to go the whole nine yards.
Copyright © 2000 Shannon Patrick Sullivan. Archived at http://www.physics.mun.ca/~sps/movies/TheWholeNineYards.html
-- _______________________________________________________________________ / Shannon Patrick Sullivan | "We are all in the gutter, but some of us \ | | are looking at the stars." | \<EMAIL_ADDRESS>| -- Oscar Wilde /
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


Malan-Morgan fireworks help England level T20 series in NZ
NAPIER: Dawid Malan smashed a 48-ball century and skipper Eoin Morgan made a blistering 91 to help secure a series-levelling 76-run victory in the fourth Twenty20 international against New Zealand on Friday.
Malan and Morgan featured in a massive 182-run partnership to power England to 241-3, their highest total in this format, hitting 13 sixes between them.
When the teams returned, spinner Matt Parkinson claimed 4-47 as New Zealand were all out for 165 in the 17th over, squaring the series at 2-2.
Auckland hosts the fifth and final match on Sunday.
Put into bat, England lost Jonny Bairstow in the fourth over while Tom Banton made 31 before becoming Mitchell Santner's second victim.
Morgan walked out to join Malan and the left-handers lit up McLean Park.
Malan became only the second Englishman to hit a century in a Twenty20 International when he smacked his sixth six, reaching the mark quicker than Alex Hales with his 60-ball hundred against Sri Lanka during the 2014 World Cup.

"Not very often you have days like that when every time you have a hack at one it lands safe or goes for six," Malan said after collecting the man-of-the-match award.
"It's as good as it gets.
"Felt like I had rhythm today, glad I clicked especially with these short boundaries."
Morgan, at the other end, put up a six-hitting display of his own, clobbering seven of them as he threatened to eclipse Malan's hundred.
The England captain, twice caught off waist-high full-tosses which were subsequently adjudged no-balls, eventually holed out after his 41-ball blitz.
England, who were 88-2 at the halfway mark, plundered 153 runs from the final 10 overs.
Martin Guptill (27) and Colin Munro (30) put on 54 runs for the opening stand before the wheels came off New Zealand's chase.
Tom Curran dismissed Guptill and Parkinson (4-47) struck twice in the seventh over to rock the hosts.
Tim Southee hit four sixes in his 39 but New Zealand did not get a significant partnership that could take them close to the target.
(Reporting by Amlan Chakraborty in New Delhi; editing by Peter Rutherford)


Pictures: Jacqueline Jossa shares video with daughters Ella and Mia following I'm A Celebrity win 09 Dec 2019, 16:55 by Michelle Townsend (Image: Instagram) (Image: Instagram)


--- layout: page-with-toc title: Programme titlecontent: "" headings: "overview,download,proceedings_academic_track,general_Saturday,general_Sunday" ---
State of the Map 2020 is taking place online on 4 and 5 July 2020. We have created an exciting program with you—the OpenStreetMap community. For the duration of the conference, we have chat rooms set aside for virtual sponsor booths as well as breakout sessions that can be booked by groups of mutual interest, or used without prior planning.
Take a look at the conference booklet for a printable version of the schedule.
For smartphone schedule viewers or calendar apps there is a machine-readable version of the schedule available at https://sotm.osmz.ru/2020.html.
The academic committee published the conference track's proceedings on zenodo under the following link: zenodo.org/communities/sotm-2020. There you can find the full abstracts of all academic talks of this year's state of the map (which are indicated with a 🎓 symbol below), as well as an editorial written by the scientific committee.
{% include schedule/_general.html %}


--- layout: post title: "Conditional composition of functions" description: "A major benefit of Functional Programming is the separation of decisions and (side-)effects. Sometimes, however, one decision ought to trigger an impure operation, and then proceed to make more decisions. Using functional composition, you can succinctly conditionally compose functions." date: 2016-07-04 6:53 UTC tags: [Software Design, Haskell] --- {% include JB/setup %}
{{ page.description }}
In my article on how Functional Architecture falls into the Ports and Adapters pit of success, I describe how Haskell forces you to separate concerns:
Based on my previous restaurant-booking example, Martin Rykfors suggests "a new feature request. The restaurant has struck a deal with the local caravan dealership, allowing them to rent a caravan to park outside the restaurant in order to increase the seating capacity for one evening. Of course, sometimes there are no caravans available, so we'll need to query the caravan database to see if there is a big enough caravan available that evening:"
findCaravan :: ServiceAddress -> Int -> ZonedTime -> IO (Maybe Caravan)
The above findCaravan
is a slight modification of the function Martin suggests, because I imagine that the caravan dealership exposes their caravan booking system as a web service, so the function needs a service address as well. This change doesn't impact the proposed solution, though.
This problem definition fits the above general problem statement: you'd only want to call the findCaravan
function if checkCapacity
returns Left CapacityExceeded
.
That's still a business decision, so you ought to implement it as a pure function. If you (for a moment) imagine that you have a Maybe Caravan
instead of an IO (Maybe Caravan)
, you have all the information required to make that decision:
checkCaravanCapacityOnError :: Error -> Maybe Caravan -> Reservation -> Either Error Reservation checkCaravanCapacityOnError CapacityExceeded (Just caravan) reservation = if caravanCapacity caravan < quantity reservation then Left CapacityExceeded else Right reservation checkCaravanCapacityOnError err _ _ = Left err
Notice that this function not only takes Maybe Caravan
, it also takes an Error
value. This encodes into the function's type that you should only call it if you have an Error
that originates from a previous step. This Error
value also enables the function to only check the caravan's capacity if the previous Error
was a CapacityExceeded
. Error
can also be ValidationError
, in which case there's no reason to check the caravan's capacity.
This takes care of the Domain Model, but you still need to figure out how to get a Maybe Caravan
value. Additionally, if checkCaravanCapacityOnError
returns Right Reservation
, you'd probably want to reserve the caravan for the evening. You can imagine that this is possible with the following function:
reserveCaravan :: ServiceAddress -> ZonedTime -> Caravan -> IO ()
This function reserves the caravan at the supplied time. In order to keep the example simple, you can imagine that the provided ZonedTime
indicates an entire day (or evening), and not just an instant.
As a first step, you can compose an impure function that
checkCaravanCapacityOnError
functionRight Reservation
import Control.Monad (forM_) import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT(..), hoistEither) checkCaravan :: Reservation -> Error -> EitherT Error IO Reservation checkCaravan reservation err = do c <- liftIO $ findCaravan svcAddr (quantity reservation) (date reservation) newRes <- hoistEither $ checkCaravanCapacityOnError err c reservation liftIO $ forM_ c $ reserveCaravan svcAddr (date newRes) return newRes
It starts by calling findCaravan
by closing over svcAddr
(a ServiceAddress
value). This is an impure operation, but you can use liftIO
to make c
a Maybe Caravan
value that can be passed to checkCaravanCapacityOnError
on the next line. This function returns Either Error Reservation
, but since this function is defined in an EitherT Error IO Reservation
context, newRes
is a Reservation
value. Still, it's important to realise that exactly because of this context, execution will short-circuit at that point if the return value from checkCaravanCapacityOnError
is a Left
value. In other words, all subsequent expression are only evaluated if checkCaravanCapacityOnError
returns Right
. This means that the reserveCaravan
function is only called if a caravan with enough capacity is available.
The checkCaravan
function will unconditionally execute if called, so as the final composition step, you'll need to figure out how to compose it into the overall postReservation
function in such a way that it's only called if checkCapacity
returns Left
.
In the previous incarnation of this example, the overall entry point for the HTTP request in question was this postReservation
function:
postReservation :: ReservationRendition -> IO (HttpResult ()) postReservation candidate = fmap toHttpResult $ runEitherT $ do r <- hoistEither $ validateReservation candidate i <- liftIO $ getReservedSeatsFromDB connStr $ date r hoistEither $ checkCapacity 10 i r >>= liftIO . saveReservation connStr
Is it possible to compose checkCaravan
into this function in such a way that it's only going to be executed if checkCapacity
returns Left
? Yes, by adding to the hoistEither $ checkCapacity 10 i r
pipeline:
import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT(..), hoistEither, right, eitherT) postReservation :: ReservationRendition -> IO (HttpResult ()) postReservation candidate = fmap toHttpResult $ runEitherT $ do r <- hoistEither $ validateReservation candidate i <- liftIO $ getReservedSeatsFromDB connStr $ date r eitherT (checkCaravan r) right $ hoistEither $ checkCapacity 10 i r >>= liftIO . saveReservation connStr
Contrary to F#, you have to read Haskell pipelines from right to left. In the second-to-last line of code, you can see that I've added eitherT (checkCaravan r) right
to the left of hoistEither $ checkCapacity 10 i r
, which was already there. This means that, instead of binding the result of hoistEither $ checkCapacity 10 i r
directly to the saveReservation
composition (via the monadic >>=
bind operator), that result is first passed to eitherT (checkCaravan r) right
.
The eitherT
function composes two other functions: the leftmost function is invoked if the input is Left
, and the right function is invoked if the input is Right
. In this particular example, (checkCaravan r)
is the closure being invoked in the Left
- and only in the Left
- case. In the Right
case, the value is passed on unmodified, but elevated back into the EitherT
context using the right
function.
(BTW, the above composition has a subtle bug: the capacity is still hard-coded as 10
, even though reserving extra caravans actually increases the overall capacity of the restaurant for the day. I'll leave it as an exercise for you to make the capacity take into account any reserved caravans. You can download all of the source code, if you want to give it a try.)
Haskell has strong support for composition of functions. Not only can you interleave pure and impure code, but you can also do it conditionally. In the above example, the eitherT
function holds the key to that. The overall flow of the postReservation
function is:
Left
or Right
) to an HTTP response
Haskell's type system is remarkably helpful here. Haskell programmers often joke that if it compiles, it works, and there's a morsel of truth in that sentiment. Both functions used with eitherT
must return a value of the same type, but the left function must be a function that takes the Left
type as input, whereas the right function must be a function that takes the Right
type as input. In the above example, (checkCaravan r)
is a partially applied function with the type Error -> EitherT Error IO Reservation
; that is: the input type is Error
, so it can only be composed with an Either Error a
value. That matches the return type of checkCapacity 10 i r
, so the code compiles, but if I accidentally switch the arguments to eitherT
, it doesn't compile.
I find it captivating to figure out how to 'click' together such interleaving functions using the composition functions that Haskell provides. Often, when the composition compiles, it works as intended.
Comments
This is something of a tangent, but I wanted to hint to you that Haskell can help reduce the boilerplate it takes to compose monadic computations like this.
The
MonadError
class abstracts monads which support throwing and catching errors. If you don't specify the concrete monad (transformer stack) a computation lives in, it's easier to compose it into a larger environment.I'm programming to the interface, not the implementation, by using
throwError
andreturn
instead ofLeft
andRight
. This allows me to dispense with calls tohoistEither
when I come to call my function in the context of a bigger monad:Note how
findCaravan
andreserveCaravan
only declare aMonadIO
constraint, whereascheckCaravan
needs to do both IO and error handling. The type class system lets you declare the capabilities you need from your monad without specifying the monad in question. The elaborator figures out the right number of calls tolift
when it builds theMonadError
dictionary, which is determined by the concrete type you choose form
at the edge of your system.A logical next step here would be to further constrain the effects that a given IO function can perform. In this example, I'd consider writing a separate class for monads which support calling the caravan service:
findCaravan :: MonadCaravanService m => ServiceAddress -> Int -> ZonedTime -> m (Maybe Caravan)
. This ensures thatfindCaravan
can only call the caravan service, and not perform any other IO. It also makes it easier to mock functions which call the caravan service by writing a fake instance ofMonadCaravanService
.F# doesn't support this style of programming because it lacks higher-kinded types. You can't abstract over
m
; you have to pick a concrete monad up-front. This is bad for code reuse: if you need to add (for example) runtime configuration to your application you have to rewrite the implementation of your monad, and potentially every function which uses it, rather than just tacking on aMonadReader
constraint to the functions that need it and adding a call torunReaderT
at the entry point to your application.Finally, monad transformers are but one style of effect typing;
extensible-effects
is an alternative which is gaining popularity.Hi Mark,
Thank you very much for the elaborate explanation. I'm also delighted that you stuck with my admittedly contrived example of using caravans to compensate for the restaurant's lack of space. Or is that nothing compared to some of the stranger real-life feature requests some of us have seen?
I agree with your point on my previous comment that my suggestion could be considered a leaky abstraction and would introduce unnecessary requirements to the implementation. It just feels strange to let go of the idea that the domain logic is to be unconditionally pure, and not just mostly pure with the occasional impure function passed in as an argument. It's like what you say towards the end of the post - I feel hesitant to mix branching code and composition code together. The resulting solution you propose here is giving me second thoughts though. The
postReservation
function didn't become much more complex as I'd feared, with the branching logic nicely delegated to theeitherT
function. The caravan logic also gets its own composition function that is easy enough to understand on its own. I guess I've got some thinking to do.So, a final question regarding this example: To what extent would you apply this technique when solving the same problem in F#? It seems that we are using an increasing amount of Haskell language features not present in F#, so maybe not everything would translate over cleanly.
Martin, I'm still experimenting with how that influences my F# code. I'd like to at least attempt to back-port something like this to F# using computation expressions, but it may turn out that it's not worth the effort.


GitCloner Online
GitCloner Online. Download Git Repos easily!
developer name of repo:
Repository name:
Download


Welcome to our Gym
Training is a global fitness community specializing in innovative, high-intensity group workouts that are fast, fun, and results-driven.When it comes to weight management, good nutrition is vital. F45 gives all members access to their own free personal nutrition program to achieve health objectives with daily meal plans, tracking, and community support.
Find a Trainee


HotPizzas
in your area
×
Oops!
That one was already sold.
×
Oops!
Something went wrong.


This is the plugin's main view, used to display global information.
It can contain tabs like this one, or the
layout of your choice.
See the
Clarity documentation for the list of UI components available.
Click in the top left corner to hide
the extra UI provided by the dev mode.