{{Infobox prepared food | name = Silver needle noodles | image = | caption = | alternate_name = Rat noodle | country = China | region = | creator = | course = | type = Chinese noodles | served = | main_ingredient = Rice flour | variations = | calories = | other = }} {{Chinese|t=銀針粉|t2=老鼠粉|s=银针粉|s2=老鼠粉|p=yín zhēn fěn (yin2 zhen1 fen3)|p2=lǎo shǔ fěn (lao3 shu3 fen3)|j=ngan4 jam1 fan2|l=silver needle noodle|poj=Niao Chu Hoon|j2=lou5 syu2 fan2|l2=rat noodle}}
Silver needle noodle ({{zh|t=銀針粉|s=银针粉|p=yín zhēn fěn}}) or Rat noodle ({{zh|c=老鼠粉|p=lǎo shǔ fěn}}) is a variety of Chinese noodles.<ref name="Amyc">Amy Chen. Short Rice Noodles / Lao Shu Fen 老鼠粉 - MaMaChineseCooking.com . Accessed January 12, 2007.</ref> It is short, about 5 cm long and 5 mm in diameter. It has a white semi-transparent colour. The noodle is available in many Chinese markets in Chinese populated areas such as Hong Kong, Taiwan, Indonesia, Malaysia and Singapore.
Contents |
Quite a number of names have been used to describe the noodle. The noodle is more commonly known as silver needle noodle in Hong Kong and Taiwan, and rat noodle in Malaysia and Singapore. It is known as locupan in Indonesia. The noodles are named as such because the shape of the noodles is long and tapered much like a rat's tail or a needle. {{columns-list|2|
}}
The noodles are made from ground rice flour but sometimes with some added cornstarch to reduce breakage during frying.<ref name="Amyc"/> As with most Chinese noodles, they are commercially produced and seldom homemade as it is too tedious to make a small amount for home consumption.<!--Are they sold dried, or soft in plastic packages, or both?-->
The noodles may be stir-fried, scalded and flavored with a mixture of sauces, cooked in soup or cooked dry in a clay-pot. As with most Chinese noodles, it can be served for breakfast, lunch or dinner as a main course or supplementing a rice meal. Many Chinese restaurants, hawkers and roadside stalls serve the noodle in various forms. One of the famous dishes that can be found widely in Southeast Asia is Clay-Pot Lao Shu Fen.<ref>http://www.seasiafood.com/claypot-lao-shu-fen/</ref> The purpose of using clay-pot is to keep warmth of the dish and make the dish look more appetizing.
{{reflist}}
{{Chinese noodles}}


Demonstrates now a UIfield can be returned to a NULL value in both V and C code.
When designed a user interface it can often be useful to be able force the user to enter data again. For some components this can be done by setting them to a know default value. For other components, such as text boxes, this can be done by resetting them to a NULL value. This project demonstrates now the UIfield component can be reset to a NULL value. Examples are provided that do this in module C code and network editor V code.
Resetting through Network Editor V code
Returning a UIfield to a NULL value can be achieved by simply executing the following V statement:
MyField.value = ;However normally you would want to reset a field interactively, when a button is pressed or a calculation has completed. This can be achieved by using the parse_v module. This module executes a specified V statement whenever it is triggered. Hence it can be setup so that it can reset the UIfield component whenever a button is pressed. This is shown in the V_Ret2NullEg example application.
Resetting through Module C code
Returning a UIfield to a NULL value in C code can be achieved in a similar way to V code. Primarily it is necessary to set the MyField.value object equal to the OMnull_obj object. OMnull_obj is a special object that is used by the Object Manager to represent a NULL or empty value. However as we wish to use this function interactively we need to detect when the module has been triggered by an external input. This can be done by using the OMchanged() function to test if the parameter has changed.
The ReturnToNull module and source code provides a simple implementation of this. The C_Ret2NullEg example application shows how this module can be used.
&ui_field
Reference to a UIfield component that is to be returned to NULL by the ReturnToNull module.
trigger
Integer trigger parameter used by the ReturnToNull module. Whenever this parameter is set to 1 the referenced UIfield component to returned to NULL.
xp_comm_proj/ret2null/rt2nmods.v contains the V definition of the ReturnToNull low-level module.
xp_comm_proj/ret2null/rt2nmacs.v contains the V definitions of the example applications V_Ret2NullEg and C_Ret2NullEg.
The low-level Ret2NullMods library containing the module does not specify a process. By default the express process will be used.
Leigh J. Grundy Advanced Visual Systems, Inc. Andrew Dodd International AVS Centre
AVS module parse_v


findNative preferred over RawSql
Note that findNative is preferred over RawSql. findNative
uses automatic mapping of columns to properties and is nicer and simpler to use.
We really only need to use RawSql when we hit one of the limitations of findNative.
RawSql - unparsed
With unparsed
RawSql we explicitly specify the SQL to use and explicitly map
columns to properties. The SQL can contain positioned parameters with ?
or named parameters like :foo
.
The RawSql instance is immutable and safe for multi-threaded use and can be declared as a static final.
With unparsed
RawSql we can NOT specify additional expressions to the WHERE
and HAVING clauses as well as set the ORDER BY and LIMIT OFFSET clauses. We can only do that
with parsed
RawSql.
Example - using positioned parameters
static final RawSql rawSql =
RawSqlBuilder
.unparsed("select r.id, r.name from o_customer r where r.id >= ? and r.name like ?")
.columnMapping("r.id", "id")
.columnMapping("r.name", "name")
.create();
...
List<Customer> list = DB.find(Customer.class)
.setRawSql(rawSql)
.setParameter(42)
.setParameter("R%")
.findList();
Example - using named parameters
static final RawSql rawSql =
RawSqlBuilder
.unparsed("select r.id, r.name from o_customer r where r.id >= :a and r.name like :b")
.columnMapping("r.id", "id")
.columnMapping("r.name", "name")
.create();
...
List<Customer> list = DB.find(Customer.class)
.setRawSql(rawSql)
.setParameter("a", 42)
.setParameter("b", "R%")
.findList();
RawSql - parsed
With parsed
RawSql we can dynamically add expressions to the WHERE and HAVING
clauses as well as set the ORDER BY and LIMIT OFFSET clauses.
The RawSql instance is immutable and safe for multi-threaded use and can be declared as a static final.
// Use raw SQL with an aggregate function
String sql
= " select order_id, o.status, c.id, c.name, sum(d.order_qty*d.unit_price) as totalAmount"
+ " from orders o"
+ " join customer c on c.id = o.customer_id "
+ " join order_detail d on d.order_id = o.id "
+ " group by order_id, o.status ";
static final RawSql rawSql = RawSqlBuilder
// let ebean parse the SQL so that it can add
// expressions to the WHERE and HAVING clauses
.parse(sql)
// map resultSet columns to bean properties
.columnMapping("order_id", "order.id")
.columnMapping("o.status", "order.status")
.columnMapping("c.id", "order.customer.id")
.columnMapping("c.name", "order.customer.name")
.create();
...
List<OrderAggregate> list = DB.find(OrderAggregate.class);
query.setRawSql(rawSql)
// add expressions to the WHERE and HAVING clauses
.where().gt("order.id", 42)
.having().gt("totalAmount", 20)
.findList();
fetch
When using RawSql we can use fetchQuery
to fetch other parts of the object graph.
That is, we are using RawSql for the "root" or "origin" query and can use fetchQuery
to fetch other related parts of the graph.
// fetch additional parts of the object graph
// after the Raw SQL query is executed.
String sql
= " select order_id, sum(d.order_qty*d.unit_price) as totalAmount "
+ " from order_detail d"
+ " group by order_id ";
static final RawSql rawSql = RawSqlBuilder
.parse(sql)
.columnMapping("order_id", "order.id")
.create();
...
Query<OrderAggregate> query = DB.find(OrderAggregate.class);
query.setRawSql(rawSql)
// get ebean to fetch parts of the order and customer
// after the raw SQL query is executed
.fetchQuery("order", "status,orderDate",new FetchConfig().query())
.fetchQuery("order.customer", "name")
.where().gt("order.id", 0)
.having().gt("totalAmount", 20)
.order().desc("totalAmount")
.setMaxRows(10);
This is the OrderAggregate bean used in the examples above.
package com.avaje.tests.model.basic;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import com.avaje.ebean.annotation.Sql;
/**
* An example of an Aggregate object.
*
* Note the @Sql indicates to Ebean that this bean is not based on a table but
* instead uses RawSql.
*
*/
@Entity
@Sql
public class OrderAggregate {
@OneToOne
Order order;
Double totalAmount;
Double totalItems;
public String toString() {
return order.getId() + " totalAmount:" + totalAmount + " totalItems:" + totalItems;
}
public Order getOrder() {
return order;
}
public void setOrder(Order order) {
this.order = order;
}
public Double getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(Double totalAmount) {
this.totalAmount = totalAmount;
}
public Double getTotalItems() {
return totalItems;
}
public void setTotalItems(Double totalItems) {
this.totalItems = totalItems;
}
}
tableAliasMapping()
tableAliasMapping() will automatically map columns from the query results to the associated object based on its path. It does this using the query alias. This is a convenience method so that you don't have to map each column individually.
So a test case looks like:
static final String rs =
"select o.id, o.status, c.id, c.name, "+
" d.id, d.order_qty, p.id, p.name " +
"from orders o join customer c on c.id = o.customer_id " +
"join order_detail d on d.order_id = o.id " +
"join product p on p.id = d.product_id " +
"where o.id <= :maxOrderId and p.id = :productId "+
"order by o.id, d.id asc";
static final RawSql rawSql = RawSqlBuilder.parse(rs)
.tableAliasMapping("c", "customer")
.tableAliasMapping("d", "details")
.tableAliasMapping("p", "details.product")
.create();
...
List<Order> ordersFromRaw = DB.find(Order.class)
.setRawSql(rawSql)
.setParameter("maxOrderId", 2)
.setParameter("productId", 1)
.findList();
Rather than using columnMapping like:
static final RawSql rawSql = RawSqlBuilder.parse(rs)
.columnMapping("t0.id", "id")
.columnMapping("t0.status", "status")
.columnMapping("t1.id", "customer.id")
.columnMapping("t1.name", "customer.name")
.columnMapping("t2.id", "details.id")
.columnMapping("t2.order_qty", "details.orderQty")
.columnMapping("t3.id", "details.product.id")
.columnMapping("t3.name", "details.product.name")
.create();
Named queries
We can programmatically use raw SQL like the following examples or put the Raw SQL and
column mappings into ebean-orm.xml
file and reference them as
'named queries' - see database.createNamedQuery().


In this demo we finally have the necessary tools to cast rays at a sphere and color the canvas based on the intersections.
There isn't any notion of lighting yet, so even though we're technically intersecting with a sphere it will be indistinguishable from a circle.
You can also redraw the sphere with some transforms:


ATLAS
ATLAS
Vocabulary Search
Recent Concepts
Concept Set
Import
Cohort Definitions
Profiles
Cohort Reporting
Feasibility
Jobs
Configure
Feedback
Loading...
Configure
Application Initialization Failed
Unable to connect to an instance of the WebAPI. Please contact your administrator to resolve this issue.
Configured Services
Template


