Processing the Intersection of Two Sorted Sets  OutputIterator set_int การแปล - Processing the Intersection of Two Sorted Sets  OutputIterator set_int ไทย วิธีการพูด

Processing the Intersection of Two


Processing the Intersection of Two Sorted Sets

OutputIterator
set_intersection (InputIterator source1Beg, InputIterator source1End,
InputIterator source2Beg, InputIterator source2End,
OutputIterator destBeg)

OutputIterator
set_intersection (InputIterator source1Beg, InputIterator source1End,
InputIterator source2Beg, InputIterator source2End,
OutputIterator destBeg, BinaryPredicate op)

• Both forms merge the elements of the sorted source ranges [source1Beg,source1End) and
[source2Beg,source2End) so that the destination range starting with destBeg contains all ele-
ments that are in both source ranges. For example, calling set_intersection() for
1 2 2 4 6 7 7 9
and
2 2 2 3 6 6 8 9
results in
2 2 6 9
• All elements in the destination range are in sorted order.
• Duplicates are possible if elements occur more than once in both source ranges. The number of
occurrences of equal elements in the destination range is the minimum number of their occur-
rences in both source ranges.
• Both forms return the position after the last merged element in the destination range.
• op is an optional binary predicate to be used as the sorting criterion:
op (elem1 ,elem2)
• The source ranges are not modified.
• The caller has to ensure that the ranges are sorted according to the sorting criterion on entry.
• The caller must ensure that the destination range is big enough or that insert iterators are used.
• The destination range should not overlap the source ranges.
• Complexity: linear (at most, 2*(numElems1+numElems2) - 1 comparisons).

See page 620 for an example of the use of set_intersection(). This example also demonstrates
how it differs from other algorithms that combine elements of two sorted sequences.
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!

ประมวลผลแยกของสองเรียงชุด

OutputIterator
set_intersection (InputIterator source1Beg, InputIterator source1End,
InputIterator source2Beg, InputIterator source2End,
OutputIterator destBeg)

OutputIterator
set_intersection (InputIterator source1Beg, InputIterator source1End,
InputIterator source2Beg, InputIterator source2End,
OutputIterator destBeg BinaryPredicate op)

•รูปแบบผสานองค์ประกอบเรียงลำดับแหล่งข้อมูล [source1Beg,source1End) และ
[source2Beg,source2End) เพื่อให้ช่วงปลายเริ่มต้น ด้วย destBeg ประกอบด้วยทั้งหมดเอเล -
ments ที่ทั้งต้นทางช่วง โทร set_intersection() สำหรับตัวอย่าง
1 2 2 4 6 7 7 9
และ
2 2 2 3 6 6 8 9
ผล
2 2 6 9
•องค์ประกอบทั้งหมดในช่วงปลายทางอยู่ในลำดับที่เรียงลำดับ
•ซ้ำจะได้องค์ประกอบเกิดขึ้นมากกว่าหนึ่งครั้งในช่วงต้นทั้งนั้น จำนวน
ลักษณะที่ปรากฏขององค์ประกอบเท่ากับในช่วงปลายเป็นจำนวนน้อยที่สุดของพวกเขาเกิดขึ้น-
rences ทั้งในช่วงที่ต้นทาง
•รูปแบบกลับตำแหน่งหลังผสานองค์สุดท้ายในช่วงปลาย
• op เป็นเพรดิเคตไบนารีตัวเลือกที่จะใช้เป็นเงื่อนไขการเรียงลำดับ:
op (elem1, elem2)
•แหล่งข้อมูลไม่ modified
•มีผู้เรียกเพื่อให้แน่ใจว่า ช่วงจะเรียงลำดับตามเงื่อนไขการเรียงลำดับในรายการ
•ผู้เรียกต้องแน่ใจว่า ช่วงปลายมีขนาดใหญ่เพียงพอ หรือที่แทรกใช้ iterators
•ช่วงปลายควรซ้อนทับข้อมูล
•ความซับซ้อน: เชิงเส้น (มากที่สุด 2 *(numElems1 numElems2) - 1 เปรียบเทียบ)

เห็นหน้า 620 สำหรับตัวอย่างการใช้ set_intersection() ตัวอย่างนี้ยังแสดงให้เห็นถึง
วิธีการแตกต่างจากอัลกอริทึมอื่น ๆ ที่รวมองค์ประกอบเรียงลำดับสอง
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!

