Recently, I encountered a problem in the project, which is roughly as follows:
If you know the surface elements of a river, you need to divide the river into grids based on the rectangle entered by the user and the preset step size, and obtain the intersection between the grid and the riverbanks on both sides.
I checked the information and found that the native ArcGIS API for Silverlight did not provide an excuse to implement this function. However, geometryservice provides a similar function:
rayInvDirection, // Direction Vector inverseConst unsigned int raySign [3],Const btVector3 bounds [2], // min x, max x AABB volumeBtScalar tmin,BtScalar lambda_min,BtScalar lambda_max){BtScalar tmax, tymin, tymax, tzmin, and tzmax;// Get the far plane intersect param t along x axisTmax = (bounds [1-raySign [0]. getX ()-rayFrom. getX () * rayInvDirection. getX ();// Get the near plane intersect param t al
Tags: need further algorithm AMP--class cond any combineAn in-depth understanding of index merge is one of the important foundations for optimizing using indexes. Having understood the index merge technology, we know how to index the table. 1. Why is there an index merge There may be multiple conditions (or joins) in our where that involve multiple fields, with and or or, then it is possible to use the index merge technique at this point. The index merge technique, if simply stated, is to perfor
range of values for the two sets to add to MinandmaxMinandmax.add (Collections.min (data1));Minandmax.add (Collections.max (data1));Minandmax.add (Collections.min (data2));Minandmax.add (Collections.max (data2));//3. Calculate the same value in the Minandmax, add to result, and then remove the same value from the two data sets respectivelyint intersect;int sum1 = SUM (Minandmax);setint sum2 = SUM (set);if (set.size () = = 1) {//If set size==1, direct
intersect
To determine whether segments and lines intersect
Determines whether a rectangle contains dots
Determines whether a segment, polyline, or polygon is in a rectangle
Determines whether the rectangle is in the rectangle
To determine whether a circle is in a rectangle
Determine if the point is in the polygon
To determine whether a segment is inside a polygon
To determine if a polyline is inside a pol
();$ Param_ B = $ rand ();?>
Note: If the test dataset is too small, the conclusions may be inconsistent. First, let's look at the performance achieved through the PHP built-in method array_intersect:
The code is as follows:
$ Time = microtime (true );$ Result = array_intersect ($ param_a, $ param_ B );$ Time = microtime (true)-$ time;Echo "array_intersect: {$ time} \ n ";?>
Let's take a look at the performance achieved through the custom method inte
] = null;
$ I ++;
}
}
Return array_keys ($ result );
};
$ Param_a = $ rand ();
$ Param_ B = $ rand ();
?>
Note: If the test dataset is too small, the conclusions may be inconsistent. First, let's look at the performance achieved through the PHP built-in method array_intersect:
The Code is as follows:
$ Time = microtime (true );
$ Result = array_intersect ($ param_a, $ param_ B );
$ Time = microtime (true)-$ time;
Echo "array_intersect: {$ time} \ n ";
?>
Let's take a look at the performance
performance achieved through the PHP built-in method array_intersect:
The code is as follows:
$ Time = microtime (true );$ Result = array_intersect ($ param_a, $ param_ B );$ Time = microtime (true)-$ time;Echo "array_intersect: {$ time} \ n ";?>
Let's take a look at the performance achieved through the custom method intersect:
The code is as follows:
Function intersect (){If (func_num_args () T
(True)-$time;
echo "Array_intersect: {$time}\n";
?>
Take a look at the performance achieved by customizing the method intersect:
Copy CodeThe code is as follows:
function intersect () {
if (Func_num_args () Trigger_error (' param error ', e_user_error);
}
$args = Func_get_args ();
foreach ($args as $arg) {
if (!is_array ($arg)) {
Trigger_error (' param error ', e_user_error);
}
}
$
$value = mt_rand(1, 10000); if (!isset($result[$value])) { $result[$value] = null; $i++; } } return array_keys($result); }; $param_a = $rand(); $param_b = $rand(); ?>
Note: If the test dataset is too small, the conclusions may be inconsistent. First, let's look at the performance achieved through the PHP built-in method array_intersect:
$time = microtime(true); $result = array_intersect($param_a, $param_b); $time = microtime(true) - $time; echo "arra
too small, the conclusion may be inconsistent, let's take a look at the performance of the PHP built-in method Array_intersect implementation:
$time = microtime(true); $result = array_intersect($param_a, $param_b); $time = microtime(true) - $time; echo "array_intersect: {$time}n"; ?>
Take a look at the performance of the Intersect implementation through custom methods:
function
]Contact Email: [Email protected] [email protected]Click to inquire: http://caxcai.53kf.comProfessional service for you, open http://caxcai.53kf.com Direct dialogue%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Siemens NX v8.0.3.4r Update only win32_64 2DVDCgtech Vericut V7.2-iso 1CDflaretot.v1.2.1.0 1CDGlobal.mapper.v14.0.0.build.091212.win32_64 2CDAnsys Composite preppost v14.0 Win32 1CDSolidWorks SP4.0 Update only Win32_64-iso 2DVDIAR Embedded Workbench for Re
at the performance achieved through the PHP built-in method array_intersect:
The code is as follows:
$ Time = microtime (true );
$ Result = array_intersect ($ param_a, $ param_ B );
$ Time = microtime (true)-$ time;
Echo "array_intersect: {$ time} \ n ";
?>
Let's take a look at the performance achieved through the custom method intersect:
The code is as follows:
Function intersect (){
If (func_num_
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.