Comparison between AVIF encoders
Please note that SVT-AV1 only supports YUV420 colorspace.
Bits per pixel at equivalent quality according to SSimulacra
Bits per pixel at equivalent quality according to DSSIM
Bits per pixel at equivalent quality according to Butteraugli
Bits per pixel at equivalent quality according to PSNR-HVS
Bits per pixel at equivalent quality according to MSSSIM
Bits per pixel at equivalent quality according to SSIM
Bits per pixel at equivalent quality according to CIEDE2000
Bits per pixel at equivalent quality according to VMAF
Please note that VMAF is more suitable as a video codec comparison tool, not an image one.


Work-in-progress code to draw a representation of a Minecraft skin using JavaScript. Get it here.
Alas, apparently one can’t tell Chromium to use nearest-neighbor filtering, resulting in blurry scaling. Bug report.
Head accessories aren’t composited over the face until we figure out a way to detect whether the skin has an alpha channel. Drawing the supposed head accessory over the face from a skin without an alpha channel results in a missing face.


Before Change
vehicle_data[id_vehicle]={"departSpeed":departSpeed,"depart":depart,"type_vehicle":type_vehicle,"departPos":departPos,"depart_edges":depart_edges}
//To be changed
vehicles.add(id_vehicle,
initial_speed=departSpeed)
return vehicles,vehicle_data
After Change
departPos=vehicle.attrib["departPos"]
depart_edges=vehicle.findall("route")[0].attrib["edges"].split(" ")[0]
if type_vehicle not in type_data:
type_data[type_vehicle] = 1
else:
type_data[type_vehicle] += 1
vehicle_data[id_vehicle]={"departSpeed":departSpeed,"depart":depart,"type_vehicle":type_vehicle,"departPos":departPos,"depart_edges":depart_edges}
return vehicle_data, type_data


Why use our components?
Speed up development
You don't have to spend time developing your own components. You can utilize these well-designed components to speed up your development.
Accessibility support
Accessibilty is supported out of the box and we are always improving it. We care deeply about providing the best experience for all users.
Highly configurable
These components are designed to give high flexibility to developers and multiple ways of achieving the same outcomes.


{% load i18n %}
{% trans "Delete source" %}
{% blocktrans %}Are you sure you want to delete {{ file_name }}?{% endblocktrans %}
{{ file_name }}


Of course there's cholent. One of our most ancient of foods. But our's is not ancient at all! Freshly made, hot, delecious, and there's even MEAT!
click on the photo below for more info on cholent
Ahh Kugel. That delecious blend of potatoes, onions, and salt. Add our special MJ's cooking oil and you'll taste the finest potato cake in town!
click on the photo below for more info on kugel
What is cholent without kishkeh? (Disclaimer: not for the faint of stomach)
click on the photo below for more info on kishkeh
You know what they say "Torah is like a cold cup of pepsi after chulent!"? Well here's your pepsi!
click on the photo below for more info on cups (the paper kind)


City |
|
|---|---|
| {{city.cityname}} | {{city.state}} |
| Can't find your city? Suggest it! |
Category |
|
|---|---|
| {{ category.ctgname}} | |
| Can't find appropriate category? Suggest it! |
[Solved] [In Progress] {{problem.text}}
Location: {{problem.address}}
Category: {{problem.ctgname}}
Submitted by {{problem.username}} on {{problem.created}}


WITNESS LIST Appropriations-S/C on Health & Human Services Committee February 17, 2003-7:30A Budget For: Barker, Brigitte B. (Self) Block, Roy (Self and Texas Foster Family Association) Bolt, Zack B. (Self) Downey, Jack (Texas Alliance of Child and Family Services) Griffin, Sue (Self) Lopez, Gloria (Self) Loring, Jennifer (Self) McClure, Madeline (Child Abuse Prevention Advocacy Commission) McCown, F. Scott (Center for Public Policy Priorities) McElvain, Robin (Self) Mersberger, Cindy (Self) Morales, III, Joe D. (Self) Pierson, Thomas Charles (Big Brothers Big Sisters) Ramthum, Margie (Self) Rogers, Nancy (Self) Shiver, Elaine (Mental Health Association in Texas) Steiner, Dwight L. (Self) Tod, Theresa (Texas Network of Youth Services) Vogel, Kim (K'Star Youth and Family Services) Zelasko, Terri (Self) Against: Anglin, Daniel E. (Self) Carpenter, Elizabeth (The Challenge Club) Carpenter, Leslie (Tarrant County Child Protective Services Board) Craven, Susan (Texans Care For Children) Johnson, Dan (Self and David Rivas) Kelly, Shirley (Self) Kenney, Robert (Self) Lambert, Bobby (Self and For Children's Sake) Loving, Don (Communities in Schools of Texas, Inc.) Madden, Tara (Self) McCullough, Scott (Self) McGee, Robyn (Self) Myers, Elizabeth F. (Big Brothers Big Sisters, Alamo Area) Thompson, Lynn (Big Brothers Big Sisters of Central Texas) Warren, Larry W. (Self) On: Chapmond, Thomas (Department of Protective and Regulatory Services) Eells, Karen (Department of Protective and Regulatory Services) Hayes, Aaryce (Advocacy, Inc.) Hoffman, Richard (Department of Protective and Regulatory Services) Krueger, Donna (Department of Protective and Regulatory Services)


Level
Points
Jewels
Player 1
Level up!

GAME OVER
Level
Points
Jewels
Jewels
INSERT COIN
1 Player
1 vs 1
SCORE
0
GAME OVER
Try Again
PLAYER 1
0
PLAYER 2
0
WINNER
Play Again


Enable Query Helper This enables the the OpenTSDB query helper when using the datasource. If you are using Bosun with OpenTSDB and are indexing your OpenTSDB data to Bosun, you can use this to build q() functions based on the metadata Bosun has.
Enable pre-release features This enables new features that depend on unreleased versions of Bosun. If you're running of a recent build, you can enable those new features now.
OpenTSDB URLRequired for metric autocompletion
Annotate URLLink to root of bosun UI for links to edit annotations. Usually the same as the datasource. To enable annotations in Bosun, you need elastic and something like the following in Bosun's configuration: annotateElasticHosts=http://ny-lselastic01.ds.stackexchange.com:9200,http://ny-lselastic02.ds.stackexchange.com:9200
Auth TokenIf auth is enabled, this token will be used to for requests
made to bosun. Note that the storage of the token is currently not secure at this time.


auth
auth_info
interval
interval_info
cookieAlt
cookieAlt_info
overwrite
overwrite_info
proxy
proxy_info


Gender
Male
Female
DoB
create patient
Already registered?
Sign In
create doctor
Already registered?
Sign In
login
Register as:
Patient
Doctor


Class Rotation
- java.lang.Object
-
- algorithms.imageProcessing.transform.Rotation
-
public class Rotation extends java.lang.Object
a utility class holding rotations associated with euler angles, quaternions, and angle-axis representations (using rodrigues formula for the later). a rotation matrix describes a transformation in euclidean space. it is a member of special orthogonal group SO(n) where n is usually 3, but can be 4 for quaternion rotation matrix. It has the properties R^T = R^−1 and det(R) = +-1.det(R)=1 is a proper rotation matrix. rotation angles are counterclockwise. it's a special orthogonal matrix and provides the defining matrix representation of the group of proper n-dimensional rotations, denoted by SO(n). http://scipp.ucsc.edu/~haber/ph251/rotreflect_17.pdf det(R)=-1 is an improper rotation matrix representing rotations that require mirrors. The most general improper rotation matrix is a product of a proper rotation by an angle θ about some axis nˆ and a mirror reflection through a plane that passes through the origin and is perpendicular to nˆ. NOTE: nˆ is determined by the right hand rule.
This Rotation.java class uses "active" rotations of vectors counterclockwise in a right-handed coordinate system (y counterclockwise from x) by pre-multiplication (R on the left). If any one of these is changed (such as rotating axes instead of vectors, a "passive" transformation), then the inverse of the example matrix should be used, which coincides with its transpose. e.g. (A*B*C)^-1 = (C^-1) * (B^-1) * (A^-1). from: "Tutorial: Consistent Representations of and Conversions Between 3D Rotations" by Rowenhorst, Rollett, Rohrer, Groeber, Jackson, Konijnenberg, and De Graef. Modelling Simulation Mater. Sci. Eng. A rotation can be viewed as operating on the object, which is the active interpretation, or operating on the reference frame, which is the passive interpretation. An active rotation transforms object coordinates to new coordinates in the same reference frame; for the passive interpretation, the initial and final reference frames are different.- RIGHT HAND SYSTEM
R(q) = | (w^2 + x^2 - y^2 - z^2) 2(xy - wz) 2(xz + wy) | | 2(xy + wz) w^2 - x^2 + y^2 - z^2) 2(yz - wx) | | 2(xz - wy) 2(yz + wx) (w^2 - x^2 - y^2 + z^2) | rewritten R(q) = | 1-2*(y^2 + z^2) 2(xy - zw) 2(xz + yw) | | 2(xy + zw) 1-2(x^2 + z^2) 2(yz - xw) | | 2(xz - yw) 2(yz + xw) 1-2(x^2 + y^2) |
Quaternions can be derived from the axis/angle representation through the formula q = (v, w) = (sin(theta)*n_hat,cos(theta)), where n_hat and theta are the rotation axis and angle. cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | two ways that the skew matrix are expressed are transposed from one another: [v]_x = | 0 -z y | this one is used in MatrixUtil.skewSymmetric() | z 0 -x | | -y x 0 | [v]_x = | 0 z -y | | -z 0 x | | y -x 0 | Eigen, ROS, and Google Ceres use Hamilton convention. Also Wolfram Mathematica, Matlab’s aerospace(!) and robotics toolbox, Boost, GNU Octave, NASA’s SPICE. Note that Shuster 1993 use rotation matrices that are transposed from the standard in createRotationZYX(): about z-axis (yaw): about the y-axis (pitch): about x-axis (roll): | cos φ sin φ 0 | | cos ψ 0 -sin ψ | | 1 0 0 | |-sin φ cos φ 0 | | 0 1 0 | | 0 cos θ sin θ | | 0 0 1 | | sin ψ 0 cos ψ | | 0 -sin θ cos θ | The Shuster transposed matrices are not used in this class.Some references in the "right hand system": "Euler Angles and Quaternions and Transformations", NASA Mission Planning and Analysis Division, 1977, Shuttle Program. Szeleski 2010 Shuster 1993, "A Survey of Attitude Representations" Journal of Astronautical Sciences, Vol 41, No. 4, Oct-Dec 1993, pp 439-517 http://www.ladispe.polito.it/corsi/Meccatronica/02JHCOR/2011-12/Slides/Shuster_Pub_1993h_J_Repsurv_scan.pdf "Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors" James Diebel, 2006
A left hand system, in contrast, is used by aerospace engineering and aerospace medicine to describe the z-axis as pointing downwards (in the direction of gravity w.r.t. a geo-centric system.) Chapter 4, "Human Response to Acceleration" by Banks, Brinkly, Allnut, and Harding in "Fundamentals of Aerospace Medicine" Excerpt: "For example, the Advisory Group for Aerospace Research and Development (AGARD) standard for human acceleration differs from the AGARD standard for aircraft design (in which the z-acceleration axis is reversed and positive downward). ...consistent with the AGARD standard (1), the Table of Equivalents for Acceleration Terminology (2), the Aviation Space and Environmental Medicine Standard (3), and the majority of the Aerospace Medicine literature, the positive direction of each of these axes is here described by ‘‘the left-hand rule.’’ That is, the x-axis dimension is an arrow with the positive direction forward, the y-axis dimension has the positive direction rightward, and"- LEFT HAND SYSTEM
Regarding rotation axes and perspectives: https://en.wikipedia.org/wiki/Rotation_matrix#Ambiguities The coordinates of a point P may change due to either a rotation of the coordinate system CS (alias), or a rotation of the point P (alibi). In the latter case, the rotation of P also produces a rotation of the vector v representing P. In other words, either P and v are fixed while CS rotates (alias), or CS is fixed while P and v rotate (alibi). Any given rotation can be legitimately described both ways, as vectors and coordinate systems actually rotate with respect to each other, about the same axis but in opposite directions. Throughout this article, we chose the alibi approach to describe rotations. For instance, R(theta)= | cos(theta) -sin(theta) | | sin(theta) cos(theta) | represents a counterclockwise rotation of a vector v by an angle θ, or a rotation of the coordinate system (CS) by the same angle but in the opposite direction (i.e. clockwise). Alibi and alias transformations are also known as active and passive transformations, respectively. Pre-multiplication or post-multiplication The same point P can be represented either by a column vector v or a row vector w. Rotation matrices can either pre-multiply column vectors (Rv), or post-multiply row vectors (wR). However, Rv produces a rotation in the opposite direction with respect to wR. Throughout this article, rotations produced on column vectors are described by means of a pre-multiplication. To obtain exactly the same rotation (i.e. the same final coordinates of point P), the equivalent row vector must be post-multiplied by the transpose of R (i.e. wR^T). skew symmetric of vector v is [v]_x: | 0 -v[2] v[1] | | v[2] 0 -v[0] | | -v[1] v[0] 0 | e^(i*theta) = cos(theta) + i*sin(theta) exponential of a matrix is expanded via power series: e^A = I + A + (higher order terms AA/2! + AAA/3!...) for A = | 0 -1 | | 1 0 | e^(A*t) = | cos(t) -sin(t) | through diagonalizing A | sin(t) cos(t) | for A being skew symmetric: | 0 -z y | | z 0 -x | | -y x 0 | e^(A*theta) = I + A*sin(theta) +A^2*(1 - cos(theta)) R_axis = exp(-[e_axis]_x*theta_axis) R_x = exp(-[1,0,0]_x * theta_x) = exp( 0 0 0 )*theta_x ) 0 0 1 0 -1 0 terms used describing axes of rotation, attitute or orientation: heading, attitude, bank, pitch, yaw, roll, pan, tilt, roll A rotation can be represented by a rotation axis nˆ and an angle ω, or equivalently by a 3D vector ω = θ*nˆ to project vector v onto the axis nˆ: v_parallel = nˆ*(nˆ· v) = (nˆ*nˆ^T)*v and this is not affected by rotation v_perpendicular = v - v_parallel = (I - nˆ*nˆ^T)*v can rotate v by 90 degrees using the cross product: nˆ cross v = [nˆ]_x * v where [nˆ]_x is the skewsymmetric matrix of nˆ can rotate v by 180 degrees: nˆ cross (nˆ cross v) = ([nˆ]_x)^2 * v = -v_perpendicular which shows that can also write v_parallel = (I + ([nˆ]_x)^2 * v)
- Author:
- nichole
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Rotation.AuxiliaryArrays
-
Constructor Summary
Constructors Constructor Description Rotation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]
applyRotationPerturbationToQuaternion(double[] theta, double[] dTheta)
apply perturbation dTheta to quaternion formed from euler rotation angles theta.static double[]
applySingularitySafeRotationPerturbationQuaternion(double[] theta, double[] dTheta)
create a unit-length quaternion update of the quaternion formed from the euler rotation angles theta by the perturbation dTheta.static double[][]
applySingularitySafeRotationPerturbationRVecXYZ(double[] dPhiRotationVector, double[] theta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z.static double[][]
applySingularitySafeRotationPerturbationRVecZYX(double[] dPhiRotationVector, double[] theta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z.static double[][]
applySingularitySafeRotationPerturbationXYZ(double[] theta, double[] dTheta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z.static double[][]
applySingularitySafeRotationPerturbationZYX(double[] theta, double[] dTheta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_z*R_y*R_x.static double[]
convertEulerAnglesToRodriguesVectorForZYX(double[] eulerAngles)
convert the euler rotation angles to the Rodrigues vector (angle and axis) with an expectation that the rotation matrix in between is created by the multiplication order R_z*R_y_R_x.static double[]
convertHamiltonToBarfootQuaternion(double[] qHamilton)
convert the quaternion from [scalar vector] to [vector scalar].static void
convertHamiltonToBarfootQuaternionInPlace(double[] qHamilton)
convert the quaternion from [scalar vector] to [vector scalar] in-place.static double[][]
createDeltaQ(double[] theta, double[] dTheta)
create perturbation for a quaternion from a perturbation to euler rotation angles.static double[]
createHamiltonQuaternionZYX(double[] thetas)
calculate the Hamilton quaternion which would be extracted from the rotation matrix created by R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z).static double[]
createHamiltonQuaternionZYX(double angle, double[] axis)
calculate the Hamilton quaternion which would be extracted from the rotation matrix created by R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z).static double[]
createIdentityQuaternion()
given a quaternion, return the inversestatic double[][]
createPitchRotationMatrix(double angle)
create matrix for rotation about the Y-axis, a.k.a.static void
createPitchRotationMatrix(double angle, double[][] out)
create matrix for rotation about the Y-axis, a.k.a.static double[]
createQuaternionZYXFromEuler(double[] eulerXYZ)
create a rotation quaternion from Euler x, y, z angles.static double[][]
createRodriguesFormulaRotationMatrix(double[] axis)
given axis as an array of rotations about x, y, and z, calculate the rotation matrix.static double[][]
createRodriguesFormulaRotationMatrixTranspose(double[] v)
given v as an array of rotations about x, y, and z, calculate the transpose of the rotation matrix.static double[][]
createRollRotationMatrix(double angle)
create matrix for rotation about the X-axis, a.k.a.static void
createRollRotationMatrix(double angle, double[][] out)
create matrix for rotation about the X-axis, a.k.a.static double[][]
createRotationFromQuaternion(double[] theta)
create the rotation matrix from quaternions formed by the euler rotation angles theta.static double[][]
createRotationFromUnitLengthAngleAxis(double[] unitLengthAxis, double angle)
from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049.static double[][]
createRotationMatrixFromQuaternion4(double[] quaternion)
create a [4x4] rotation matrix from the given quaternion.static double[]
createRotationVector(double[] theta, double[] dTheta)
create the rotation vector dPhi = S(theta) * dThetastatic double[][]
createRotationXYZ(double[] thetas)
given an array of euler rotation angles, return the rotation matrix as the rotations for x, y, z multiplied in that order.static double[][]
createRotationXYZ(double angleX, double angleY, double angleZ)
calculate R(angle_z, angle_y, angle_x) = R_x(angle_x)*R_y(angle_y)*R_z(angle_z).static double[][]
createRotationZYX(double[] thetas)
calculate R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z) , that is, given an array of rotation angles, return the rotation matrix as the rotations for z, y, x multiplied in that order.static void
createRotationZYX(double[] thetas, Rotation.AuxiliaryArrays aa, double[][] out)
given an array of euler rotation angles, return the rotation matrix as the rotations for z, y, x multiplied in that order.static double[]
createUnitLengthQuaternionBarfoot(double[] unitLengthAxis, double angle)
static double[]
createUnitLengthQuaternionHamilton(double[] unitLengthAxis, double angle)
static double[][]
createYawRotationMatrix(double angle)
create matrix for rotation about the Z-axis, a.k.a.static void
createYawRotationMatrix(double angle, double[][] out)
create matrix for rotation about the Z-axis, a.k.a.static double
distanceBetweenQuaternions(double[] q1, double[] q2)
calculate the distance metric between quaternions, using vector inner productstatic double[]
extractRodriguesRotationVector(double[][] r)
another method to extract the Rodrigues vector (angle and axis) from the given rotation matrix.static double[]
extractRotationAxisFromZXY(double[][] r)
extract the euler rotation angles from the given rotation matrix assumed to be a result of R_yxz = R_z(theta_z) * R_x(theta_x) * R_y(theta_y) (aka 2-1-3 angle set?).static double[]
extractThetaFromXYZ(double[][] r)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z).static void
extractThetaFromXYZ(double[][] r, double[] out)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z).static double[]
extractThetaFromZYX(double[][] r)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_xyz = R(theta_Z) * R(theta_Y) * R(theta_X).static void
extractThetaFromZYX(double[][] r, double[] out)
extract euler rotation angles from a rotation matrix which has been built following the convention of R(theta_Z) * R(theta_Y) * R(theta_X).static double[][]
procrustesAlgorithmForRotation(double[][] x1, double[][] x2)
determine the rotation between measurements x1 and x2 when both datasets have the same center, that is, there is no translation between them, only rotation.static double[]
quaternionConjugateOperator(double[] quaternion)
given a quaternion, return the inverse (symbol is superscript -1)static double[][]
quaternionLefthandCompoundOperator(double[] quaternion)
given a quaternion, form the left-hand compound operator (symbol is superscript +)static double[]
quaternionPrincipalAxisRotation(double angle, int principalAxis)
static double[][]
quaternionRighthandCompoundOperator(double[] quaternion)
given a quaternion, form the right-hand compound operator: (symbol is superscript ⨁)static double[]
rotateAPointByQuaternion(double[] quaternion, double[] v3)
rotate point p by the given quaternion.static double[]
rotateVectorByQuaternion4(double[] quaternion, double[] p)
rotate point p by the given quaternion.static double[][]
rotationBetweenTwoDirections0(double[] v1, double[] v2)
calculate the rotation needed to tranform direction v1 to direction v2 using a quaternion.static double[][]
rotationBetweenTwoDirections1(double[] v1, double[] v2)
calculate the rotation needed to tranform direction v1 to direction v2 using Rodrigues formula.static double[][]
sTheta(double[] theta)
calculate S_theta which is the matrix relating angular velocity to rotation angle rates.static void
sTheta(double[] theta, double[][] output)
calculate S_theta which is the matrix relating angular velocity to rotation angle rates.
-
-
-
Method Detail
-
createRotationXYZ
public static double[][] createRotationXYZ(double angleX, double angleY, double angleZ)
calculate R(angle_z, angle_y, angle_x) = R_x(angle_x)*R_y(angle_y)*R_z(angle_z). NOTE: this is not the normal convention. You might want to use createRotationZYX().cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ |
- Parameters:
angleX
- angle of rotation about x-axis (roll) in units of radians.angleY
- angle of rotation about y-axis (pitch) in units of radians.angleZ
- angle of rotation about z-axis (yaw) in units of radians.- Returns:
-
createRollRotationMatrix
public static double[][] createRollRotationMatrix(double angle)
create matrix for rotation about the X-axis, a.k.a. roll.about x-axis (roll): | 1 0 0 | | 0 cos θ -sin θ | | 0 sin θ cos θ |
- Parameters:
angle
- angle of rotation about x-axis (roll) in units of radians.- Returns:
-
createRollRotationMatrix
public static void createRollRotationMatrix(double angle, double[][] out)
create matrix for rotation about the X-axis, a.k.a. roll.about x-axis (roll): | 1 0 0 | | 0 cos θ -sin θ | | 0 sin θ cos θ |
- Parameters:
angle
- angle of rotation about x-axis (roll) in units of radians.out
- holds values for rotation matrix for roll.
-
createPitchRotationMatrix
public static double[][] createPitchRotationMatrix(double angle)
create matrix for rotation about the Y-axis, a.k.a. pitch.about the y-axis (pitch): | cos ψ 0 sin ψ | | 0 1 0 | | -sin ψ 0 cos ψ |
- Parameters:
angle
- angle of rotation about y-axis (pitch) in units of radians.- Returns:
-
createPitchRotationMatrix
public static void createPitchRotationMatrix(double angle, double[][] out)
create matrix for rotation about the Y-axis, a.k.a. pitch.about the y-axis (pitch): | cos ψ 0 sin ψ | | 0 1 0 | | -sin ψ 0 cos ψ |
- Parameters:
angle
- angle of rotation about y-axis (pitch) in units of radians.out
- holds values for rotation matrix for pitch
-
createYawRotationMatrix
public static double[][] createYawRotationMatrix(double angle)
create matrix for rotation about the Z-axis, a.k.a. yaw.about z-axis (yaw): | cos φ -sin φ 0 | | sin φ cos φ 0 | | 0 0 1 |
- Parameters:
angle
- angle of rotation about z-axis (yaw) in units of radians.- Returns:
-
createYawRotationMatrix
public static void createYawRotationMatrix(double angle, double[][] out)
create matrix for rotation about the Z-axis, a.k.a. yaw.about z-axis (yaw): | cos φ -sin φ 0 | | sin φ cos φ 0 | | 0 0 1 |
- Parameters:
angle
- angle of rotation about z-axis (yaw) in units of radians.out
- results for a rotation matrix for yaw. size given to method must be 3X3.
-
rotationBetweenTwoDirections0
public static double[][] rotationBetweenTwoDirections0(double[] v1, double[] v2)
calculate the rotation needed to tranform direction v1 to direction v2 using a quaternion.- Parameters:
v1
-v2
-- Returns:
-
rotationBetweenTwoDirections1
public static double[][] rotationBetweenTwoDirections1(double[] v1, double[] v2)
calculate the rotation needed to tranform direction v1 to direction v2 using Rodrigues formula.- Parameters:
v1
-v2
-- Returns:
-
createRodriguesFormulaRotationMatrix
public static double[][] createRodriguesFormulaRotationMatrix(double[] axis)
given axis as an array of rotations about x, y, and z, calculate the rotation matrix. essentially, excepting a small angle correction: R^⊤ = cosθ*I + sinθ*[v]_× + (1−cosθ)*v*v^⊤ NOTE: if computing the partial derivative of Rotation elsewhere, can use d(R(ω)*v)/d(ω^T) = -[v]_x (see Equation (2.35) of Szeliski 2010). Also note that a + sign in front of the sinθ term is used for the passive system of rotations and these are used in dynamics, mathematics, and computer science, etc. A - sign in front of the sinθ term is used in aerospace engineering and medicine as the later use the "left hand rule" for coordinate axes.references: Dmitry Berenson https://github.com/robEllenberg/comps-plugins/blob/master/python/rodrigues.py Szeliski 2010 draft "Computer Vision: Algorithms and Applications" Rodriguez’s formula (Ayache 1989)
- Parameters:
axis
- [1x3] array of axis of rotations about x, y, and z- Returns:
- rotation matrix [3X3]
-
createRodriguesFormulaRotationMatrixTranspose
public static double[][] createRodriguesFormulaRotationMatrixTranspose(double[] v)
given v as an array of rotations about x, y, and z, calculate the transpose of the rotation matrix. It is the same as the rodrigues rotation matrix without transposition, except that the sign in front of the sine term is negatvie. R^⊤ = cosθ*I − sinθ*[v]_× + (1−cosθ)*v*v^⊤references: Dmitry Berenson https://github.com/robEllenberg/comps-plugins/blob/master/python/rodrigues.py Szeliski 2010 draft "Computer Vision: Algorithms and Applications" Rodriguez’s formula (Ayache 1989) Metrics for 3D Rotations: Comparison and Analysis. Huynh 2009. J Math Imaging Vis (2009) 35: 155–164 DOI 10.1007/s10851-009-0161-2 https://www.cs.cmu.edu/~cga/dynopt/readings/Rmetric.pdf (note that Huynh uses Hamilton quaternions.)
- Parameters:
v
- [1x3] array of rotations about x, y, and z- Returns:
- rotation matrix [3X3]
-
procrustesAlgorithmForRotation
public static double[][] procrustesAlgorithmForRotation(double[][] x1, double[][] x2) throws no.uib.cipr.matrix.NotConvergedException
determine the rotation between measurements x1 and x2 when both datasets have the same center, that is, there is no translation between them, only rotation. (see Golub & van Loan "Matrix Computations" 11.12.4, Szeliski 2010, Sect 6.1.5).- Parameters:
x1
- a set of measurements having same center as x2, that is, there is no translation between them, only rotation. the expected format is nData X nDimensions.x2
- another set of measurements having same center as x1, that is, there is no translation between them, only rotation. the expected format is nData X nDimensions.- Returns:
- Throws:
no.uib.cipr.matrix.NotConvergedException
-
extractRotationAxisFromZXY
public static double[] extractRotationAxisFromZXY(double[][] r)
extract the euler rotation angles from the given rotation matrix assumed to be a result of R_yxz = R_z(theta_z) * R_x(theta_x) * R_y(theta_y) (aka 2-1-3 angle set?). Note, this way of extracting of the angles is ambiguous (there are more than one angle combination sets that will result in the same matrix).the method is from equation (37) from lecture notes of Gordon Wetzstein at Stanford University, EE 267 Virtual Reality, "Course Notes: 6-DOF Pose Tracking with the VRduino", https://stanford.edu/class/ee267/notes/ee267_notes_tracking.pdf
- Parameters:
r
- rotation matrix assumed to be a result of R_yxz = R_z(theta_z) * R_x(theta_x) * R_y(theta_y).- Returns:
- theta_x, theta_y, theta_z which, respectively have ranges [0, 2*pi], [0, pi], and [0, 2*pi]
-
extractThetaFromZYX
public static double[] extractThetaFromZYX(double[][] r)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_xyz = R(theta_Z) * R(theta_Y) * R(theta_X).- Parameters:
r
-- Returns:
- array of theta_x, theta_y, theta_z which, respectively have ranges [0, 2*pi], [0, pi], and [0, 2*pi]
-
extractThetaFromZYX
public static void extractThetaFromZYX(double[][] r, double[] out)
extract euler rotation angles from a rotation matrix which has been built following the convention of R(theta_Z) * R(theta_Y) * R(theta_X).- Parameters:
r
-out
- output variable to hold theta_x, theta_y, and theta_z, which, respectively have ranges [0, 2*pi], [0, pi], and [0, 2*pi]
-
extractThetaFromXYZ
public static double[] extractThetaFromXYZ(double[][] r)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z).- Parameters:
r
-- Returns:
- euler angles extracted from the rotation matrix under assumption that the rotation matrix was constructed with multiplication order R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z). theta_x, theta_y, and theta_z, respectively have ranges [0, 2*pi], [0, pi], and [0, 2*pi]
-
extractThetaFromXYZ
public static void extractThetaFromXYZ(double[][] r, double[] out)
extract euler rotation angles from a rotation matrix which has been built following the convention of R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z).- Parameters:
r
-out
- output array of size 3 used to place euler angles extracted from the rotation matrix under assumption that the rotation matrix was constructed with multiplication order R_X(theta_X) * R_Y(theta_Y) * R_Z(theta_Z).
-
extractRodriguesRotationVector
public static double[] extractRodriguesRotationVector(double[][] r)
another method to extract the Rodrigues vector (angle and axis) from the given rotation matrix. it's an ambiguous task.the method is from lecture notes of Pradit Mittrapiyanuruk at Perdue University, ECE 661 Robot Vision Laboratory, https://engineering.purdue.edu/kak/computervision/ECE661_Fall2012/homework/hw5_LM_handout.pdf
- Parameters:
r
- rotation matrix- Returns:
- Rodriques vector. the axis and angle representation from this can be constructed as angle of rotation = r_vec/||r_vec|| and angle = ||r_vec|| where r_vec is the rodrigues vector.
-
convertEulerAnglesToRodriguesVectorForZYX
public static double[] convertEulerAnglesToRodriguesVectorForZYX(double[] eulerAngles)
convert the euler rotation angles to the Rodrigues vector (angle and axis) with an expectation that the rotation matrix in between is created by the multiplication order R_z*R_y_R_x.- Parameters:
eulerAngles
- euler rotation angles as double[]{x, y, z}- Returns:
- Rodriques vector. the axis and angle representation from this can be constructed as angle of rotation = r_vec/||r_vec|| and angle = ||r_vec|| where r_vec is the rodrigues vector.
-
distanceBetweenQuaternions
public static double distanceBetweenQuaternions(double[] q1, double[] q2)
calculate the distance metric between quaternions, using vector inner producteqn (19) of J Math Imaging Vis (2009) 35: 155–164 DOI 10.1007/s10851-009-0161-2 Metrics for 3D Rotations: Comparison and Analysis Du Q. Huynh
- Parameters:
q1
- a quaternionq2
- another quaternion- Returns:
- distance metric between 2 quaternions. the range of values will be [0,π/2] (radians).
-
quaternionLefthandCompoundOperator
public static double[][] quaternionLefthandCompoundOperator(double[] quaternion)
given a quaternion, form the left-hand compound operator (symbol is superscript +)from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (2): given q = 4X1 column vector of [eps eta] where eta is the scalar, and "1" is a 3X3 identity matrix, also written as I_3. and [q]_x is the skew-symetric matrix for q. The left-hand compound operator is a 4X4 matrix: q^+ = [ eta*I_3-[q]_x eps ] [ -eps^T eta ] multiplication of quaternions, u and v, which is typically written as u ⊗ v may be written equivalently as either u^+ v or v^⨁ u,
- Parameters:
quaternion
- 4X1 column vector of [eps eta] where eta is the scalar- Returns:
-
quaternionRighthandCompoundOperator
public static double[][] quaternionRighthandCompoundOperator(double[] quaternion)
given a quaternion, form the right-hand compound operator: (symbol is superscript ⨁)from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (2): given q = 4X1 column vector of [eps eta] where eta is the scalar, and "1" is a 3X3 identity matrix, also written as I_3. and [q]_x is the skew-symetric matrix for q. The right-hand compound operator is a 4X4 matrix: q^⨁ = [ eta*I_3+[q]_x eps ] [ -eps^T eta ] multiplication of quaternions, u and v, which is typically written as u ⊗ v may be written equivalently as either u^+ v or v^⨁ u,
- Parameters:
quaternion
- 4X1 column vector of [eps eta] where eta is the scalar- Returns:
- [4X4]
-
quaternionConjugateOperator
public static double[] quaternionConjugateOperator(double[] quaternion)
given a quaternion, return the inverse (symbol is superscript -1)from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (5): given q = 4X1 column vector of [eps eta] where eta is the scalar, the inverse is the column vector: q^-1 = [ -eps eta ]
NOTE that if the quaternion is a unit-length quaternion, the conjugate operation is usually called the inverse operation.- Parameters:
quaternion
- 4X1 column vector of [eps eta] where eta is the scalar- Returns:
-
createIdentityQuaternion
public static double[] createIdentityQuaternion()
given a quaternion, return the inversefrom Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049, near eqn (8): creates identity element: [0 0 0 1]
- Returns:
- 4X1 column vector of [eps eta] where eta is the scalar, specifically [0, 0, 0, 1]
-
createRotationMatrixFromQuaternion4
public static double[][] createRotationMatrixFromQuaternion4(double[] quaternion)
create a [4x4] rotation matrix from the given quaternion.Note, the first [3X3] block is transposed compared to results from Rotation.createRotationZYX(eulerAngles) where double[] qHamilton = Rotation.createHamiltonQuaternionZYX(eulerAngles); double[] quaternion = Rotation.convertHamiltonToBarfootQuaternion(qHamilton); This method's results are consistent with Shuster 1993. The method follows Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (12): R = q^+ * q^(-1)^⨁ = q^(-1)^⨁ * q^+ = q^(⨁)^T * q^+ = [ C 0 ] [ 0^T 1 ] where C is the canonical 3X3 rotation matrix.
- Parameters:
quaternion
- rotation as a [4X1] column vector of [eps eta] where eta is the scalar.- Returns:
- a 4x4 rotation matrix whose 3X3 block at [0:2, 0:2] is the rotation matrix.
-
rotateAPointByQuaternion
public static double[] rotateAPointByQuaternion(double[] quaternion, double[] v3)
rotate point p by the given quaternion.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (11): v3 = [ p ] [ 0 ] rotated = q^+ * q^(-1)^⨁ * v3 = R*v3 where R is the canonical 3X3 rotation matrix.
- Parameters:
quaternion
- 4X1 column vector of [eps eta] where eta is the scalar.v3
- the point as 3 element array.- Returns:
-
rotateVectorByQuaternion4
public static double[] rotateVectorByQuaternion4(double[] quaternion, double[] p)
rotate point p by the given quaternion.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (11): v3 = [ p ] [ 0 ] rotated = q^+ * q^(-1)^⨁ * v3 = R*v3
- Parameters:
quaternion
- 4X1 column vector of [eps eta] where eta is the scalarp
- the vector as a 3 element array followed by a 0, = [4X1].- Returns:
-
applySingularitySafeRotationPerturbationZYX
public static double[][] applySingularitySafeRotationPerturbationZYX(double[] theta, double[] dTheta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_z*R_y*R_x. To the first order, this is a constraint-sensitive approach, i.e. r*r^T = I for the perturbed matrix to first order as long as it was true for the given matrix r.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (31) and (30c). "This update approach allows us to store and update the rotation as a rotation matrix, thereby avoiding singularities and the need to restore the constraint afterwards (i.e., constraint restoration is built in)."
- Parameters:
theta
- euler anglesdTheta
- perturbation to apply to the euler angles- Returns:
- resulting perturbed rotation matrix
-
applySingularitySafeRotationPerturbationXYZ
public static double[][] applySingularitySafeRotationPerturbationXYZ(double[] theta, double[] dTheta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z. To the first order, this is a constraint-sensitive approach, i.e. r*r^T = I for the perturbed matrix to first order as long as it was true for the given matrix r.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (31) and (30c). "This update approach allows us to store and update the rotation as a rotation matrix, thereby avoiding singularities and the need to restore the constraint afterwards (i.e., constraint restoration is built in)."
- Parameters:
theta
- euler anglesdTheta
- perturbation to apply to the euler angles- Returns:
- resulting updated rotation matrix, perturbed by dTheta
-
applySingularitySafeRotationPerturbationRVecXYZ
public static double[][] applySingularitySafeRotationPerturbationRVecXYZ(double[] dPhiRotationVector, double[] theta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z. To the first order, this is a constraint-sensitive approach.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (31). "This update approach allows us to store and update the rotation as a rotation matrix, thereby avoiding singularities and the need to restore the constraint afterwards (i.e., constraint restoration is built in).
- Returns:
-
applySingularitySafeRotationPerturbationRVecZYX
public static double[][] applySingularitySafeRotationPerturbationRVecZYX(double[] dPhiRotationVector, double[] theta)
apply a perturbation in rotation angles to the rotation matrix created by the euler angles theta where the rotation matrix created is R_x*R_y*R_z. To the first order, this is a constraint-sensitive approach.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (31). "This update approach allows us to store and update the rotation as a rotation matrix, thereby avoiding singularities and the need to restore the constraint afterwards (i.e., constraint restoration is built in).
- Parameters:
dPhiRotationVector
- perturbation of the rotation vectortheta
- euler angles representing the rotation matrix.- Returns:
-
sTheta
public static double[][] sTheta(double[] theta)
calculate S_theta which is the matrix relating angular velocity to rotation angle rates.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (21): calc C = 3X3 rotation matrix (often written as R) given array of euler rotation angles alpha, beta, gamma s_theta column 0 = C_gamma(theta[2]) * C_beta(theta[1]) * [1, 0, 0]^T column 1 = C_gamma(theta[2]) * [0, 1, 0]^T column 2 = [0, 0, 1]^T C_gamma C_beta C_alpha cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | theta[0] = angleX angle of rotation about x-axis (roll) in units of radians. can use createRollRotationMatrix(theta[0]) theta[1] = angleY angle of rotation about y-axis (pitch) in units of radians. can use createPitchRotationMatrix(theta[1]) theta[2] = angleZ angle of rotation about z-axis (yaw) in units of radians. can use createYawRotationMatrix(theta[2]) see also, pp 479-480, eqn (285) of Shuster 1993, "A Survey of AttitudeRepresentations" http://www.ladispe.polito.it/corsi/Meccatronica/02JHCOR/2011-12/Slides/Shuster_Pub_1993h_J_Repsurv_scan.pdf though the sign conventions of the sine terms are different
- Parameters:
theta
- euler angles as representation of rotation matrix- Returns:
- [3X3]
-
sTheta
public static void sTheta(double[] theta, double[][] output)
calculate S_theta which is the matrix relating angular velocity to rotation angle rates.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (21): calc C = 3X3 rotation matrix (oftern written as R) given array of euler rotation angles alpha, beta,gamma matrices s_theta column 0 = C_gamma(theta[2]) * C_beta(theta[1]) * [1, 0, 0]^T column 1 = C_gamma(theta[2]) * [0, 1, 0]^T column 2 = [0, 0, 1]^T C_gamma C_beta C_alpha cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | theta[0] = angleX angle of rotation about x-axis (roll) in units of radians. can use createRollRotationMatrix(theta[0]) theta[1] = angleY angle of rotation about y-axis (pitch) in units of radians. can use createPitchRotationMatrix(theta[1]) theta[2] = angleZ angle of rotation about z-axis (yaw) in units of radians. can use createYawRotationMatrix(theta[2]) see also, pp 479-480, eqn (285) of Shuster 1993, "A Survey of AttitudeRepresentations" http://www.ladispe.polito.it/corsi/Meccatronica/02JHCOR/2011-12/Slides/Shuster_Pub_1993h_J_Repsurv_scan.pdf though the matrices are transposed from these.
- Parameters:
theta
- euler angles as representation of rotation matrixoutput
-
-
createRotationZYX
public static double[][] createRotationZYX(double[] thetas)
calculate R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z) , that is, given an array of rotation angles, return the rotation matrix as the rotations for z, y, x multiplied in that order. from https://en.wikipedia.org/wiki/Davenport_chained_rotations "Any extrinsic rotation is equivalent to an intrinsic rotation by the same angles but with inverted order of elemental rotations, and vice versa. For instance, the intrinsic rotations x-y’-z″ by angles α, β, γ are equivalent to the extrinsic rotations z-y-x by angles γ, β, α."from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (18) where cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | = | (cos φ * cos ψ) (-sin φ * cos θ + cos φ * sin ψ * sin θ) (sin φ * sin θ + cos φ * sin ψ * cos θ) | | (sin φ * cos ψ) ( cos φ * cos θ + sin φ * sin ψ * sin θ) (-cos φ * sin θ + sin φ * sin ψ * cos θ) | | (-sin ψ) ( cos ψ * sin θ ) (cos ψ * cos θ) | = | (cosZ * cosY) (-sinZ * cosX + cosZ * sinY * sinX) (sinZ * sinX + cosZ * sinY * cosX) | | (sinZ * cosY) ( cosZ * cosX + sinZ * sinY * sinX) (-cosZ * sinX + sinZ * sinY * cosX) | | (-sinY) ( cosY * sinX ) (cosY * cosX) |
- Parameters:
thetas
- euler angles- Returns:
-
createRotationZYX
public static void createRotationZYX(double[] thetas, Rotation.AuxiliaryArrays aa, double[][] out)
given an array of euler rotation angles, return the rotation matrix as the rotations for z, y, x multiplied in that order.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (18) where cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ |
- Parameters:
thetas
- euler rotation anglesaa
- auxiliary arrays used for internal calculations. they're meant to reduce object creation and are created by the invoking code.out
- the output rotation matrix values.
-
createHamiltonQuaternionZYX
public static double[] createHamiltonQuaternionZYX(double[] thetas)
calculate the Hamilton quaternion which would be extracted from the rotation matrix created by R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z). from https://en.wikipedia.org/wiki/Davenport_chained_rotations "Any extrinsic rotation is equivalent to an intrinsic rotation by the same angles but with inverted order of elemental rotations, and vice versa. For instance, the intrinsic rotations x-y’-z″ by angles α, β, γ are equivalent to the extrinsic rotations z-y-x by angles γ, β, α."from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (18) where cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | = | (cos φ * cos ψ) (-sin φ * cos θ + cos φ * sin ψ * sin θ) (sin φ * sin θ + cos φ * sin ψ * cos θ) | | (sin φ * cos ψ) ( cos φ * cos θ + sin φ * sin ψ * sin θ) (-cos φ * sin θ + sin φ * sin ψ * cos θ) | | (-sin ψ) ( cos ψ * sin θ ) (cos ψ * cos θ) | = | (cosZ * cosY) (-sinZ * cosX + cosZ * sinY * sinX) (sinZ * sinX + cosZ * sinY * cosX) | | (sinZ * cosY) ( cosZ * cosX + sinZ * sinY * sinX) (-cosZ * sinX + sinZ * sinY * cosX) | | (-sinY) ( cosY * sinX ) (cosY * cosX) | given angle theta and axis n: q = [scalar, vector] = [ cos(theta/2), nx*sin(theta/2), ny*sin(theta/2), nz*sin(theta/2)]; given euler angles: q1 = sin(z/2)*sin(y/2)*sin(x/2) + cos(z/2)*cos(y/2)*cos(x/2) q2 = -sin(z/2)*sin(y/2)*cos(x/2) + sin(x/2)*cos(z/2)*cos(y/2) q3 = sin(z/2)*sin(x/2)*cos(y/2) + sin(y/2)*cos(z/2)*cos(x/2) q4 = sin(z/2)*cos(y/2)*cos(x/2) - sin(y/2)*sin(x/2)*cos(z/2)
- Parameters:
thetas
- euler rotation angles- Returns:
-
createHamiltonQuaternionZYX
public static double[] createHamiltonQuaternionZYX(double angle, double[] axis)
calculate the Hamilton quaternion which would be extracted from the rotation matrix created by R_xyz = R_z(theta_z)*R_y(theta_y)*R_z(theta_z). from https://en.wikipedia.org/wiki/Davenport_chained_rotations "Any extrinsic rotation is equivalent to an intrinsic rotation by the same angles but with inverted order of elemental rotations, and vice versa. For instance, the intrinsic rotations x-y’-z″ by angles α, β, γ are equivalent to the extrinsic rotations z-y-x by angles γ, β, α."from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (18) where cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | = | (cos φ * cos ψ) (-sin φ * cos θ + cos φ * sin ψ * sin θ) (sin φ * sin θ + cos φ * sin ψ * cos θ) | | (sin φ * cos ψ) ( cos φ * cos θ + sin φ * sin ψ * sin θ) (-cos φ * sin θ + sin φ * sin ψ * cos θ) | | (-sin ψ) ( cos ψ * sin θ ) (cos ψ * cos θ) | = | (cosZ * cosY) (-sinZ * cosX + cosZ * sinY * sinX) (sinZ * sinX + cosZ * sinY * cosX) | | (sinZ * cosY) ( cosZ * cosX + sinZ * sinY * sinX) (-cosZ * sinX + sinZ * sinY * cosX) | | (-sinY) ( cosY * sinX ) (cosY * cosX) | given angle theta and axis n: q = [scalar, vector] = [cos(theta/2), nx*sin(theta/2), ny*sin(theta/2), nz*sin(theta/2)]; given euler angles: q1 = sin(z/2)*sin(y/2)*sin(x/2) + cos(z/2)*cos(y/2)*cos(x/2) q2 = -sin(z/2)*sin(y/2)*cos(x/2) + sin(x/2)*cos(z/2)*cos(y/2) q3 = sin(z/2)*sin(x/2)*cos(y/2) + sin(y/2)*cos(z/2)*cos(x/2) q4 = sin(z/2)*cos(y/2)*cos(x/2) - sin(y/2)*sin(x/2)*cos(z/2) This is what is used in eqn (2.40) of "An Invitation to 3-D Vision", Ma, Soatto, Kosecka, and Sastry (MASKS).
- Parameters:
angle
-axis
-- Returns:
-
convertHamiltonToBarfootQuaternionInPlace
public static void convertHamiltonToBarfootQuaternionInPlace(double[] qHamilton)
convert the quaternion from [scalar vector] to [vector scalar] in-place.- Parameters:
qHamilton
- quaternion of format [scalar vector]
-
convertHamiltonToBarfootQuaternion
public static double[] convertHamiltonToBarfootQuaternion(double[] qHamilton)
convert the quaternion from [scalar vector] to [vector scalar].- Parameters:
qHamilton
- quaternion of format [scalar vector]- Returns:
- convert the quaternion from [scalar vector] to [vector scalar]
-
createRotationXYZ
public static double[][] createRotationXYZ(double[] thetas)
given an array of euler rotation angles, return the rotation matrix as the rotations for x, y, z multiplied in that order. TODO: consider whether this should be using the Shuster equations as R_xyz = R_x(theta_x)*R_y(theta_y)*R_z(theta_z) which is transposed from the Z*Y*X operation.where cc rotation about z-axis (yaw): cc about the y-axis (pitch): cc about x-axis (roll): | cos φ -sin φ 0 | | cos ψ 0 sin ψ | | 1 0 0 | | sin φ cos φ 0 | | 0 1 0 | | 0 cos θ -sin θ | | 0 0 1 | | -sin ψ 0 cos ψ | | 0 sin θ cos θ | from Appendix A of "Euler Angles and Quaternions and Transformations", NASA Mission Planning and Analysis Division, 1977, Shuttle Program. R_X(theta_X)*R_Y(theta_Y)*R_Z(theta_Z) = | cosY*cosZ -cosY*sinZ sinY | | sinX*sinY*cosZ + cosX*sinZ -sinX*sinY*sinZ + cosX*cosZ -sinX*cosY | | -cosX*sinY*cosZ + sinX*sinZ cosX*sinY*sinZ + sinX*cosZ cosX*cosY |
- Parameters:
thetas
- euler rotation angles- Returns:
-
createUnitLengthQuaternionBarfoot
public static double[] createUnitLengthQuaternionBarfoot(double[] unitLengthAxis, double angle)
-
createUnitLengthQuaternionHamilton
public static double[] createUnitLengthQuaternionHamilton(double[] unitLengthAxis, double angle)
-
createRotationFromUnitLengthAngleAxis
public static double[][] createRotationFromUnitLengthAngleAxis(double[] unitLengthAxis, double angle)
from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (14) C(axis, angle) = cos(angle)*I + (1-cos(angle))*axis*axis^T - sin(angle)*[axis]_x satisfies unit-length constraint q^T*q = 1 (size [1X4]*[4X1]=[1X1]. q^T*q = q_1^2 + q_2^2 + q_3^2 + q_4^2.
- Parameters:
unitLengthAxis
-angle
-- Returns:
-
applyRotationPerturbationToQuaternion
public static double[] applyRotationPerturbationToQuaternion(double[] theta, double[] dTheta)
apply perturbation dTheta to quaternion formed from euler rotation angles theta. To the first order, this is a constraint-sensitive approach.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (45) and (44).
- Parameters:
theta
- euler rotation anglesdTheta
- rotation perturbation- Returns:
- the resulting quaternion formed from theta and perturbed by dTheta. [4X1]
-
quaternionPrincipalAxisRotation
public static double[] quaternionPrincipalAxisRotation(double angle, int principalAxis)
-
createQuaternionZYXFromEuler
public static double[] createQuaternionZYXFromEuler(double[] eulerXYZ)
create a rotation quaternion from Euler x, y, z angles. note that the rotation order of multiplication operations is z, y, x.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (37) q(euler) = q_z(euler_z)^+ * q_y(euler_y)^+ + q_x(euler_x) and principal axis rotations in eqn (35)
- Parameters:
eulerXYZ
-- Returns:
- [4X1] quaternion rotation vector.
-
createRotationFromQuaternion
public static double[][] createRotationFromQuaternion(double[] theta)
create the rotation matrix from quaternions formed by the euler rotation angles theta.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (37)
- Parameters:
theta
- euler rotation angles- Returns:
- rotation matrix [3X3].
-
createRotationVector
public static double[] createRotationVector(double[] theta, double[] dTheta)
create the rotation vector dPhi = S(theta) * dThetafrom Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. text under eqn (26) dPhi= S(theta) * dTheta
- Parameters:
theta
- euler rotation anglesdTheta
- perturbation to apply to rotation- Returns:
- dPhi= S(theta) * dTheta. length is 3.
-
createDeltaQ
public static double[][] createDeltaQ(double[] theta, double[] dTheta)
create perturbation for a quaternion from a perturbation to euler rotation angles.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. part of eqn (45) and text under (26). | dPhi |^⨁ | 1 | where dPhi = S(theta) * dTheta
- Parameters:
theta
- euler rotation anglesdTheta
- rotation perturbation- Returns:
- perturbation for a quaternion. [4X4].
-
applySingularitySafeRotationPerturbationQuaternion
public static double[] applySingularitySafeRotationPerturbationQuaternion(double[] theta, double[] dTheta)
create a unit-length quaternion update of the quaternion formed from the euler rotation angles theta by the perturbation dTheta. To the first order, this is a constraint-sensitive approach.from Barfoot, Forbes, & Furgale 2010, "Pose estimation using linearized rotations and quaternion algebra", Acta Astronautica (2010), doi:10.1016/j.actaastro.2010.06.049. eqn (49) q(theta + perturbation) = q(dPhi)^⨁ * q(theta) where dPhi = S(theta) * dTheta "This update approach allows us to store and update the rotation as a unit-length quaternion, thereby avoiding singularities and the need to restore the constraint afterwards (i.e., constraint restoration is built in)."
- Parameters:
theta
- euler rotation anglesdTheta
- perturbation to apply to rotation- Returns:
- resulting quaternion from perturbation applied to quaternion formed from theta euler angles.
-
-


Parallel Line Assays: Completely randomized design, Randomized Block design, and Latin squares design. Balanced data are fitted as described in the Ph.Eur. In the presence of missing values complete data analysis can be performed (with computation of Fieller's confidence intervals for the estimated potency), or imputation of values can be applied. The package contains a script such that a pdf-document with a report of an analysis of an assay can be produced from an input file with data of the assay. Here no knowledge of R is needed by the user.
| Version: | 0.2 |
| Depends: | R (≥ 3.1.0), methods |
| Published: | 2015-09-09 |
| Author: | Jens Henrik Badsberg |
| Maintainer: | Jens Henrik Badsberg <pla2015 at badsberg.eu> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| CRAN checks: | pla results |
| Reference manual: | pla.pdf |
| Package source: | pla_0.2.tar.gz |
| Windows binaries: | r-devel: pla_0.2.zip, r-release: pla_0.2.zip, r-oldrel: pla_0.2.zip |
| OS X binaries: | r-release: pla_0.2.tgz, r-oldrel: pla_0.2.tgz |
| Old sources: | pla archive |
Please use the canonical form https://CRAN.R-project.org/package=pla to link to this page.


To find all anagrams, let’s split every word to letters and sort them. When letter-sorted, all anagrams are same.
For instance:
nap, pan -> anp
ear, era, are -> aer
cheaters, hectares, teachers -> aceehrst
...
We’ll use the letter-sorted variants as map keys to store only one value per each key:
```js run function aclean(arr) { let map = new Map();
for (let word of arr) { // split the word by letters, sort them and join back ! let sorted = word.toLowerCase().split(’‘).sort().join(’’); // () /!* map.set(sorted, word); }
return Array.from(map.values()); }
let arr = [“nap”, “teachers”, “cheaters”, “PAN”, “ear”, “era”, “hectares”];
alert( aclean(arr) ); ```
Letter-sorting is done by the chain of calls in the line (*)
.
For convenience let’s split it into multiple lines:
let sorted = word // PAN
.toLowerCase() // pan
.split('') // ['p','a','n']
.sort() // ['a','n','p']
.join(''); // anp
Two different words 'PAN'
and 'nap'
receive the same letter-sorted form 'anp'
.
The next line put the word into the map:
If we ever meet a word the same letter-sorted form again, then it would overwrite the previous value with the same key in the map. So we’ll always have at maximum one word per letter-form.
At the end Array.from(map.values())
takes an iterable over map values (we don’t need keys in the result) and returns an array of them.
Here we could also use a plain object instead of the Map
, because keys are strings.
That’s how the solution can look:
```js run demo function aclean(arr) { let obj = {};
for (let i = 0; i < arr.length; i++) { let sorted = arr[i].toLowerCase().split("“).sort().join(”"); obj[sorted] = arr[i]; }
return Object.values(obj); }
let arr = [“nap”, “teachers”, “cheaters”, “PAN”, “ear”, “era”, “hectares”];
alert( aclean(arr) ); ```


ScriptEd equips students with the fundamental coding skills and professional experiences that together create access to careers in technology.
This year in ScriptEd we are going to create several websites, games and webapps!


This is a utility that assists with generating an access token and retrieving the endpoint URI for a self-published SmartApp.
You will need to get the "Client ID" and "Client Secret" from the OAuth section of the Smart App's Settings page. This page will redirect you to the SmartThings site where you can set the permissions for the application, then will return to this page where the REST endpoint and Access token can be retrieved.
For more information, see the OAuth documentation in the Smartthings developer documentation.
Note: this tool does not save any information you submit to the server, the entire process is handled from the web browser in Javascript. The client id is temporarily stored in a cookie until the OAuth authorization code is returned via callback, but authorization codes, and secrets are not retained.
Enter the Client ID:
Enter the Client Secret:
You can retrieve your tokens using the following commands. On Windows, open the powershell application, on Mac or Linux use the Terminal program.

Sorry, the SmartThings OAuth service doesn't set a Cross Origin Resource Sharing allow header, so this can't be done automatically in a web browser.


Register with us and you can join our Poetry Community, compose and share your own poems, like and comment on other poems you find interesting.
{{poem.comments.length}} Comment(s)
{{poem.likes.length}} Like(s)
You like this
No likes yet
{{like.nameOfLiker}}
{{like.created | date: 'mediumDate'}}
by {{comment.nameOfCreator}}, posted on {{comment.created | date: 'mediumDate'}}
You like this


public class CommitQueue extends java.lang.Object implements IExtractionQueue, IAnalysisQueue
Commit
objects, which a
commit analyzer consumes.| Modifier and Type | Class and Description |
|---|---|
static class |
CommitQueue.QueueState
This enumeration defines the different states of the commit queue.
|
| Constructor and Description |
|---|
CommitQueue(int maxElements)
Constructs an empty commit queue.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCommit(Commit commit)
Adds the given
Commit to the end of this queue if its status is
CommitQueue.QueueState.OPEN and the queue is not full. |
void |
enableCommitCaching(java.io.File commitsCacheDirectory)
Activates the optional saving of commits received via
addCommit(Commit) for future analyses. |
Commit |
getCommit()
Returns the first
Commit in the queue if its status is
CommitQueue.QueueState.OPEN . |
boolean |
isOpen()
Returns whether this queue is open (
true ) or not (false ). |
void |
setState(CommitQueue.QueueState newState)
Sets the state of this queue to the given new
CommitQueue.QueueState . |
public boolean isOpen()
true
) or not (false
). This method should be
used in combination with the IAnalysisQueue.getCommit()
method in order to check whether obtaining commits from
this queue is possible as only open queues will provide commits. Further, only checking for non-null returns
from the IAnalysisQueue.getCommit()
method is not enough as extraction of commits may take longer than analyzing them.
Hence, a proposed combination of usage is:
while(queue.isOpen()) {
Commit commit = queue.getCommit();
if (commit != null) {
// Do something with the commit
}
}
isOpen
in interface IAnalysisQueue
true
if this queue is open and will provide commits; false
otherwisepublic void setState(CommitQueue.QueueState newState)
CommitQueue.QueueState
.newState
- the new state for this queuepublic void enableCommitCaching(java.io.File commitsCacheDirectory)
addCommit(Commit)
for future analyses.commitsCacheDirectory
- an existing and empty directory to which the CommitSerializer
shall save
the commits provided to this queue; if null
is given, which is the default value, saving will
be disabledpublic Commit getCommit()
Commit
in the queue if its status is
CommitQueue.QueueState.OPEN
. If the queue has a different status or there are currently no
commits available, this method will return null
. However, returning null
does not
indicate that there are nor further commits extracted. See IAnalysisQueue.isOpen()
for more information.getCommit
in interface IAnalysisQueue
null
if the queue is not open or no commit is availablepublic boolean addCommit(Commit commit)
Commit
to the end of this queue if its status is
CommitQueue.QueueState.OPEN
and the queue is not full.addCommit
in interface IExtractionQueue
commit
- the new commit added to the end of this queue if the queue is opentrue
if adding the commit to this queue was successful; false
if the queue has
not the status CommitQueue.QueueState.OPEN
or there are currently too much commits in the queue


Integrated Clinical Platform
Allen G,
Project Manager
My Activities
My Monitoring
Alerts
2
Calendar
2
Overdue Visits
4
Overdue Visits
Visit Reports
Create Trial
Create Plan
Create Feasibility
CRA Plan
Budget
Settings and Masters
Enrollment
Trial Dashboard
Risk Monitoring
Trial Tracking
Budget Tracking
Subject Visit Tracking
CRA Visit Tracking
Deviations


Welcome to the Thesaurus Extenstion!
To use, simply type a word below!
Then click this button:
Click This


/
1909
FLORA
NEQTROPICA
Si
dsroxyl
on
ssl
i
ci
o
1
i
li
m
(L.
?
)
Ld’n*
T-D.PENNINGTON
1986
DiphoUs
fcjj.
À>
New
York
Botanical
Garden
Arthur
Cronquist,
1944
THE
NEW
YORK
BOTANICAL
GARDEN
EXPLORATION
OF
CUBA
CAYO
BALLENATO
qrande,
CAMAQUEY
no.
2L5-.______________'
-
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


PL can help you find a home of the, apartment for rent, sell and buy that you'll love. As with any new technology, building designers experiment and learn from each other in the pursuit of new solutions, can help you easily find a home, apartment for rent, sell and buy that you'll love.
PL can help you find a home of the, apartment for rent, sell and buy that you'll love. As with any new technology, building designers experiment and learn from each other in the pursuit of new solutions, can help you easily find a home, apartment for rent, sell and buy that you'll love.
PL can help you find a home of the, apartment for rent, sell and buy that you'll love. As with any new technology, building designers experiment and learn from each other in the pursuit of new solutions, can help you easily find a home, apartment for rent, sell and buy that you'll love.
PL can help you find a home of the, apartment for rent, sell and buy that you'll love. As with any new technology, building designers experiment and learn from each other in the pursuit of new solutions, can help you easily find a home, apartment for rent, sell and buy that you'll love. .
{{review[0].slice(0,54)}}
{{review[1]}} {{review[2]}}


Products
Hamburgers rule!
This page tests a short menu with short content.
Biltong pancetta cow, ham hock drumstick kielbasa salami. Porchetta venison shankle bresaola meatloaf chuck drumstick ground round biltong pork loin tongue pork belly tri-tip short loin. Turkey fatback shankle pancetta andouille swine. Chicken drumstick shankle short ribs.


An Android application that allows users to take a picture and identify a flag. Uses OpenCV to analyze flag and return 6 of the closest possible results, allows users to select from results, and saves users search history. Project was completed with a group of 5 and overall grade of 100% was acheived.
Java
Android Development


Lightspeed
Parameters
cert
| cert |
|---|
| string |
| "" |
A tls certificate if you are handling that on a node level. This should be the real certificate and not the path to one.
csrfProtection
| csrfProtection |
|---|
| boolean |
| true |
Adds a cookie to prevent csrf attacks. It adds the verification cookie on GET requests and checks it on POST requests.
fileTypeText
| fileTypeText |
|---|
| object |
| {} |
Adds text to the end of every file of a given type.
html: {
beginning:'<!DOCTYPE html><html>',
end:'</html'
}
functions
| functions |
|---|
| object |
| {} |
Functions accessible to the page while using the included page layout system. For more details see the included lightspeed parser.
functions:{
incrementVisit:()=>visitsToday++
}
getPerMinute
| getPerMinute |
|---|
| number |
| 1000 |
Maximum amount of GET requests allowed each minute per ip.
iframe
| iframe |
|---|
| boolean |
| true |
Keep iframes same site only or free.
jQuery
| jQuery |
|---|
| boolean |
| false |
Append a script to jQuery to the end of each html file.
key
| key |
|---|
| string |
| "" |
A tls key if you are handling that on a node level. This should be the real key and not the path to one.
log
| log |
|---|
| function |
| console.log |
A function to log requests in common log format.
log: (data)=>DB.addToLog(data)
pagesLocation
| pagesLocation |
|---|
| string |
| "/www" |
Path the pages to be hosted.
parser
| parser |
|---|
| {} |
| {} |
A page parser to be used and disable the built in parser. Please see the parser documentation for more information.
plugins
| plugins |
|---|
| plugin[] |
| [] |
An array of plugins to be used. For a more details guide see the plugin documentation.
port
| port |
|---|
| number |
| 80 |
Port for the server to listen on. 80 is what http uses and 443 is what https uses.
postHandler
| postHandler |
|---|
| function |
| (data, req, res)=>{} |
Handler for post requests not picked up in post tree.
posts
| posts |
|---|
| object |
| {} |
A tree for post requests.
posts: {
'/news': DB.getNews,
'/bug_report': DB.addBug,
'/users': {
'/signup': USERS.signup,
'/login': USERS.login
}
}
postPerMinute
| postPerMinute |
|---|
| number |
| 10 |
Amount of POST requests allowed per minute per ip.
printErrors
| printErrors |
|---|
| boolean |
| true |
Print errors such as 404 requests to the console.
protocol
| printErrors |
|---|
| "http" | "https" |
| "http" |
What web protocol to use. HTTPS requires a key and certificate was required.
restApi
| restApi |
|---|
| boolean |
| false |
Set up a rest api or not.
restFileExtension
| restFileExtension |
|---|
| string |
| "json" |
Default file extension to use over the rest api.
restLocation
| restLocation |
|---|
| string |
| "/rest" |
Path to rest api files.
restPrefix
| restPrefix |
|---|
| string |
| "/rest" |
Url to connect to rest api instead of normal site.
start
| start |
|---|
| boolean |
| true |
Listen on the port for the server. Most useful for subdomains.
staticPage
| staticPage |
|---|
| boolean |
| true |
Store pages in memory or read them from a file each time.
streamFiles
| streamFiles |
|---|
| object |
| {} |
File types to be streamed. This bypasses what ever parser is selected.
streamFiles: {
'mp4': true,
'png': true,
'jpg': true
}
subDomains
| subDomains |
|---|
| object |
| {} |
Subdomains to use. See the subdomain documentation for a guide.
templateFileExtension
| templateFileExtension |
|---|
| string |
| "template" |
File extension for the included parser's templates.
templateLocation
| templateLocation |
|---|
| string |
| "/templates" |
Path to template files for the included parser's templates.
variables
| variables |
|---|
| object |
| {} |
Variables accessible to the the the included parser.
Returns
reloadFiles
| reloadFiles |
|---|
| function |
Reloads all static files asynchronously.
reloadPosts
| reloadPosts |
|---|
| function |
Rebuilds the internal post request tree using the same object passed in the startup parameters.
server
| server |
|---|
| http.Server |
The server object to be used to attach web socket servers to or for other access.
start
| start |
|---|
| function |
Starts the sever listening if it is not already doing so.


`Server` is a concern mixed into `Environment` and `Index` that provides a Rack compatible `call` interface and url generation helpers.
`call` implements the Rack 1.x specification which accepts an `env` Hash and returns a three item tuple with the status code, headers, and body.
Mapping your environment at a url prefix will serve all assets in the path.
map "/assets" do run Sprockets::Environment.new end
A request for `“/assets/foo/bar.js”` will search your environment for `“foo/bar.js”`.
# File lib/sprockets/server.rb, line 22 def call(env) start_time = Time.now.to_f time_elapsed = lambda { ((Time.now.to_f - start_time) * 1000).to_i } msg = "Served asset #{env['PATH_INFO']} -" # Mark session as "skipped" so no `Set-Cookie` header is set env['rack.session.options'] ||= {} env['rack.session.options'][:defer] = true env['rack.session.options'][:skip] = true # Extract the path from everything after the leading slash path = unescape(env['PATH_INFO'].to_s.sub(/^\//, '')) # URLs containing a `".."` are rejected for security reasons. if forbidden_request?(path) return forbidden_response end # Strip fingerprint if fingerprint = path_fingerprint(path) path = path.sub("-#{fingerprint}", '') end # Look up the asset. asset = find_asset(path, :bundle => !body_only?(env)) # `find_asset` returns nil if the asset doesn't exist if asset.nil? logger.info "#{msg} 404 Not Found (#{time_elapsed.call}ms)" # Return a 404 Not Found not_found_response # Check request headers `HTTP_IF_NONE_MATCH` against the asset digest elsif etag_match?(asset, env) logger.info "#{msg} 304 Not Modified (#{time_elapsed.call}ms)" # Return a 304 Not Modified not_modified_response(asset, env) else logger.info "#{msg} 200 OK (#{time_elapsed.call}ms)" # Return a 200 with the asset contents ok_response(asset, env) end rescue Exception => e logger.error "Error compiling asset #{path}:" logger.error "#{e.class.name}: #{e.message}" case content_type_of(path) when "application/javascript" # Re-throw JavaScript asset exceptions to the browser logger.info "#{msg} 500 Internal Server Error\n\n" return javascript_exception_response(e) when "text/css" # Display CSS asset exceptions in the browser logger.info "#{msg} 500 Internal Server Error\n\n" return css_exception_response(e) else raise end end
Generated with the Darkfish Rdoc Generator 2.


Summary of our research
In our new paper published in Nature Geoscience (view it here), we identified a common bias in different state-of-the-art satellite-based estimates of terrestrial photosynthesis, and found that this bias is closely related to droughts and their apparent impact on the functioning of vegetation. In other words, common satellite-based vegetation monitoring methods underestimate the impact of droughts.
What are the implications of this bias for our understanding of the terrestrial C cycle and its year-to-year variability? We investigated this question using a new global implementation of the P-model (open-access code available here). Our results suggest that accurately capturing soil moisture stress in photosynthesis modelling is crucial for estimating the year-to-year variability in vegetation productivity and the impacts of drought extreme events. Not capturing this effect accurately leads to a substantial underestimation of this variability and to a systematic underestimation of drought extreme event impacts on vegetation productivity.
However, in our simulations, the locally strong soil moisture effect on vegetation productivity and its variability does not translate into a similarly strong water-control on the global-scale variability in terrestrial gross primary productivity. This is due to the compensating effects of different continents that are not synchronously drought-stressed and tend to compensate each other.
In view of a recent study by Humphrey et al. (2018) who found a clear relationship between terrestrial water storage and the atmospheric CO2 growth rate, this raises a fundamental question about the evident water-carbon coupling at the global scale: Is it an apparent phenomenon where terrestrial water storage is a proxy for some other factor that controls vegetation functioning? Or are we missing some element of plant access to water that has a longer memory and stronger year-to-year variability, so that the simulated compensating effects from different continents that we found would no longer neatly compensate each other at the global scale? This is an exciting lead for future research…
Further links
- A blogpost written for Nature Ecology and Evolution - Behind the Paper.
- A press release written in collaboration with Natalie Sanders, Imperial College
Data and code
- Model output data from site-scale and global P-model simulations are available on Zenodo.
- Code for the entire analysis and producing figures is available on Zenodo and on github. Compile (knit) RMarkdown file
knit_soilm_global.Rmd
for a full reproduction of results orsi_soilm_global.Rmd
for re-creating the Supplementary Information to our paper.


Establish & Maintain Infrastructure
Establishing and maintaining infrastructure consists of building, purchasing, co-opting, and maintaining systems and services used to conduct cyber operations. An adversary will need to establish infrastructure used to communicate with and control assets used throughout the course of their operations.
Techniques
Techniques: 16
| ID | Name | Description |
|---|---|---|
| T1329 | Acquire and/or use 3rd party infrastructure services |
A wide variety of cloud, virtual private services, hosting, compute, and storage solutions are available. Additionally botnets are available for rent or purchase. Use of these solutions allow an adversary to stage, launch, and execute an attack from infrastructure that does not physically tie back to them and can be rapidly provisioned, modified, and shut down. |
| T1330 | Acquire and/or use 3rd party software services |
A wide variety of 3rd party software services are available (e.g., Twitter, Dropbox, GoogleDocs). Use of these solutions allow an adversary to stage, launch, and execute an attack from infrastructure that does not physically tie back to them and can be rapidly provisioned, modified, and shut down. |
| T1332 | Acquire or compromise 3rd party signing certificates |
Code signing is the process of digitally signing executables and scripts to confirm the software author and guarantee that the code has not been altered or corrupted. Users may trust a signed piece of code more than an unsigned piece of code even if they don't know who issued the certificate or who the author is. |
| T1328 | Buy domain name |
Domain Names are the human readable names used to represent one or more IP addresses. They can be purchased or, in some cases, acquired for free. |
| T1334 | Compromise 3rd party infrastructure to support delivery |
Instead of buying, leasing, or renting infrastructure an adversary may compromise infrastructure and use it for some or all of the attack cycle. |
| T1339 | Create backup infrastructure |
Backup infrastructure allows an adversary to recover from environmental and system failures. It also facilitates recovery or movement to other infrastructure if the primary infrastructure is discovered or otherwise is no longer viable. |
| T1326 | Domain registration hijacking |
Domain Registration Hijacking is the act of changing the registration of a domain name without the permission of the original registrant. |
| T1333 | Dynamic DNS |
Dynamic DNS is a automated method to rapidly update the domain name system mapping of hostnames to IPs. |
| T1336 | Install and configure hardware, network, and systems |
An adversary needs the necessary skills to set up procured equipment and software to create their desired infrastructure. |
| T1331 | Obfuscate infrastructure |
Obfuscation is hiding the day-to-day building and testing of new tools, chat servers, etc. |
| T1396 | Obtain booter/stressor subscription |
Configure and setup booter/stressor services, often intended for server stress testing, to enable denial of service attacks. |
| T1335 | Procure required equipment and software |
An adversary will require some physical hardware and software. They may only need a lightweight set-up if most of their activities will take place using on-line infrastructure. Or, they may need to build extensive infrastructure if they want to test, communicate, and control other aspects of their activities on their own systems. |
| T1340 | Shadow DNS |
The process of gathering domain account credentials in order to silently create subdomains pointed at malicious servers without tipping off the actual owner. |
| T1337 | SSL certificate acquisition for domain |
Certificates are designed to instill trust. They include information about the key, information about its owner's identity, and the digital signature of an entity that has verified the certificate's contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate with its owner. Acquiring a certificate for a domain name similar to one that is expected to be trusted may allow an adversary to trick a user in to trusting the domain (e.g., vvachovia instead of Wachovia -- homoglyphs). |
| T1338 | SSL certificate acquisition for trust breaking |
Fake certificates can be acquired by legal process or coercion. Or, an adversary can trick a Certificate Authority into issuing a certificate. These fake certificates can be used as a part of Man-in-the-Middle attacks. |
| T1327 | Use multiple DNS infrastructures |
A technique used by the adversary similar to Dynamic DNS with the exception that the use of multiple DNS infrastructures likely have whois records. |


Toggle navigation
Home
About
Contact
second
Tue, Sep 1, 2015
my second post
Short Description of User01234:
He is a
jolly good
fellow.
Privacy Policy
Copyright 2016 Kubecast


I am passionate about technology and love to learn new things to keep up with the ever changing technology landscape.
I also enjoy endless suffering from being a die hard Buffalo Bills fan.
Businesses
I am the founder of CodeSmith Tools and Exceptionless
Code
I have created several open source projects and contributed to many others


| Name: ms.varshini.B..R | Reg No: 10-9smmhc18 |
|---|---|
| Age / Sex:18/f | Contact No:6361916020 |
| Marital Status:single | Date:29/9/18 |
| Occupation:1st year bpt rv college of physio. | Dr. pjfp |
Address: Native of chikbalapur. |
DIAGNOSIS- |
Irregular periods when she was 16 years. Took allo rx. Again sarted in 2nd pu. Homoeo. h/o sinusitis since 2-3 yrs. Allergic to fan,cold ac.chill weather. sneezing. Very soon catches cold. Running nose.
Lmp: sept 9th 2018. Aug 13th 2018/ july 18th. 4 day flow. Less flow. 2/day pads. No clots, no smell, maroon color. Backpain during period for 1st day. Can tolerate.
Allergy is under control and the period is also fine.
Rx:
Rubrum 30 – 1-0-1 b/food.
Pl pills – 4-4-4-4 2 dram.
15/10/18: lmp: 6th/10/18: 5th day not much. ..had more sneezing. … < early mng after waking, , eveing after 7pm. Stays fr an hour or two and then reduces.
Rx:
Sabadilla1m – 4-4-4-4.
Pl pills- 3-0-3 .
Rubrum 15. 1 dose – night b/food.