การประมวลผลแยกของสองเรียงตามกำหนดOutputIterator set_intersection (InputIterator source1Beg, InputIterator source1End, InputIterator source2Beg, InputIterator source2End, OutputIterator destBeg) OutputIterator set_intersection (InputIterator source1Beg, InputIterator source1End, InputIterator source2Beg, InputIterator source2End, OutputIterator destBeg, BinaryPredicate op) •รูปแบบทั้งสองรวม องค์ประกอบของช่วงที่มาเรียงลำดับ [source1Beg, source1End) และ[source2Beg, source2End) เพื่อให้ช่วงปลายทางที่เริ่มต้นด้วย destBeg มีทุกเอเลments ที่อยู่ในช่วงที่ทั้งสองแหล่ง ตัวอย่างเช่นการเรียก set_intersection () เป็นเวลา1 2 2 4 6 7 7 9 และ2 2 2 3 6 6 8 9 ผลใน2 2 6 9 •องค์ประกอบทั้งหมดที่อยู่ในช่วงปลายทางที่อยู่ในลำดับที่เรียงลำดับ•รายการที่ซ้ำกันจะเป็นไปได้ถ้าองค์ประกอบเกิดขึ้น มากกว่าหนึ่งครั้งในช่วงที่ทั้งสองแหล่ง จำนวนของการเกิดขึ้นขององค์ประกอบที่เท่าเทียมกันในช่วงปลายทางเป็นจำนวนขั้นต่ำของพวกเขาเกิดขึ้น- rences ทั้งในช่วงที่มา•รูปแบบทั้งสองกลับตำแหน่งหลังจากที่ถูกผสานองค์ประกอบสุดท้ายในช่วงเป้าหมาย•สหกรณ์เป็นคำกริยาไบนารีตัวเลือกที่จะเป็น ใช้เป็นเกณฑ์การเรียงลำดับ: op (elem1, elem2) •ช่วงที่แหล่งที่มาไม่ได้รับการแก้ไข•โทรมีเพื่อให้แน่ใจว่าช่วงที่จะถูกจัดเรียงตามเกณฑ์การเรียงลำดับที่รายการ•โทรต้องให้แน่ใจว่าช่วงปลายทางมีขนาดใหญ่ iterators เพียงพอหรือแทรกที่ใช้•ช่วงปลายทางไม่ควรซ้อนทับกันของแหล่งที่มาช่วง•ซับซ้อน: เชิงเส้น (ที่ส่วนใหญ่ 2 * (numElems1 + numElems2) - 1 การเปรียบเทียบ) ดูหน้า 620 ตัวอย่างของการใช้ set_intersection () ตัวอย่างนี้ยังแสดงให้เห็นถึงวิธีการที่จะแตกต่างจากขั้นตอนวิธีการอื่น ๆ ที่รวมองค์ประกอบของสองลำดับที่เรียงลำดับ


































การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!

การประมวลผลแยกสองแยกชุด

outputiterator
set_intersection ( inputiterator source1beg inputiterator source1end , , inputiterator source2beg inputiterator source2end
, ,

outputiterator destbeg ) outputiterator
set_intersection ( inputiterator source1beg inputiterator source1end
, , inputiterator source2beg inputiterator source2end outputiterator destbeg
, , ,binarypredicate OP )

บริการทั้งสองรูปแบบผสานองค์ประกอบของเรียงที่มาช่วง [ source1beg source1end ) , และ source2beg
[ source2end ) , เพื่อให้ปลายทางช่วงเริ่มต้นด้วย destbeg มีทั้งหมด E -
ments ที่มีทั้งแหล่งที่มาของช่วง ตัวอย่างเช่น เรียก set_intersection() สำหรับ
1 2 2 4 6 7 และ 9

2 2 2 3 4 6 8 9
ผล
2
9- องค์ประกอบทั้งหมดในช่วงปลายทางอยู่ในการเรียงลำดับ
- รายการที่ซ้ำกันจะเป็นไปได้ถ้าองค์ประกอบเกิดขึ้นมากกว่าหนึ่งครั้งในช่วงที่ทั้งสองแหล่ง จํานวน
เกิดเท่ากับองค์ประกอบในช่วงปลายทางเป็นจำนวนต่ำสุดของพวกเขาเกิดขึ้น --
rences ทั้งสองแหล่งที่มาของช่วง
- แบบฟอร์มทั้งสองคืนตำแหน่ง หลังล่าสุด ผสานธาตุในช่วงปลายทาง
- OP คือตัวเลือกไบนารีประโยคที่จะใช้เป็นเกณฑ์การเรียง OP ( elem1 :
,
- elem2 ) ที่มาช่วงไม่ได้โมดิจึงเอ็ด
- โทรได้เพื่อให้แน่ใจว่าช่วงที่เรียงไว้ตามเกณฑ์ในการเรียงลำดับรายการ
- โทรต้องมั่นใจว่า ช่วงปลายมีขนาดใหญ่พอ หรือใส่ iterators ใช้
- ช่วงปลายทางไม่ควรทับซ้อนมาช่วง
- ความซับซ้อน : เชิงเส้น ( มากสุด 2 * ( numelems1 numelems2 ) - 1 การเปรียบเทียบ )

เห็นหน้า 620 สำหรับตัวอย่างของการใช้ set_intersection() . ตัวอย่างนี้ยังแสดงให้เห็นถึง
วิธีนั้นแตกต่างจากอัลกอริทึมอื่น ๆที่รวมองค์ประกอบสองเรียงลําดับ
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2024 I Love Translation. All reserved.

E-mail: